Page 1 of 3

Help!?

Posted: Fri Feb 22, 2013 12:48 pm
by JW21a
I have modified my switch.cfg file to reflect the actual ports on the internetworking devices and change the path of the mrtg log file to reflect the check_mrtgraf command.

Here are the error messages:
susetestbox:/usr/local/nagios/etc/objects # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Code: Select all

Nagios Core 3.4.4
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 01-12-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/windows.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/switch.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: Service check command 'check_mrtgtraf' specified in service 'Port Ethernet 0/1.8 Bandwidth Usage' for host 'AshburnASA' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEThernet 0/1 Bandwidth Usage' for host 'AshburnVPN' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEthernet 0/1 Bandwidth Usage' for host 'Bridge-SW1_105-Carnegie' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEthernet 0/1 Bandwidth Usage' for host 'Bridge-SW2_105-Carnegie' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEthernet 0/1 Bandwidth Usage' for host 'Bridge-SW_Overlook' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port Ethernet 0/1 Bandwidth Usage' for host 'CiscoASA' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port 1 Bandwidth Usage' for host 'FortiAnalyzer' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port 5 Bandwidth Usage' for host 'FortiGate' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 0/1 Bandwidth Usage' for host 'ISR1_Rockville' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 0/1 Bandwidth Usage' for host 'Langenfeld BBR1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEThernet 0/1 Bandwidth Usage' for host 'Langenfeld SW1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 0/1 Bandwidth Usage' for host 'Langenfeld Spare' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 0/1 Bandwidth Usage' for host 'Munich-CCME' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEThernet 0/1 Bandwidth Usage' for host 'Munich-Edge' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port Fastethernet 0/1 Bandwidth Usage' for host 'Munich-SW' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port 1 Bandwidth Usage' for host 'Opengear' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 1/1 Bandwidth Usage' for host 'Overlook Core A' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 1/1 Bandwidth Usage' for host 'Overlook Core B' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 1/1 Bandwidth Usage' for host 'Overlook Core C' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 1/1 Bandwidth Usage' for host 'Overlook Core D' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEThernet 0/1 Bandwidth Usage' for host 'Overlook SW1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEThernet 0/1 Bandwidth Usage' for host 'Overlook SW2' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEThernet 0/1 Bandwidth Usage' for host 'Overlook SW3' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEThernet 0/1 Bandwidth Usage' for host 'Overlook-VGW' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port 1 Bandwidth Usage' for host 'RadPharm-WLC1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port Ethernet 0/3 Bandwidth Usage' for host 'RadPharmASA' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEThernet 1/1 Bandwidth Usage' for host 'SW-Core-1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port GigabitEthernet 0/1 Bandwidth Usage' for host 'Shanghai BBR' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEthernet 0/1 Bandwidth Usage' for host 'Shanghai SW1' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port FastEthernet 0/1 Bandwidth Usage' for host 'Shanghai SW2' not defined anywhere!
Error: Service check command 'check_mrtgtraf' specified in service 'Port Ethernet 1 Bandwidth Usage' for host 'VPN3005' not defined anywhere!
        Checked 139 services.
Checking hosts...
        Checked 33 hosts.
Checking host groups...
        Checked 3 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 1 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 24 commands.
Checking time periods...
        Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   31

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.
Sample switch.cfg file:

Code: Select all

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR
        service_description     Port GigabitEthernet 0/1 Bandwidth Usage
        check_command           check_mrtgtraf!/usr/local/nagios/lib/mrtg/172.16.48.2_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR
        service_description     Port GigabitEthernet 0/1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

Re: Help!?

Posted: Fri Feb 22, 2013 2:27 pm
by abrist
You will need to create a command directive for 'check_mrtgtraf' in your commands.cfg file: http://nagiosplugins.org/man/check_mrtgtraf
Could you post a copy of your commands.cfg file?

Re: Help!?

Posted: Fri Feb 22, 2013 2:59 pm
by JW21a
Thank you, Abrist.

Current Command.cfg file:

Code: Select all

susetestbox:/usr/local/nagios/etc/objects # more commands.cfg
###############################################################################
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 3.4.4
#
# Last Modified: 05-31-2007
#
# NOTES: This config file provides you with some example command definitions
#        that you can reference in host, service, and contact definitions.
#
#        You don't need to keep commands in a separate file from your other
#        object definitions.  This has been done just to make things easier to
#        understand.
#
###############################################################################

