Docs » Configure application receivers » Configure application receivers for hosts and servers » systemd

systemd 🔗

Description 🔗

The Splunk Distribution of OpenTelemetry Collector provides this integration as the collectd/systemd monitor via the Smart Agent Receiver. This monitor collects metrics about the state of configured systemd services using the collectd/systemd plugin. A service is in the state that a metric represents if the metric value is 1 and not in that state if the metric value is 0. The name of the service that the metric is reporting about is assigned to dimension systemd_service.

The collectd-systemd plugin reads the status of systemd services from host location /var/run/dbus/system_bus_socket. This means that the host location must be mounted to the container in which the Smart Agent is running. The agent container must also run in privilege mode. The following example shows an excerpt of the docker run command:

docker run ...\
  --privileged \
  -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro \
...

Installation 🔗

This monitor is available in the SignalFx Smart Agent Receiver, which is part of the Splunk Distribution of OpenTelemetry Collector.

To install this integration:

  1. Deploy the Splunk Distribution of OpenTelemetry Collector to your host or container platform.

  2. Configure the monitor, as described in the next section.

Configuration 🔗

This Splunk Distribution of OpenTelemetry Collector allows embedding a Smart Agent monitor configuration in an associated Smart Agent Receiver instance.

Note: Providing a systemd monitor entry in your Smart Agent or Collector configuration is required for its use. Use the appropriate form for your agent type.

Smart Agent 🔗

To activate this monitor in the Smart Agent, add the following to your agent configuration:

monitors:  # All monitor config goes under this key
 - type: collectd/systemd
   ...  # Additional config

The following is an excerpt of a YAML configuration for monitoring the state of docker and ubuntu-fan services:

monitors:
- type: collectd/systemd
  intervalSeconds: 10
  services:
    - docker
    - ubuntu-fan

gauge.substate.running, which indicates whether a service is running or not, is the only metric reported by default. The other metrics must be configured explicitly using the sendActiveState, sendSubState, and sendLoadState configuration flags, as shown in the following example. The metrics are grouped into ActiveState, SubState, and LoadState groups.

monitors:
- type: collectd/systemd
  intervalSeconds: 10
  services:
    - docker
    - ubuntu-fan
  sendActiveState: true

See Smart Agent example configuration for an autogenerated example of a YAML configuration file, with default values where applicable.

Splunk Distribution of OpenTelemetry Collector 🔗

To activate this monitor in the Splunk Distribution of OpenTelemetry Collector, add the following to your agent configuration:

receivers:
  smartagent/systemd:
    type: collectd/systemd
    ...  # Additional config

See configuration examples for specific use cases that show how the collector can integrate and complement existing environments.

Configuration settings 🔗

The following table shows the configuration options for this monitor:

Option Required Type Description
services yes list of strings systemd services to report on
sendActiveState no bool Flag for sending metrics about the state of systemd services (default: false)
sendSubState no bool Flag for sending more detailed metrics about the state of systemd services (default: false)
sendLoadState no bool Flag for sending metrics about the load state of systemd services (default: false)

Metrics 🔗

These are the metrics available for this monitor.

Dimensions 🔗

The following dimensions might occur on metrics emitted by this monitor. Some dimensions may be specific to certain metrics.

Name Description
plugin The name of the collectd plugin. Facilitates filtering operations in the application.
systemd_service The name of the systemd service that the reported metric applies to.