Nagios
Jump to navigation
Jump to search
NRPE Checks[edit]
- you have nagios server and you have nagios-nrpe on the remote machine - default listen port 5666
- 1. define check_nrpe command
<source lang=bash>
define command { command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 100 command_name check_nrpe }
</source>
- 2. check_nrpe used in a service check
<source lang=bash>
define service { ... check_command check_nrpe!check_load }
</source>
- 3. On the remote host
<source lang=bash>
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
</source>
Custom Nagios Checks[edit]
Perc6/ir[edit]
- Download check_perc_6ir.pl
Options[edit]
- con: Controller Status
- log: Logical Device Status
- phys:Physical Device Status
Full Commands[edit]
- Physical Device Status
<source lang=bash> ./check_perc.pl -D phys -T sm -H <host> -C <community> Physical Disks - #4: REBUILDING </source>
- Logical Device Status
<source lang=bash>./check_perc.pl -D log -T sm -H <host> -C <community> Logical Disks - #1: DEGRADED #2: READY </source>
- Controller Status
<source lang=bash> ./check_perc.pl -D con -T sm -H <host> -C <community> Controller(s) - #1: READY </source>
Nagios Configs[edit]
<source lang=bash>
# Define Service define service { ... check_command check_dell_perc_6ir!<community>!phys # OR controller, logical #check_command check_dell_perc_6ir!<community>!con #check_command check_dell_perc_6ir!<community>!log
} </source> <source lang=bash> define command {
command_line /etc/ISOMEDIA/nrpe/check_perc.pl -D $ARG2$ -T sm -H $HOSTADDRESS$ -C $ARG1$ command_name check_dell_perc_6ir
} </source>
OpenVPN[edit]
- 1. Enable Managment PORT for OpenVPN server - server.conf
<source lang=bash>
management localhost 7505 /etc/openvpn/config/password
</source>
- 2. NRPE check - nrpe.cfg
<source lang=bash>
command[check_openvpn]=/usr/lib64/nagios/plugins/check_tcp -H localhost -p 7505 -E -s 'YOUR_PASSWORD_HERE\nload-stats\n' -e 'SUCCESS:' -q 'quit\n'
</source>
- 3. Nagios Service Check
- on server
<source lang=bash>
define service { ... check_command check_nrpe!check_openvpn }
</source>
xl2tp/ipsec[edit]
- nrpe
- /etc/nagios/nrpe.cfg
<source lang=bash>
command[check_xl2tp]=/usr/lib64/nagios/plugins/check_procs -a 'xl2tpd' -c1:2 command[check_racoon]=/usr/lib64/nagios/plugins/check_procs -a 'racoon' -c1:2
</source>
Zimbra[edit]
- sudoers
- /etc/sudoers
<source lang=bash>
%nagios ALL=NOPASSWD:/usr/local/bin/check_zmstatus.pl
</source>
- nrpe
- /etc/nagios/nrpe.cfg
<source lang=bash>
command[check_zmstatus]=sudo /usr/local/bin/check_zmstatus.pl -b $ARG1$
</source>
- Download
- check_zmstatus.pl
NewzNab[edit]
- checks mysql to make sure everything is current
- Parts are current
- Releases are current
- PostProcessing is not behind
- NFO post processing is not behind
- Download Check check_nn.pl
Pacemaker crm_mon cluster[edit]
- verify cluster is OK
- Download Check check_crm
BIND mounts[edit]
- Verify ALL bind mounts in /etc/fstab are mounted
- Download Check check_bind_mounts.pl
NFS mounts[edit]
- Verify ALL NFS mounts in /etc/fstab are mounted
- Download Check check_nfs_mounts.pl
DRBD resources[edit]
- Verify DRBD resources are OK
- Download Check check_drbd
virsh / kvm hosts[edit]
- Verify ALL kvm hosts are running - or specific
- Download Check Check_kvm.sh
mdadm software raid[edit]
- Verify software raid is OK
- Download Check check_raid