Docs » Available host and application monitors » Configure application receivers for hosts and servers » systemd

systemd 🔗

Description 🔗

The Splunk Distribution of OpenTelemetry Collector provides this integration as the collectd/systemd monitor type using the Smart Agent Receiver.

Use this integration to collect metrics about the state of configured systemd services.

This monitor is available on Kubernetes and Linux.

Benefits 🔗

After you configure the integration, you can access these features:

Requirements 🔗

This integration reads the status of systemd services from /var/run/dbus/system_bus_socket. You must mount the host location to the container in which the Collector or the Smart Agent is running. The agent container must also run in privileged 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 🔗

Follow these steps to deploy this integration:

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

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

  3. Restart the Splunk Distribution of OpenTelemetry Collector.

Configuration 🔗

This monitor type is available in the Smart Agent Receiver, which is part of the Splunk Distribution of OpenTelemetry Collector. You can use existing Smart Agent monitors as OpenTelemetry Collector metric receivers with the Smart Agent Receiver.

This monitor type requires a properly configured environment on your system in which you’ve installed a functional Smart Agent release bundle. The Collector provides this bundle in the installation paths for x86_64/amd64.

To activate this monitor type in the Collector, add the following lines to your configuration (YAML) file:

Note

Provide a systemd monitor entry in your Smart Agent or Collector configuration. Use the appropriate form for your agent type.

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

To complete the monitor activation, you must also include the smartagent/systemd receiver item in a metrics pipeline. To do this, add the receiver item to the service > pipelines > metrics > receivers section of your configuration file. For example:

service:
  pipelines:
    metrics:
      receivers: [smartagent/systemd]

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

By default, the gauge.substate.running metrics, which indicates whether a service is running or not, is the only metric reported. Configure additional metrics using the sendActiveState, sendSubState, and sendLoadState configuration flags, as shown in the following example:

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

See Install and configure the SignalFx Smart Agent for an autogenerated example of a YAML configuration file, with default values where applicable.

Configuration settings 🔗

The following table shows the configuration options for this monitor:

Option

Required

Type

Description

services

Yes

list of strings

Services to report on.

sendActiveState

No

bool

Flag for sending metrics about the state of systemd services. The default value is false.

sendSubState

No

bool

Flag for sending more detailed metrics about the state of systemd services. The default value is false.

sendLoadState

No

bool

Flag for sending metrics about the load state of systemd services. The default value is false.

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 integration assigns the name of monitored services to the systemd_service dimension.

Metrics 🔗

The following metrics are available for this integration:

Get help 🔗

If you are not able to see your data in Splunk Observability Cloud, try these tips:

To learn about even more support options, see Splunk Customer Success.