add check for rsyslogd

This commit is contained in:
seddikalaouiismaili 2020-09-11 00:24:06 +02:00 committed by kevin
parent 5fe015a90a
commit e785293064
4 changed files with 19 additions and 0 deletions

View file

@ -294,6 +294,16 @@
- service
- nagios_client
- name: install nrpe check for rsyslogd
template:
src: src={{ item }}.j2 dest=/etc/nrpe.d/{{ item }} owner=root group=root mode=0644
with_items:
- check_rsyslogd_proc.cfg
notify:
- restart nrpe
tags:
- nagios_client
- name: Check if the fedmsg group exists
shell: /usr/bin/getent group fedmsg | /usr/bin/wc -l | tr -d ' '
register: fedmsg_exists

View file

@ -0,0 +1 @@
command[check_rsyslogd_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'rsyslogd'

View file

@ -50,3 +50,10 @@ define service {
use defaulttemplate
}
define service {
hostgroup all
service_description Rsyslogd Process
check_command check_by_nrpe!check_rsyslogd_proc
use defaulttemplate
}

View file

@ -317,6 +317,7 @@ command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/spool/
command[check_auditd]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C 'auditd' -u root
command[check_cron]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'crond' -u root
command[check_varnish_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'varnishd' -u varnish
command[check_rsyslogd_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'rsyslogd'
command[check_saslauthd]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'saslauthd' -u root
command[check_readonly_fs]=/usr/lib64/nagios/plugins/check_readonly_fs
command[check_postfix_queue]=/usr/lib64/nagios/plugins/check_postfix_queue -w 2 -c 5