Monitor Type: collectd/systemd
(Source)
Accepts Endpoints: Yes
Multiple Instances Allowed: Yes
This SignalFx Smart Agent 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 reporiting 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 SignalFx Smart Agent is running.
The agent container must also run in privilege mode. Below is an excerpt of the docker run command.
docker run ...\
--privileged \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro \
...
Below is a sample SignalFx Smart Agent YAML configuration for monitoring the state of docker
and ubuntu-fan
services. See here for SignalFx Smart Agent
configuration details.
monitors:
- type: collectd/systemd
intervalSeconds: 10
services:
- docker
- ubuntu-fan
Only the metric gauge.substate.running
, which indicates whether a service is running or not, gets reported by default.
The other metrics must be configure explicitly using the sendActiveState
, sendSubState
and sendLoadState
configuration flags (see below). The metrics are grouped into ActiveState
, SubState
and LoadState
groups.
monitors:
- type: collectd/systemd
intervalSeconds: 10
services:
- docker
- ubuntu-fan
sendActiveState: true
To activate this monitor in the Smart Agent, add the following to your agent config:
monitors: # All monitor config goes under this key
- type: collectd/systemd
... # Additional config
For a list of monitor options that are common to all monitors, see Common Configuration.
Config 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 ) |
These are the metrics available for this monitor. Metrics that are categorized as container/host (default) are in bold and italics in the list below.
gauge.active_state.activating
(gauge)
Indicates that the systemd unit/service has previously been inactive but is currently in the process of entering an active stategauge.active_state.active
(gauge)
Indicates that the systemd unit/service is activegauge.active_state.deactivating
(gauge)
Indicates that the systemd unit/service is currently in the process of deactivationgauge.active_state.failed
(gauge)
Indicates that the systemd unit/service is inactive the previous run was not successfulgauge.active_state.inactive
(gauge)
Indicates that the systemd unit/service is inactive and the previous run was successful or no previous run has taken place yetgauge.active_state.reloading
(gauge)
Indicates that the systemd unit/service is active and currently reloading its configurationgauge.load_state.error
(gauge)
Indicates that the systemd unit/service configuration failed to loadgauge.load_state.loaded
(gauge)
Indicates that the systemd unit/service configuration was loaded and parsed successfullygauge.load_state.masked
(gauge)
Indicates that the systemd unit/service is currently masked out (i.e. symlinked to /dev/null etc)gauge.load_state.not-found
(gauge)
Indicates that the systemd unit/service configuration was not foundgauge.substate.dead
(gauge)
Indicates that the systemd unit/service diedgauge.substate.exited
(gauge)
Indicates that the systemd unit/service exitedgauge.substate.failed
(gauge)
Indicates that the systemd unit/service failedgauge.substate.running
(gauge)
Indicates that the systemd unit/service is running
All of the following metrics are part of the ActiveState
metric group. All of
the non-default metrics below can be turned on by adding ActiveState
to the
monitor config option extraGroups
:
All of the following metrics are part of the LoadState
metric group. All of
the non-default metrics below can be turned on by adding LoadState
to the
monitor config option extraGroups
:
All of the following metrics are part of the SubState
metric group. All of
the non-default metrics below can be turned on by adding SubState
to the
monitor config option extraGroups
:
To emit metrics that are not default, you can add those metrics in the
generic monitor-level extraMetrics
config option. Metrics that are derived
from specific configuration options that do not appear in the above list of
metrics do not need to be added to extraMetrics
.
To see a list of metrics that will be emitted you can run agent-status monitors
after configuring this monitor in a running agent instance.
The following dimensions may 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 SignalFx app |
systemd_service |
The name of the systemd service that the reported metric applies to |