Add checks for some common Systemd units

This commit is contained in:
Salt 2021-08-18 19:05:16 -05:00
parent 051fee73d3
commit 94edbeafd9
2 changed files with 48 additions and 0 deletions

View File

@ -34,6 +34,22 @@
check_users:
script: check_users
option: -w 3 -c 5
nrpe_command_extra:
check_systemd_ansiblepull_service:
script: /usr/local/bin/monitoring-scripts/check_systemd_unit
option: ansible-pull.service
check_systemd_ansiblepull_timer:
script: /usr/local/bin/monitoring-scripts/check_systemd_unit
option: ansible-pull.timer
check_systemd_backup_service:
script: /usr/local/bin/monitoring-scripts/check_systemd_unit
option: backup.service
check_systemd_backup_timer:
script: /usr/local/bin/monitoring-scripts/check_systemd_unit
option: backup.timer
check_systemd_docker_service:
script: /usr/local/bin/monitoring-scripts/check_systemd_unit
option: docker.service
tags: [ nrpe ]
- hosts: all
tasks:

View File

@ -108,6 +108,38 @@ define service {
check_command check_nrpe!check_load
hostgroup_name nagios-nrpe
}
# Systemd unit checks
define service {
use ansible-generic-service
service_description NRPE Check Unit backup.service
check_command check_nrpe!check_systemd_backup_service
hostgroup_name nagios-nrpe
}
define service {
use ansible-generic-service
service_description NRPE Check Unit backup.timer
check_command check_nrpe!check_systemd_backup_timer
hostgroup_name nagios-nrpe
}
define service {
use ansible-generic-service
service_description NRPE Check Unit ansible-pull.service
check_command check_nrpe!check_systemd_ansiblepull_service
hostgroup_name ansible-pull
}
define service {
use ansible-generic-service
service_description NRPE Check Unit ansible-pull.timer
check_command check_nrpe!check_systemd_ansiblepull_timer
hostgroup_name ansible-pull
}
define service {
use ansible-generic-service
service_description NRPE Check Unit docker.service
check_command check_nrpe!check_systemd_docker_service
hostgroup_name nagios-nrpe
}
# Swap
define service {
use ansible-generic-service
service_description NRPE Check Swap