Newly defined hosts are not displayed on web Interface
Posted: Wed Sep 07, 2011 10:00 am
Dear Nagios User,
I'm fighting with an issue for long hours.
I'm using Nagios 3.3.1 installed on an Ubuntu Server (10.04.3 LTS).
I began with Nagios for 2 weeks, please be indulgent.
I was able at the beggining to add printer monitoring, switch, windows server etc...
Then I had trouble with permissions, and tried to change permission on the /usr/local/nagios/var. That's probably the main mistake I made because troubles begun from here...
NOW, I wanted to add our Firewall in the switch.cfg definition file. Here the cfg file:
(I voluntary changed the IP Number in x.x.x.x)
Then I checked the Nagios config , no error/warning and I restarted it. But my Firewall doesen't appear on the Web Interface.
Where am I doing a mystake ? How to correct this...
When I make change on an existing windows server or on the only switch I monitore for the moment, no problem on the web interface, my changes appear...
Many thanks in advance for your help.
Kind regards,
I'm fighting with an issue for long hours.
I'm using Nagios 3.3.1 installed on an Ubuntu Server (10.04.3 LTS).
I began with Nagios for 2 weeks, please be indulgent.
I was able at the beggining to add printer monitoring, switch, windows server etc...
Then I had trouble with permissions, and tried to change permission on the /usr/local/nagios/var. That's probably the main mistake I made because troubles begun from here...
NOW, I wanted to add our Firewall in the switch.cfg definition file. Here the cfg file:
Code: Select all
###############################################################################
# SWITCH.CFG - SAMPLE CONFIG FILE FOR MONITORING A SWITCH
#
# Last Modified: 10-03-2007
#
# 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 chmus001 ; The name we're giving to this switch
alias Cisco Switch 48-Port ; A longer name associated with the switch
address x.x.x.x ; 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 chmufw001 ; The name we're giving to this switch
alias Firewall ; A longer name associated with the switch
address x.x.x.x ; 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 chmus001,chmufw001 ; 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 chmus001
service_description Uptime
check_command check_snmp!-C codex_snmp -o sysUpTime.0
}
# Monitor Port 8 status via SNMP
define service{
use generic-service ; Inherit values from a template
host_name chmus001
service_description Port 8 Link Status
check_command check_snmp!-C codex_snmp -o ifOperStatus.8 -r 1 -m RFC1213-MIB
}
# Monitor bandwidth via MRTG logs
#define service{
# use generic-service ; Inherit values from a template
# host_name hostname
# 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
# }
Then I checked the Nagios config , no error/warning and I restarted it. But my Firewall doesen't appear on the Web Interface.
Where am I doing a mystake ? How to correct this...
When I make change on an existing windows server or on the only switch I monitore for the moment, no problem on the web interface, my changes appear...
Many thanks in advance for your help.
Kind regards,