Showing posts with label nagios. Show all posts
Showing posts with label nagios. Show all posts

Monday, 7 November 2011

Monitor SonicWall TZ-210 with Nagios using SNMP

SonicWall uses a custom written Linux OS called SonicWall Enhanced Enabling SNMP in From nagios you can monitor the following without any setup involved from SonicWall
TO MONITOR SONICWALL FROM NAGIOS USING SNMP 1. Enable SNMP on SonicWall on all network interfaces 2. Download mibs from >>> http://www.plixer.com/support/mib_resources.php 3. TEST from Nagios snmpwalk -v1 -c public xxx.xxx.xxx.xxx ---> to view response from device YOU DO NEED! You DO need the IP address of the system/software that’s monitoring the SNMP does have to be entered on the SNMP configuration page. You DO need the checkbox on the network interface page does have to have SNMP checked. You DO NOT need to create a firewall rule allowing SNMP traffic from LAN to LAN on the firewall. When it’s configured correctly, it auto-creates one that you can’t change. You DO have to use the SonicWALL MIBs that are specific to each model of firewall.

Thursday, 3 November 2011

Wednesday, 13 July 2011

My second big Nagios site setup (July 2011)





Nagios - VMware ESXI Checks 4.1


define host{
        use                     VMware
        host_name               Vcenter
        alias                   VM Center
        address                 10.0.0.130
        }

define host{
        use                     VMware
        host_name               veam_backup
        alias                   VM Backup
        address                 10.0.0.131
        }


#monitor ping
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Vcenter,veam_backup
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }

#Root Partition monitoring
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Vcenter,veam_backup
        service_description             Root Partition
        check_command                   check_local_disk!20%!10%!/
        }

#Current Users
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Vcenter,veam_backup
        service_description             Current Users
        check_command                   check_local_users!20!50
        }



#Monitor processes
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Vcenter,veam_backup
        service_description             Total Processes
        check_command                   check_local_procs!250!400!RSZDT
        }


Nagios - Printer Checks


define host{
        use             generic-printer         ; Inherit default values from a template
        host_name       hplj2605dn              ; The name we're giving to this printer
        alias           HP LaserJet 2605dn      ; A longer name associated with the printer
        address         192.168.1.30            ; IP address of the printer
        hostgroups      network-printers        ; Host groups this printer is associated with
        }

# A hostgroup for network printers

define hostgroup{
        hostgroup_name  network-printers        ; The name of the hostgroup
        alias           Network Printers        ; Long name of the group
        }


define service{
        use                     generic-service         ; Inherit values from a template
        host_name               hplj2605dn              ; The name of the host the service is associated with
        service_description     Printer Status          ; The service description
        check_command           check_hpjd!-C public    ; The command used to monitor the service
        normal_check_interval   10      ; Check the service every 10 minutes under normal conditions
        retry_check_interval    1       ; Re-check the service every minute until its final/hard state is determined
        }


# Create a service for "pinging" the printer occassionally.  Useful for monitoring RTA, packet loss, etc.

define service{
        use                     generic-service
        host_name               hplj2605dn
        service_description     PING
        check_command           check_ping!3000.0,80%!5000.0,100%
        normal_check_interval   10
        retry_check_interval    1
        }


Nagios - Zimbra Mail Server Checks


#Define Host
define host{
        use                     linux-server
        host_name               Zmail01
        alias                   Zmail01.a24group.com
        address                 10.0.0.18
        }

#Define Host
define host{
        use                     linux-server
        host_name               a24mailer
        alias                   a24mailer.com
        address                 10.0.0.251
        }

define host{
        use                     linux-server
        host_name               Zmail03
        alias                   Zmail03.arabellahealth.co.uk
        address                 10.0.0.91
        }


define host{
        use                     linux-server
        host_name               Zimsa
        alias                   Zimsa.a24.co.za
        address                 10.0.0.252
        }


define host{
        use                     linux-server
        host_name               Zimsutton
        alias                   Zmailsutton
        address                 178.78.120.35
        }

#monitor ping
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,Zimsutton,a24mailer
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }



#Root Partition monitoring
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,Zimsutton,a24mailer
        service_description             Root Partition
        check_command                   check_local_disk!20%!10%!/
        }

#Current Users
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,Zimsutton,a24mailer
        service_description             Current Users
        check_command                   check_local_users!20!50
        }

#Monitor processes
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,Zimsutton,a24mailer
        service_description             Total Processes
        check_command                   check_local_procs!250!400!RSZDT
        }

#Monitor HTTP
define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,a24mailer
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }


define service{
        use                             local-service         ; Name of service template to use
        host_name                       Zmail01,Zmail03,Zimsa,Zimsutton,a24mailer
        service_description             IMAP
        check_command                   check_imap
        notifications_enabled           0
        }


Nagios - Linux Checks


#define host
define host{
        use                     linux-server
        host_name               Ltsp01
       alias                   LTSP01
        address                 10.0.0.17
      }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }


define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             Root Partition
        check_command                   check_local_disk!20%!10%!/
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             Current Users
        check_command                   check_local_users!20!50
        }


define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             Total Processes
        check_command                   check_local_procs!250!400!RSZDT
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             Current Load
        check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       Ltsp01
        service_description             Swap Usage
        check_command                   check_local_swap!20!10
        }
#define service{
 #       use                             local-service         ; Name of service template to use
  #      host_name                       Ltsp01
   #     service_description             HTTP
    #    check_command                   check_http
     #   notifications_enabled           0
      #  }

define service{
        use                     generic-service
        host_name               Ltsp01
        service_description     Uptime
        check_command           check_nt!UPTIME
        }


# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above


define service{
        use                     generic-service
        host_name               Ltsp01
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }


define service{
        use                     generic-service
        host_name               Ltsp01
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

Wednesday, 6 July 2011

Nagios check_website plugin setup

Define check_website command in commands.cfg


add commands to /usr/local/nagios/etc/objects/commands.cfg


# 'check_website' command definition

define command{

        command_name    check_website

        command_line    $USER1$/check_website -H $HOSTADDRESS$

        }


Download Plugin and copy to libexec


Download check_website plugin

Copy into /usr/local/nagios/libexec/change file permissions to chmod 775 check_website


Test Plugin


/usr/local/nagios/libexec/ ./check_website -H (hostname) -F (file)

Nagios preflight checks


Friday, 1 July 2011

Nagios, change web login password

SSH into Nagios
sudo -s
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin (enter)
type new password
verify password