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
}
Cannot ping switches
Re: Cannot ping switches
What is the last check time on these switches when you view the host info in the web interface? Is it actually checking them?
Re: Cannot ping switches
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
10-16-2012 14:47:16
It is checking them. I checked at 14:50
Re: Cannot ping switches
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.
Re: Cannot ping switches
Phil7269,
When adding the host and service to switch.cfg, did you verify your configuration and restart nagios
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