Glad to hear that it works now!
Are you talking about adding this check_snmp in that file?
These are the object definitions.
https://assets.nagios.com/downloads/nag ... tions.html
A host and service require different derivatives in order to not produce any Nagios errors.
Problem with Check_Snmp
Re: Problem with Check_Snmp
I meant this:kyang wrote:Glad to hear that it works now!
Are you talking about adding this check_snmp in that file?
These are the object definitions.
https://assets.nagios.com/downloads/nag ... tions.html
A host and service require different derivatives in order to not produce any Nagios errors.
define service{
use generic-service ; Inherit values from a template
host_name GM-PS
service_description Name ID
check_command check_snmp!-C public -o .1.3.6.1.2.1.1.1.0 -m all
}
I still get an Timeout
Re: Problem with Check_Snmp
Do you have the define host field with IP address and other fields in that switch.cfg?
Is this the host with the same IP address that you were checking before?
Is this the host with the same IP address that you were checking before?
Re: Problem with Check_Snmp
My Switch.cfg File :kyang wrote:Do you have the define host field with IP address and other fields in that switch.cfg?
Is this the host with the same IP address that you were checking before?
Code: Select all
###############################################################################
# SWITCH.CFG - SAMPLE CONFIG FILE FOR MONITORING A SWITCH
#
#
# 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 GM-PS ; The name we're giving to this switch
alias Lancom_1781AW ; A longer name associated with the switch
address 192.168.172.1 ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################
# Create a new hostgroup for switches
define hostgroup{
hostgroup_name switches ; The name of the hostgroup
alias Network Switches ; Long name of the group
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Create a service to PING to switch
define service{
use generic-service ; Inherit values from a template
host_name GM-PS ; 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
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_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 GM-PS
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
# Monitor Port 1 status via SNMP
define service{
use generic-service ; Inherit values from a template
host_name GM-PS
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}
# Monitor bandwidth via MRTG logs
define service{
use generic-service ; Inherit values from a template
host_name GM-PS
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,1000000!5000000,5000000!10
}
# STATUS
define service{
use generic-service ; Inherit values from a template
host_name GM-PS
service_description Name
check_command check_snmp!-C public -o .1.3.6.1.2.1.1.1.0 -m all
}
Last edited by tmcdonald on Mon Feb 19, 2018 10:41 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: Problem with Check_Snmp
That is strange. Before we did use check_snmp towards your router correct?
I have mine set up like this and it works.
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 192.168.172.1 -C public -o .1.3.6.1.2.1.1.1.0
Code: Select all
# Monitor uptime via SNMP
define service{
use generic-service ; Inherit values from a template
host_name Nagios Linux SNMP
service_description OID check1
check_command check_snmp!-C StrOngCOmmunity -o .1.3.6.1.2.1.1.1.0
}
Re: Problem with Check_Snmp
kyang wrote:That is strange. Before we did use check_snmp towards your router correct?I have mine set up like this and it works.Code: Select all
/usr/local/nagios/libexec/check_snmp -H 192.168.172.1 -C public -o .1.3.6.1.2.1.1.1.0
Code: Select all
# Monitor uptime via SNMP define service{ use generic-service ; Inherit values from a template host_name Nagios Linux SNMP service_description OID check1 check_command check_snmp!-C StrOngCOmmunity -o .1.3.6.1.2.1.1.1.0 }
Works now
Re: Problem with Check_Snmp
Perfect!
Did you have any more questions on this or are we okay to lock this up?
Did you have any more questions on this or are we okay to lock this up?