From 6cf81802bef8bd41c79f94f6ea1ab15b885aedb3 Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Wed, 22 Apr 2020 14:30:26 +0200 Subject: [PATCH] Reordering of the list of NRPE checks With deletion of unused check_onduleur and correction of check_connections_state location --- roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 b/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 index 1351b28..2b33b5c 100644 --- a/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 +++ b/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 @@ -8,34 +8,43 @@ # Allowed IPs allowed_hosts={{ nagios_nrpe_allowed_hosts | join(',') }} +# System checks command[check_users]=/usr/local/libexec/nagios/check_users -w 5 -c 10 command[check_load]=/usr/local/libexec/nagios/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/local/libexec/nagios/check_disk -x /lib/init/rw -x /dev -x /dev/shm -w 10% -c 3% -W 10% -K 3% -C -w 5% -c 2% -W 5% -K 2% -p /home command[check_zombie_procs]=/usr/local/libexec/nagios/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/libexec/nagios/check_procs -w 150 -c 200 -command[check_imap]=/usr/local/libexec/nagios/check_imap -H localhost +command[check_swap]=/usr/local/libexec/nagios/check_swap --no-swap=ok -a -w 30% -c 20% + +# Generic services checks command[check_smtp]=/usr/local/libexec/nagios/check_smtp -H localhost -f {{ general_alert_email }} command[check_dns]=/usr/local/libexec/nagios/check_dns -H evolix.net -command[check_swap]=/usr/local/libexec/nagios/check_swap --no-swap=ok -a -w 30% -c 20% command[check_ntp]=/usr/local/libexec/nagios/check_ntp -H ntp.evolix.net -command[check_http]=/usr/local/libexec/nagios/check_http -H localhost -p 80 -command[check_onduleur]=/usr/local/libexec/nagios/check_ups -H localhost -u onduleur -command[check_mailq]=doas /usr/local/libexec/nagios/check_mailq -w 10 -c 20 -command[check_bind]=/usr/local/libexec/nagios/check_dig -l evolix.net -H localhost command[check_ssh]=/usr/local/libexec/nagios/check_ssh -p 22 localhost +command[check_mailq]=doas /usr/local/libexec/nagios/check_mailq -w 10 -c 20 + +# Specific services checks +command[check_imap]=/usr/local/libexec/nagios/check_imap -H localhost +command[check_http]=/usr/local/libexec/nagios/check_http -H localhost -p 80 +command[check_bind]=/usr/local/libexec/nagios/check_dig -l evolix.net -H localhost command[check_proxy]=/usr/local/libexec/nagios/check_tcp -p PORT +command[check_smb]=/usr/local/libexec/nagios/check_tcp -H IPLOCALE -p 445 +command[check_mysql]=/usr/local/libexec/nagios/check_mysql -H 127.0.0.1 -f /etc/nrpe.d/.my.cnf #command[check_vpn]=/usr/local/libexec/nagios/check_ping -H IPDISTANTE -p 1 -w 5000,100% -c 5000,100% -command[check_vpn]=doas /usr/local/libexec/nagios/plugins/check_ipsecctl.sh IPDISTANTE IPLOCALE "VPN MARSEILLE-ROME" +command[check_dhcpd]=doas /usr/local/libexec/nagios/check_dhcp -i INTERFACE -s IP -u + +# Local checks (not packaged) command[check_openvpn]=/usr/local/libexec/nagios/plugins/check_openvpn.pl -H 127.0.0.1 -p 1195 -P PASSWORD #command[check_openvpn]=/usr/local/libexec/nagios/plugins/check_openvpn # Wrapper of check_openvpn.pl, to use when the server is CARP backup and OpenVPN should not run -command[check_pf_states]=doas /usr/local/libexec/nagios/plugins/check_pf_states command[check_carp1]=/usr/local/libexec/nagios/plugins/check_carp_if carp0 master command[check_mem]=/usr/local/libexec/nagios/plugins/check_free_mem.sh -w 20 -c 10 -command[check_dhcpd]=doas /usr/local/libexec/nagios/check_dhcp -i INTERFACE -s IP -u -command[check_smb]=/usr/local/libexec/nagios/check_tcp -H IPLOCALE -p 445 -#command[check_ospfd]=doas /usr/local/libexec/nagios/plugins/check_ospfd -#command[check_ospf6d]=doas /usr/local/libexec/nagios/plugins/check_ospf6d +command[check_vpn]=doas /usr/local/libexec/nagios/plugins/check_ipsecctl.sh IPDISTANTE IPLOCALE "VPN MARSEILLE-ROME" +command[check_pf_states]=doas /usr/local/libexec/nagios/plugins/check_pf_states +command[check_ospfd]=doas /usr/local/libexec/nagios/plugins/check_ospfd +command[check_ospf6d]=doas /usr/local/libexec/nagios/plugins/check_ospf6d command[check_ospfd_simple]=doas /usr/local/libexec/nagios/plugins/check_ospfd_simple command[check_bgpd]=doas /usr/local/libexec/nagios/plugins/check_openbgpd -u -command[check_mysql]=/usr/local/libexec/nagios/check_mysql -H 127.0.0.1 -f /etc/nrpe.d/.my.cnf -command[check_connections_state]=doas /usr/local/libexec/nagios/check_connections_state.sh +command[check_connections_state]=doas /usr/local/libexec/nagios/plugins/check_connections_state.sh + +# This is an Ansible managed file ! +# For local modifications use the /etc/nrpe.d/zzz-evolix.cfg file instead