################################################################################
#
# SAMPLE NOTIFICATION COMMANDS
#
# These are some example notification commands.  They may or may not work on
# your system without modification.  As an example, some systems will require
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
#
################################################################################

# 'notify-host-by-email' command definition
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nS
tate: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICA
TIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICE
DESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$S
ERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CON
TACTEMAIL$
        }

################################################################################
#
# SAMPLE HOST CHECK COMMANDS
#
################################################################################

# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }

################################################################################
#
# SAMPLE SERVICE CHECK COMMANDS
#
# These are some example service check commands.  They may or may not work on
# your system, as they must be modified for your plugins.  See the HTML
# documentation on the plugins for examples of how to configure command definitions.
#
# NOTE:  The following 'check_local_...' functions are designed to monitor
#        various metrics on the host that Nagios is running on (i.e. this one).
################################################################################

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }

# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }

# 'check_local_procs' command definition
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }

# 'check_local_users' command definition
define command{
        command_name    check_local_users
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
        }

# 'check_local_swap' command definition
define command{
        command_name    check_local_swap
        command_line    $USER1$/check_swap -w $ARG1$ -c $ARG2$
        }

# 'check_local_mrtgtraf' command definition
define command{
        command_name    check_local_mrtgtraf
        command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
        }

################################################################################
# NOTE:  The following 'check_...' commands are used to monitor services on
#        both local and remote hosts.
################################################################################

# 'check_ftp' command definition
define command{
        command_name    check_ftp
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
        }

# 'check_hpjd' command definition
define command{
        command_name    check_hpjd
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
        }

# 'check_snmp' command definition
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }

# 'check_ssh' command definition
define command{
        command_name    check_ssh
        command_line    $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
        }

# 'check_dhcp' command definition
define command{
        command_name    check_dhcp
        command_line    $USER1$/check_dhcp $ARG1$
        }

# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
        }

# 'check_pop' command definition
define command{
        command_name    check_pop
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
        }

# 'check_imap' command definition
define command{
        command_name    check_imap
        command_line    $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
        }

# 'check_smtp' command definition
define command{
        command_name    check_smtp
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
        }

# 'check_tcp' command definition
define command{
        command_name    check_tcp
        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
        }

# 'check_udp' command definition
define command{
        command_name    check_udp
        command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
        }

# 'check_nt' command definition
define command{
        command_name    check_nt
        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
        }

################################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services).  If you
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################

# 'process-host-perfdata' command definition
define command{
        command_name    process-host-perfdata
        command_line    /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTE
XECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
        }

# 'process-service-perfdata' command definition
define command{
        command_name    process-service-perfdata
        command_line    /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\
t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/
service-perfdata.out
        }

Re: Help!?

Posted: Fri Feb 22, 2013 3:04 pm
by JW21a
I reverted back to original switch.cfg. The services for each internetworking device are displaying the wrong port status. Please review the uploaded file attachment.

Re: Help!?

Posted: Fri Feb 22, 2013 3:20 pm
by abrist
You should refrain from changing too much in between support posts as moving targets are hard to pin down. Your issue with check_mrtgraf not defined was due to your check having a different name, check_local_mrtgraf:

Code: Select all

# 'check_local_mrtgtraf' command definition
define command{
        command_name    check_local_mrtgtraf
        command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
        }
When defining a service check, you will use the command_name, no the actual name of the binary/script (unless they are named the same in the command definition).

Your new problem may be related to the permissions of the mrtg log file.

Code: Select all

ls -la /usr/local/nagios/lib/ | grep mrtg
ls -la /usr/local/nagios/lib/mrtg/
Could you post the current switch.cfg that you are using if it is different than the one you already posted, and have you made any changes to the commands.cfg since posting?

Re: Help!?

Posted: Mon Mar 04, 2013 1:32 pm
by JW21a

Code: Select all

###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################

# Create a service to PING to switch

define service{
        use                     generic-service ; Inherit values from a template
        host_name               VPN3005		; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }
