
This page explains the service features included with super_mediator
When running super_mediator(1) as a service, super_mediator must be configured to listen on network socket(s) and/or poll one or more directories for binary IPFIX files. See the super_mediator.conf(1) manual page for details on configuring super_mediator.
On systems that support it, systemd is an option for managing super_mediator services (as of super_mediator 1.11.0). The implementation of super_mediator as a systemd service is intended to provide an easy transition for those migrating from the SysV init.d service implementation.
When running a super_mediator service for the first time, you must first create and install a configuration file, super_mediator.conf, to define the COLLECTORs and EXPORTERs for your intended use. If you are upgrading from a previous version of super_mediator, your configuration file will have persisted during the upgrade. The super_mediator.conf file is typically installed in /etc, and a sample configuration file is installed in /usr/share/super_mediator/super_mediator.conf.
Once the configuration file is modified and installed, starting super_mediator as a service is the same as starting any other systemd service:
# systemctl start super_mediator.serviceChecking the service's status and stopping the service are also typical:
# systemctl status super_mediator.serviceand:
# systemctl stop super_mediator.serviceTo have super_mediator start automatically when the system is booted, run
# systemctl enable super_mediator.serviceShould you have trouble using systemctl to start super_mediator, be aware of the following: When systemctl is used to start (or restart) the super_mediator service, a shell script is invoked to start the super_mediator program. That shell script is typically installed at /usr/libexec/super_mediator/super_mediator_startup.
With systemd functionality comes the ability to start a super_mediator service as an instance, with a unique configuration per instance.
To start super_mediator as an instantiated service, you must create a unique configuration file in the configuration file directory (/etc). The configuration file should be named super_mediator.foo.conf where foo is the name you want to give your instantiated service. Once this is done, you can start the instantiated service by passing your service name.
For example:
# systemctl start super_mediator@foo.servicestarts an instantiated service using the configuration file super_mediator.foo.conf.
For systems that do not support systemd, the SysV init.d service script is still available, however this capability is not present when installing via rpm.
(For super_mediator 1.10._x_ and earlier, the init.d capability is installed by the rpm and administrators should follow the instructions in this section.)
Running a super_mediator service using init.d is very similar to using systemd. The super_mediator.conf configuration file must be configured prior to first use with the parameters you want the service to use. The configuration file is typically located in /etc.
Once your configuration file is complete, you can start the super_mediator service using the following command:
# service super_mediator startYou can stop the service or check its status using:
# service super_mediator stopand
# service super_mediator statusOne can mimic the instantiated services of systemd by creating a configuration file /etc/super_mediator-foo.conf and either copying or linking /etc/init.d/super_mediator to /etc/init.d/super_mediator-foo.
# ln /etc/init.d/super_mediator /etc/init.d/super_mediator-fooRunning
# service super_mediator-foo startwill use the configuration settings in /etc/super_mediator-foo.conf. This approach should only be used on systems which do not support systemd, and it is not forward-compatible with systemd.
As of super_mediator-1.14, reference copies of all the start-up files are installed under PREFIX/share/super_mediator. When super_mediator is installed via an RPM, the systemd files are also installed in their correct locations. For other systems, move these required files into the appropriate location to use them.
PREFIX/share/super_mediator/super_mediator.conf
A sample super_mediator.conf file to be used as the argument to the --config option of super_mediator. (Prior to super_mediator-1.14.0, this file was installed in /etc or PREFIX/etc.
PREFIX/share/super_mediator/lib/systemd/system/super_mediator.service
Reference copy of systemd unit file for the super_mediator service.
PREFIX/share/super_mediator/lib/systemd/system/super_mediator@.service
Reference copy of systemd unit file for super_mediator instantiated services.
PREFIX/share/super_mediator/libexec/super_mediator/super_mediator_startup
Reference copy of the super_mediator_startup script referenced by the systemd unit files for super_mediator.
PREFIX/share/super_mediator/etc/init.d/super_mediator
Reference copy of the SysV init.d-style start-up script.