Ce check permet de surveiller Systemd ainsi que les unités qu’il gère avec l’Agent Datadog.
Surveillez l’état et la santé de votre Systemd.
Surveillez les unités, les services et les sockets gérés par Systemd.
Configuration
Installation
Le check Systemd est inclus avec le package de l’Agent Datadog. Vous n’avez donc rien à installer sur votre serveur.
Configuration
Host
Pour configurer ce check lorsque l’Agent est exécuté sur un host :
Modifiez le fichier systemd.d/conf.yaml dans le dossier conf.d/ à la racine du
répertoire de configuration de votre Agent pour commencer à recueillir vos données de performance Systemd.
Consultez le fichier d’exemple systemd.d/conf.yaml pour découvrir toutes les options de configuration disponibles.
Pour les environnements conteneurisés, montez le dossier /run/systemd/, qui contient le socket /run/systemd/private nécessaire pour récupérer les données Systemd. Exemple :
The overall cpu consumed by the service in nanoseconds (CPUUsageNSec), requires Systemd configuration CPUAccounting to be enabled and Systemd version >= 220 Shown as nanosecond
systemd.service.memory_usage (gauge)
The memory currently used by the service in bytes (MemoryCurrent), requires Systemd configuration MemoryAccounting to be enabled Shown as byte
systemd.service.restart_count (gauge)
The number of times the service has been restarted due to Restart= (NRestarts), requires Systemd version >= 235 Shown as time
systemd.service.task_count (gauge)
The current number of tasks in the service (TasksCurrent), requires Systemd configuration TasksAccounting to be enabled Shown as task
systemd.socket.connection_accepted_count (gauge)
The number of accepted socket connections (NAccepted) Shown as connection
systemd.socket.connection_count (gauge)
The current number of socket connections (NConnections) Shown as connection
systemd.socket.connection_refused_count (gauge)
The total number of refused socket connections (NRefused), requires Systemd version >= 239 Shown as connection
systemd.unit.active (gauge)
Whether the unit is currently in active state
systemd.unit.loaded (gauge)
Whether the unit is currently in loaded state
systemd.unit.monitored (gauge)
Indicates that the unit is monitored (the value is always 1)
systemd.unit.uptime (gauge)
The unit uptime in seconds since it's activation Shown as second
systemd.units_by_state (gauge)
Sum by state to count units Shown as unit
systemd.units_loaded_count (gauge)
The number of loaded units Shown as unit
systemd.units_monitored_count (gauge)
The number of monitored units Shown as unit
systemd.units_total (gauge)
The total number of units Shown as unit
Certaines métriques sont uniquement transmises si leur configuration respective est activée :
systemd.service.cpu_time_consumed nécessite l’activation de la configuration CPUAccounting de Systemd.
systemd.service.memory_usage nécessite l’activation de la configuration MemoryAccounting de Systemd.
systemd.service.task_count nécessite l’activation de la configuration TasksAccounting de Systemd.
Certaines métriques ne sont disponibles qu’à partir d’une version spécifique de Systemd :
systemd.service.cpu_time_consumed nécessite l’installation de Systemd v220.
systemd.service.restart_count nécessite l’installation de Systemd v235.
systemd.socket.connection_refused_count nécessite l’installation de Systemd v239.
Événements
Le check Systemd n’inclut aucun événement.
Checks de service
systemd.can_connect Returns OK if Systemd is reachable, CRITICAL otherwise. Statuses: ok, critical
systemd.system.state Returns OK if Systemd’s system state is running. Returns CRITICAL if the state is degraded, maintenance, or stopping. Returns UNKNOWN if the state is initializing, starting, or other. Statuses: ok, critical, unknown
systemd.unit.state Returns OK if the unit active state is active. Returns CRITICAL if the state is inactive, deactivating, or failed. Returns UNKNOWN if the state is activating or other. Statuses: ok, critical, unknown
systemd.unit.substate Returns OKCRITICAL or UNKNOWN based on the substate of the unit and the user-provided mapping in systemd.d/conf.yaml. Statuses: ok, critical, unknown