parthipan |
05-30-2012 11:00 PM |
nagios does not discover hosts properly, Error: Host Status Information Not Found!
when i configure nagios box to use linux box, i defined new host groups,new hosts and new services
but when i try to discover those details in my browser window
http://localhost/nagios/
there is only displaying localhost and new hostgroups only
there is no discover my new host and new services under the new host groups
but when i am clicking 7 or 8 times on services on nagios window , it is discovering all the hosts and services
but when i press on new host my result is
Host
remotehost
(remotehost)
Member of
MyhostGroup
172.30.0.70
Error: Host Status Information Not Found!
172.30.0.70 is connected in my network
i couldn't fine out the problem
please help me
my difne host code for myhost
Code:
# Define a host for the local machine
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name remotehost
alias remotehost
address 172.30.0.70
hostgroups MyhostGroup
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################
# Define an optional hostgroup for Linux machines
define hostgroup{
hostgroup_name MyhostGroup ; The name of the hostgroup
alias MyhostGroup ; Long name of the group
members remotehost ; Comma separated list of hosts that belong to this group
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Define a service to "ping" the local machine
define service{
use local-service ; Name of service template to use
host_name remotehost
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.
define service{
use local-service ; Name of service template to use
host_name remotehost
service_description Root Partition
check_command check_local_disk!20%!10%!/
}
# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.
define service{
use local-service ; Name of service template to use
host_name remotehost
service_description Current Users
check_command check_local_users!20!50
}
# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 users.
define service{
use local-service ; Name of service template to use
host_name remotehost
service_description Total Processes
check_command check_local_procs!250!400!RSZDT
}
# Define a service to check the load on the local machine.
define service{
use local-service ; Name of service template to use
host_name remotehost
service_description Current Load
check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}
# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free
i have included remote host in nagios.cfg
Code:
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
cfg_file=/usr/local/nagios/etc/objects/myhost.cfg
|