Nagios

From RARFORGE
Jump to: navigation, search


Contents

NRPE Checks

  • you have nagios server and you have nagios-nrpe on the remote machine - default listen port 5666


1. define check_nrpe command
  define command {
         command_line                    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 100
         command_name                    check_nrpe
 }
2. check_nrpe used in a service check
 define service {
  ...
  check_command                   check_nrpe!check_load
 }
3. On the remote host
 command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20

Custom Nagios Checks

Perc6/ir

Download check_perc_6ir.pl

Options

  1. con: Controller Status
  2. log: Logical Device Status
  3. phys:Physical Device Status

Full Commands

Physical Device Status
 
./check_perc.pl -D phys -T sm -H <host> -C <community>
Physical Disks - #4: REBUILDING
Logical Device Status
./check_perc.pl -D log -T sm -H <host> -C <community>
Logical Disks - #1: DEGRADED #2: READY
Controller Status
 
./check_perc.pl -D con -T sm -H <host> -C <community>
Controller(s) - #1: READY

Nagios Configs

 # 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
}
define command {
        command_line                    /etc/ISOMEDIA/nrpe/check_perc.pl -D $ARG2$ -T sm -H $HOSTADDRESS$ -C  $ARG1$
        command_name                    check_dell_perc_6ir
}

OpenVPN


1. Enable Managment PORT for OpenVPN server - server.conf
 management localhost 7505 /etc/openvpn/config/password
2. NRPE check - nrpe.cfg
 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'
3. Nagios Service Check
  • on server
 define service {
  ...
  check_command                   check_nrpe!check_openvpn
 }

xl2tp/ipsec


nrpe
/etc/nagios/nrpe.cfg
 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


Zimbra


sudoers
/etc/sudoers
 %nagios ALL=NOPASSWD:/usr/local/bin/check_zmstatus.pl
nrpe
/etc/nagios/nrpe.cfg
 command[check_zmstatus]=sudo /usr/local/bin/check_zmstatus.pl -b $ARG1$
Download
check_zmstatus.pl

NewzNab


  • checks mysql to make sure everything is current
  1. Parts are current
  2. Releases are current
  3. PostProcessing is not behind
  4. NFO post processing is not behind
Download Check check_nn.pl


Pacemaker crm_mon cluster


  • verify cluster is OK
Download Check check_crm

BIND mounts


  • Verify ALL bind mounts in /etc/fstab are mounted
Download Check check_bind_mounts.pl

NFS mounts


  • Verify ALL NFS mounts in /etc/fstab are mounted
Download Check check_nfs_mounts.pl

DRBD resources


  • Verify DRBD resources are OK
Download Check check_drbd

virsh / kvm hosts


  • Verify ALL kvm hosts are running - or specific
Download Check Check_kvm.sh

mdadm software raid


  • Verify software raid is OK
Download Check check_raid
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Toolbox