Explanation of Super Mediator Services

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.

systemd

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.service

Checking the service's status and stopping the service are also typical:

# systemctl status super_mediator.service

and:

# systemctl stop super_mediator.service

To have super_mediator start automatically when the system is booted, run

# systemctl enable super_mediator.service

Should 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.

Instantiated Services

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.service

starts an instantiated service using the configuration file super_mediator.foo.conf.

init.d

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 start

You can stop the service or check its status using:

# service super_mediator stop

and

# service super_mediator status

One 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-foo

Running

# service super_mediator-foo start

will 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.

Reference Copies

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.