LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   nagios does not discover hosts properly, Error: Host Status Information Not Found! (https://www.linuxquestions.org/questions/linux-server-73/nagios-does-not-discover-hosts-properly-error-host-status-information-not-found-947684/)

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


chrism01 05-30-2012 11:55 PM

1. ensure that system defn is only in one of those files and in fact, you should only enable one file.
The localhost.cfg is more of an example than anything else.

2. check nagios.log (eg /usr/local/var/nagios.log) for more info

3. do a pre-flight check thus after each edit, but before restart
Code:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
4. check you only have one copy running....

parthipan 05-31-2012 01:14 AM

still problem continues..Error: Host Status Information Not Found!
 
before i had localhost.cfg , myhost.cfg,myred.cfg(those are i have created) i checked after deleted local host and myred.cfg and only with myhost.cfg
the problem continues
Quote:

must i have only one .cfg file?
2. check nagios.log (eg /usr/local/var/nagios.log) for more info

nagios.log working properly because there is writing all the entries and errors
Quote:

but it is into the /usr/local/nagios/var/nagios.log
is that problem?
3. do a pre-flight check thus after each edit, but before restart
Code:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Quote:

i did same
but i did not get where is problem
4. check you only have one copy running....[/QUOTE]


All times are GMT -5. The time now is 10:28 PM.