[7m--More--(25%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               CiscoASA	; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiGate	; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiAnalyzer   ; The name of the host the service is associated with
        service_description     PING            ; The service description
[7m--More--(28%)[27m
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW2_105-Carnegie ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core A ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

[7m--More--(30%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core B ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core D ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core C ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
[7m--More--(33%)[27m
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW1_105-Carnegie ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW_Overlook ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
[7m--More--(35%)[27m
        use                     generic-service ; Inherit values from a template
        host_name               RadPharm-WLC1   ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW1    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW2    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
[7m--More--(38%)[27m
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW3    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharmASA     ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(41%)[27m
        host_name               Overlook-VGW    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-CCME     ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-Edge     ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
[7m--More--(43%)[27m
        }[K

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-SW       ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               SW-Core-1       ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnVPN      ; The name of the host the service is associated with
[7m--More--(46%)[27m
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Opengear        ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               ISR1_Rockville  ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }
[7m--More--(48%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnASA      ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld BBR1 ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld SW1  ; The name of the host the service is associated with
        service_description     PING            ; The service description
[7m--More--(51%)[27m
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld Spare; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW1    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

[7m--More--(53%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW2    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR    ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

# Monitor uptime via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               VPN3005
[7m--More--(56%)[27m
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               CiscoASA 
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiGate
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiAnalyzer
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
[7m--More--(57%)[27m
        }[K

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW2_105-Carnegie
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core A
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core B
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

[7m--More--(58%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core D
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core C
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW1_105-Carnegie
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(60%)[27m
        host_name               Bridge-SW_Overlook
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharm-WLC1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW2
        service_description     Uptime
[7m--More--(61%)[27m
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW3
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharmASA
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook-VGW
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }
[7m--More--(62%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-CCME
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-Edge
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-SW
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
[7m--More--(64%)[27m
        use                     generic-service ; Inherit values from a template
        host_name               SW-Core-1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnVPN
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Opengear
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               ISR1_Rockville
[7m--More--(65%)[27m
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnASA
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld BBR1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld SW1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
[7m--More--(67%)[27m
        }[K

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld Spare
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW1
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW2
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

[7m--More--(68%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR
        service_description     Uptime
        check_command           check_snmp!-C jnnfgErD -o sysUpTime.0
        }

# Monitor Port 1 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               VPN3005
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               CiscoASA
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

[7m--More--(69%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiGate
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiAnalyzer
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW2_105-Carnegie
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(71%)[27m
        host_name               Overlook Core A
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core B
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core D
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core C
        service_description     Port 1 Link Status
[7m--More--(72%)[27m
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW1_105-Carnegie
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW_Overlook
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharm-WLC1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }
[7m--More--(74%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW2
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW3
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
[7m--More--(75%)[27m
        use                     generic-service ; Inherit values from a template
        host_name               RadPharmASA
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook-VGW
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-CCME
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-Edge
[7m--More--(77%)[27m
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-SW
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               SW-Core-1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnVPN
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
[7m--More--(79%)[27m
        }[K

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Opengear
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               ISR1_Rockville
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnASA
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

[7m--More--(80%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld BBR1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld SW1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld Spare
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(82%)[27m
        host_name               Shanghai SW1
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW2
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR
        service_description     Port 1 Link Status
        check_command           check_snmp!-C jnnfgErD -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }

# Monitor bandwidth via MRTG logs

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(83%)[27m
        host_name               VPN3005
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.17_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               CiscoASA
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.18_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiGate
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.21_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               FortiAnalyzer
        service_description     Port 1 Bandwidth Usage
[7m--More--(85%)[27m
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.22_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW2_105-Carnegie
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.50_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core A
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.51_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core B
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.52_1.log!AVG!1000000,1000000!5000000,5000000!10
        }
[7m--More--(87%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core D
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.53_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook Core C
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.54_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW1_105-Carnegie
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.55_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
[7m--More--(88%)[27m
        use                     generic-service ; Inherit values from a template
        host_name               Bridge-SW_Overlook
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.56_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharm-WLC1
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.57_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW1
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.66_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW2
[7m--More--(90%)[27m
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.0.67_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook SW3
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.217.5.162_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RadPharmASA
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.228.0.1_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Overlook-VGW
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.237.0.7_1.log!AVG!1000000,1000000!5000000,5000000!10
[7m--More--(92%)[27m
        }[K

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-CCME
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.247.0.1_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-Edge
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.247.0.5_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Munich-SW
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/10.247.0.10_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

[7m--More--(94%)[27m
define service{
        use                     generic-service ; Inherit values from a template
        host_name               SW-Core-1
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.2.2_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnVPN
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.2.210_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Opengear
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.2.166_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
[7m--More--(95%)[27m
        host_name               ISR1_Rockville
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.2.210_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               AshburnASA
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.8.4_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld BBR1
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.4.28_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld SW1
        service_description     Port 1 Bandwidth Usage
[7m--More--(97%)[27m
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.4.29_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Langenfeld Spare
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.4.30_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW1
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.48.154_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai SW2
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.48.5_1.log!AVG!1000000,1000000!5000000,5000000!10
        }
[7m--More--(99%)[27m

[K
define service{
        use                     generic-service ; Inherit values from a template
        host_name               Shanghai BBR
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/lib/mrtg/172.16.48.2_1.log!AVG!1000000,1000000!5000000,5000000!10
        }

Re: Help!?

Posted: Mon Mar 04, 2013 1:33 pm
by JW21a

Code: Select all

Stats:
susetestbox:/usr/local/nagios/etc/objects # ls -la /usr/local/nagios/lib/ | grep mrtg
-rwxr-xr-x 1 nagios nagios  80308 Feb 21 14:58 check_mrtg
-rwxr-xr-x 1 nagios nagios  80855 Feb 21 14:58 check_mrtgtraf


susetestbox:/usr/local/nagios/etc/objects # ls -la /usr/local/nagios/lib/
check_apt           check_file_age      check_ircd          check_nntps         check_real          check_time
check_breeze        check_flexlm        check_jabber        check_nt            check_rpc           check_udp
check_by_ssh        check_fping         check_ldap          check_ntp           check_sensors       check_ups
check_clamd         check_ftp           check_ldaps         check_ntp_peer      check_simap         check_users
check_cluster       check_hpjd          check_load          check_ntp_time      check_smtp          check_wave
check_dhcp          check_http          check_log           check_nwstat        check_snmp          negate
check_dig           check_icmp          check_mailq         check_oracle        check_spop          urlize
check_disk          check_ide_smart     check_mrtg          check_overcr        check_ssh           utils.pm
check_disk_smb      check_ifoperstatus  check_mrtgtraf      check_ping          check_ssmtp         utils.sh
check_dns           check_ifstatus      check_nagios        check_pop           check_swap
check_dummy         check_imap          check_nntp          check_procs         check_tcp

more switch.cfg
###############################################################################
# SWITCH.CFG - SAMPLE CONFIG FILE FOR MONITORING A SWITCH
#
# Last Modified: 02-21-2013
#
# NOTES: This config file assumes that you are using the sample configuration
#        files that get installed with the Nagios quickstart guide.
#
###############################################################################

###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################

# Define the switch that we'll be monitoring

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       VPN3005  	        ; The name we're giving to this switch
[7m--More--(1%)[27m
        alias           VPN3005			; A longer name associated with the switch
        address         10.217.0.17             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       CiscoASA    	        ; The name we're giving to this switch
        alias           CiscoASA		; A longer name associated with the switch
        address         10.217.0.18             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       FortiGate               ; The name we're giving to this switch
        alias           FortiGate    		; A longer name associated with the switch
        address         10.217.0.21           	; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
[7m--More--(3%)[27m
        host_name       FortiAnalyzer           ; The name we're giving to this switch
        alias           FortiAnalyzer  		; A longer name associated with the switch
        address         10.217.0.22           	; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Bridge-SW2_105-Carnegie ; The name we're giving to this switch
        alias           Bridge-SW2_105-Carnegie ; A longer name associated with the switch
        address         10.217.0.50             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook Core A         ; The name we're giving to this switch
        alias           Overlook Core A         ; A longer name associated with the switch
        address         10.217.0.51             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
[7m--More--(5%)[27m
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook Core B         ; The name we're giving to this switch
        alias           Overlook Core B         ; A longer name associated with the switch
        address         10.217.0.52             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook Core D         ; The name we're giving to this switch
        alias           Overlook Core D		; A longer name associated with the switch
        address         10.217.0.53             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook Core C         ; The name we're giving to this switch
        alias           Overlook Core C		; A longer name associated with the switch
        address         10.217.0.54             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

[7m--More--(7%)[27m
define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Bridge-SW1_105-Carnegie ; The name we're giving to this switch
        alias           Bridge-SW1_105-Carnegie ; A longer name associated with the switch
        address         10.217.0.55             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Bridge-SW_Overlook  	; The name we're giving to this switch
        alias           Bridge-SW_Overlook  	; A longer name associated with the switch
        address         10.217.0.56             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       RadPharm-WLC1           ; The name we're giving to this switch
        alias           RadPharm-WLC1           ; A longer name associated with the switch
        address         10.217.0.57             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }
[7m--More--(9%)[27m

[K
define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook SW1            ; The name we're giving to this switch
        alias           Overlook SW1  		; A longer name associated with the switch
        address         10.217.0.66             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook SW2            ; The name we're giving to this switch
        alias           Overlook SW2  		; A longer name associated with the switch
        address         10.217.0.67             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook SW3            ; The name we're giving to this switch
        alias           Overlook SW3  		; A longer name associated with the switch
        address         10.217.5.162            ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
[7m--More--(12%)[27m
        }[K

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       RadPharmASA             ; The name we're giving to this switch
        alias           RadPharmASA             ; A longer name associated with the switch
        address         10.228.0.1              ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Overlook-VGW            ; The name we're giving to this switch
        alias           Overlook-VGW            ; A longer name associated with the switch
        address         10.237.0.7              ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Munich-CCME         	; The name we're giving to this switch
        alias           Munich-CCME  		; A longer name associated with the switch
        address         10.247.0.1           	; IP address of the switch
[7m--More--(14%)[27m
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Munich-Edge         	; The name we're giving to this switch
        alias           Munich-Edge  		; A longer name associated with the switch
        address         10.247.0.5           	; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Munich-SW         	; The name we're giving to this switch
        alias           Munich-SW  		; A longer name associated with the switch
        address         10.247.0.10           	; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       SW-Core-1        	; The name we're giving to this switch
        alias           SW-Core-1		; A longer name associated with the switch
[7m--More--(16%)[27m
        address         172.16.2.2              ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       AshburnVPN        	; The name we're giving to this switch
        alias           AshburnVPN		; A longer name associated with the switch
        address         172.16.2.180            ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Opengear	        ; The name we're giving to this switch
        alias           Opengear  		; A longer name associated with the switch
        address         172.16.2.166            ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       ISR1_Rockville          ; The name we're giving to this switch
[7m--More--(18%)[27m
        alias           ISR1_Rockville          ; A longer name associated with the switch
        address         172.16.2.210            ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       AshburnASA        	; The name we're giving to this switch
        alias           AshburnASA		; A longer name associated with the switch
        address         172.16.8.4              ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Langenfeld BBR1         ; The name we're giving to this switch
        alias           Langenfeld BBR1		; A longer name associated with the switch
        address         172.16.4.28             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
[7m--More--(20%)[27m
        host_name       Langenfeld SW1          ; The name we're giving to this switch
        alias           Langenfeld SW1		; A longer name associated with the switch
        address         172.16.4.29             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Langenfeld Spare        ; The name we're giving to this switch
        alias           Langenfeld Spare	; A longer name associated with the switch
        address         172.16.4.30             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Shanghai SW1            ; The name we're giving to this switch
        alias           Shanghai SW1		; A longer name associated with the switch
        address         172.16.48.154           ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
[7m--More--(22%)[27m
        use             generic-switch          ; Inherit default values from a template
        host_name       Shanghai SW2         	; The name we're giving to this switch
        alias           Shanghai SW2  		; A longer name associated with the switch
        address         172.16.48.5             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       Shanghai BBR            ; The name we're giving to this switch
        alias           Shanghai BBR            ; A longer name associated with the switch
        address         172.16.48.2             ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################

[7m--More--(24%)[27m

[K
...skipping one line

define hostgroup{
        hostgroup_name  switches                ; The name of the hostgroup
        alias           Network Switches        ; Long name of the group
        }

Re: Help!?

Posted: Mon Mar 04, 2013 2:34 pm
by abrist
Looks like your mrtg folders are in a non-default location. Try this command instead:

Code: Select all

ls -la /var/lib/ | grep mrtg
ls -la /var/lib/mrtg
You are still receiving the "Unable to open the MRTG Log File", are you not?

Re: Help!?

Posted: Mon Mar 04, 2013 2:57 pm
by JW21a
That is correct:

susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/ | grep mrtg

susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/mrtg
ls: cannot access /var/lib/mrtg: No such file or directory

Re: Help!?

Posted: Mon Mar 04, 2013 3:17 pm
by abrist
All but one of your checks resemble:

Code: Select all

/var/lib/mrtg/10.217.0.17_1.log!. . . . . 
But the directory /var/lib/mrtg does not exist:
JW21a wrote: susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/ | grep mrtg
susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/mrtg
ls: cannot access /var/lib/mrtg: No such file or directory
Try making the /var/lib/mrtg folder and chowning it to nagios:

Code: Select all

mkdir /var/lib/mrtg
chown nagios:nagios /var/lib/mrtg
Restart nagios for good measure, wait 5 minutes and then check the interface for mrtg/perfdata errors.

Code: Select all

service nagios restart