Can u tell me wht's the problem in host.cfg

I think the results apart from PING remaining results showing for this file is localhost not for the server defined in cfg file

can u see my file and guide me pleaseee


#
###############################################################################




###############################################################################
###############################################################################
#
# HOST DEFINITION
#
###############################################################################
###############################################################################

# 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               nlzeiweb-pcam-1
        alias                   nlzeiweb
        address                 172.17.45.9
        }



###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################

# Define an optional hostgroup for Linux machines

define hostgroup{
        hostgroup_name  linux-servers1 ; The name of the hostgroup
        alias           Linux Servers1 ; Long name of the group
        members         nlzeiweb-pcam-1     ; 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                      nlzeiweb-pcam-1
        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                       nlzeiweb-pcam-1
        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                       nlzeiweb-pcam-1
        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                       nlzeiweb-pcam-1
        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                       nlzeiweb-pcam-1
        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

define service{
        use                             local-service         ; Name of service template to use
        host_name                       nlzeiweb-pcam-1
        service_description             Swap Usage
        check_command                   check_local_swap!20!10
        }
# Define a service to check SSH on the local machine.
# Disable notifications for this service by default, as not all users may have SSH enabled.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       nlzeiweb-pcam-1
        service_description             SSH
        check_command                   check_ssh
        notifications_enabled           0
        }



# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.

define service{
        use                            local-service         ; Name of service template to use

        host_name                       nlzeiweb-pcam-1
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }

Thanks
Arumilli

the name of the service says it…
check_local_procs and similar checks can NOT be used on remote servers :slight_smile:

Thank you very much
can u tell me
wht commands i have to use instead of check_local_procs.

you can use snmp for most things. :slight_smile:

[quote=“arumilli”]Thank you very much
can u tell me
wht commands i have to use instead of check_local_procs.[/quote]

Well, there are multiple ways to monitor remote services - all dependant on what OS the Host you want to monitor is running.

If you are running a Windows Server - I recoomend using NRPE to execute WMI plugins.

The setup is something like this:

  1. You will need to download and install the NRPE addon for nagios from Nagios’s Site.
  2. You will need to download a Windows “Agent” for NRPE.
  3. You will need to have the “Agent” loaded on at least one of your Windows Servers"
  4. You will need to download, Install, Configure WMI Check Plugins on the Agent Server.
  5. You will need to add some commands to Nagios.

Google the following:

Nagios WMI Monitoring
Nagios windows Monitoring WMI
Nagios windows Monitoring NRPE

You should find tons of more detailed how-to’s.

Also check www.nagiosexchange.org for tons of plugins for all kinds of checks.

For Linux Servers, you could monitor them via SSH.

Copy the plugins nagios uses to check itself from the libexec folder to your remote server and execute them via SSH.

Search www.nagiosexchange.org for plugins that allow you to execute nagios plugins on remote linux servers via ssh. You will also have to authorize your nagios server to connect to the server you want to monitor without needing to enter a password. Authenticate it via Public/Private DSA/RSA Keys.