Cannot ping switches

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Cannot ping switches

Post by Phil7269 »

I am trying to add my network switches and devices to nagios. I just want nagios to ping these devices so it can alert me if they go down

I have modified nagios.cfg to include switch.cfg. I have added 2 entries to switch.cfg and configured the ping service for both devices. Yet at the nagios web page the devices are shown as down and cannot be reached. I can ping these IP addresses from the nagios server and I can also ping these devices using the check_ping command from the command prompt.

What would cause nagios to show these devices as down yet i can ping from the command line and execute the check_ping command from the command line and have it reach both devices? I have tried adding the -4 option to the check ping command but that does not make a difference. Below are the host definition and ping command for a device in my switch.cfg file that is showing as down in Nagios.

define host{
use generic-switch
host_name Firewall
alias Firewall
address 192.168.12.253
hostgroups network
}



define service{
use generic-service
host_name Firewall
service_description PING
check_command check_ping!100.0,20%!500.0,60%
normal_check_interval 5
retry_check_interval 1
}
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Cannot ping switches

Post by agriffin »

What is the last check time on these switches when you view the host info in the web interface? Is it actually checking them?
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Re: Cannot ping switches

Post by Phil7269 »

This is the most recent check time from the website:

10-16-2012 14:47:16


It is checking them. I checked at 14:50
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Re: Cannot ping switches

Post by Phil7269 »

Found that if I put the devices in the Windows.cfg file I can ping them. When I place the devices in switch.cfg nagios cannot monitor them. Any advice on what might be wrong will be appreciated.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Cannot ping switches

Post by yancy »

Phil7269,

When adding the host and service to switch.cfg, did you verify your configuration and restart nagios

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Locked