https://rarforge.com/w/index.php?title=Nagios&feed=atom&action=history
Nagios - Revision history
2024-03-28T21:27:32Z
Revision history for this page on the wiki
MediaWiki 1.39.3
https://rarforge.com/w/index.php?title=Nagios&diff=420&oldid=prev
Robertr: /* Perc6/ir */
2013-03-05T23:17:37Z
<p><span dir="auto"><span class="autocomment">Perc6/ir</span></span></p>
<p><b>New page</b></p><div>[[Category:rarforge]]<br />
[[Category:monitoring]]<br />
[[Category:services]]<br />
<br />
<br />
== NRPE Checks ==<br />
* you have nagios server and you have nagios-nrpe on the remote machine - default listen port 5666<br />
<br />
<br />
; 1. define check_nrpe command<br />
<source lang=bash><br />
define command {<br />
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 100<br />
command_name check_nrpe<br />
}<br />
</source><br />
<br />
; 2. check_nrpe used in a service check<br />
<source lang=bash><br />
define service {<br />
...<br />
check_command check_nrpe!check_load<br />
}<br />
</source><br />
<br />
; 3. On the remote host<br />
<source lang=bash><br />
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20<br />
</source><br />
<br />
== Custom Nagios Checks ==<br />
<br />
=== Perc6/ir ===<br />
;Download [[Media:check_perc_6ir.pl|check_perc_6ir.pl]]<br />
==== Options ====<br />
<br />
# con: Controller Status <br />
# log: Logical Device Status<br />
#phys:Physical Device Status<br />
<br />
==== Full Commands ====<br />
;Physical Device Status<br />
<source lang=bash> <br />
./check_perc.pl -D phys -T sm -H <host> -C <community><br />
Physical Disks - #4: REBUILDING<br />
</source><br />
<br />
;Logical Device Status<br />
<source lang=bash>./check_perc.pl -D log -T sm -H <host> -C <community><br />
Logical Disks - #1: DEGRADED #2: READY<br />
</source><br />
<br />
;Controller Status<br />
<source lang=bash> <br />
./check_perc.pl -D con -T sm -H <host> -C <community><br />
Controller(s) - #1: READY<br />
</source><br />
<br />
==== Nagios Configs ====<br />
<source lang=bash><br />
# Define Service<br />
define service {<br />
...<br />
check_command check_dell_perc_6ir!<community>!phys<br />
# OR controller, logical<br />
#check_command check_dell_perc_6ir!<community>!con<br />
#check_command check_dell_perc_6ir!<community>!log<br />
}<br />
</source><br />
<source lang=bash><br />
define command {<br />
command_line /etc/ISOMEDIA/nrpe/check_perc.pl -D $ARG2$ -T sm -H $HOSTADDRESS$ -C $ARG1$<br />
command_name check_dell_perc_6ir<br />
}<br />
</source><br />
<br />
=== OpenVPN ===<br />
----<br />
<br />
; 1. Enable Managment PORT for OpenVPN server - ''server.conf''<br />
<source lang=bash><br />
management localhost 7505 /etc/openvpn/config/password<br />
</source><br />
<br />
; 2. NRPE check - ''nrpe.cfg''<br />
<source lang=bash><br />
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'<br />
</source><br />
<br />
; 3. Nagios Service Check<br />
* on server<br />
<source lang=bash><br />
define service {<br />
...<br />
check_command check_nrpe!check_openvpn<br />
}<br />
</source><br />
<br />
=== xl2tp/ipsec ===<br />
----<br />
; nrpe: /etc/nagios/nrpe.cfg<br />
<source lang=bash><br />
command[check_xl2tp]=/usr/lib64/nagios/plugins/check_procs -a 'xl2tpd' -c1:2<br />
command[check_racoon]=/usr/lib64/nagios/plugins/check_procs -a 'racoon' -c1:2<br />
</source><br />
<br />
<br />
=== Zimbra ===<br />
----<br />
; sudoers: /etc/sudoers<br />
<source lang=bash><br />
%nagios ALL=NOPASSWD:/usr/local/bin/check_zmstatus.pl<br />
</source><br />
<br />
; nrpe: /etc/nagios/nrpe.cfg<br />
<source lang=bash><br />
command[check_zmstatus]=sudo /usr/local/bin/check_zmstatus.pl -b $ARG1$<br />
</source><br />
<br />
; Download: [[Media:Check_zmstatus.pl|check_zmstatus.pl]]<br />
<br />
=== NewzNab ===<br />
----<br />
* checks mysql to make sure everything is current<br />
# Parts are current<br />
# Releases are current<br />
# PostProcessing is not behind<br />
# NFO post processing is not behind<br />
<br />
; Download Check [[Media:check_nn.pl|check_nn.pl]]<br />
<br />
<br />
=== Pacemaker crm_mon cluster ===<br />
----<br />
* verify cluster is OK<br />
; Download Check [[Media:Check_crm|check_crm]]<br />
<br />
=== BIND mounts ===<br />
----<br />
* Verify ALL bind mounts in /etc/fstab are mounted<br />
; Download Check [[Media:check_bind_mounts.pl|check_bind_mounts.pl]]<br />
<br />
=== NFS mounts ===<br />
----<br />
* Verify ALL NFS mounts in /etc/fstab are mounted<br />
; Download Check [[Media:check_nfs_mounts.pl|check_nfs_mounts.pl]]<br />
<br />
=== DRBD resources ===<br />
----<br />
* Verify DRBD resources are OK<br />
; Download Check [[Media:check_drbd|check_drbd]]<br />
<br />
=== virsh / kvm hosts ===<br />
----<br />
* Verify ALL kvm hosts are running - or specific<br />
; Download Check [[Media:Check_kvm.sh|Check_kvm.sh]]<br />
<br />
=== mdadm software raid ===<br />
----<br />
* Verify software raid is OK<br />
; Download Check [[Media:check_raid|check_raid]]</div>
Robertr