Pending status

Aditya Ivaturi aivaturi2 at unlnotes.unl.edu
Fri Jun 3 23:23:33 CEST 2005


> Service definitions for nagios to check.

Yup I realized that. I think there was a similar thread on the archives 
where someone mentioned that Nagios doesn't check host without services. 
So I defined 5 services on the localhost. But it was always in Pending 
state. Also there was another suggestion to go ahead and disable all 
service checks and then reenable them through the interface. That didn't 
work either.


> Are the services on your other
> host being checked? If no, please post the host, service and command
> definitions in question as well as nagios version and plugins version.

Nope, as I said earlier, services on itself were not being checked. Here 
are the details (all of them are modified version of sample configs that 
come with fresh install of Nagios v2.0b3 and Nagios-plugin v1.4 on Redhat 
7.3):

Host:

define host{
        use                     generic-host            ; Name of host 
template to use
        host_name               localhost
        alias                   moya
        address                 127.0.0.1
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups  admins
        }


SERVICES:
define service{
        use                             generic-service         ; Name of 
service template to use
        host_name                       localhost
        service_description             Root Partition
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        check_command                   check_local_disk!20%!10%!/
        }
# Define a service to check the load on the local machine.

define service{
        use                             generic-service         ; Name of 
service template to use
        host_name                       localhost
        service_description             Current Load
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        }
# 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                             generic-service         ; Name of 
service template to use
        host_name                       localhost
        service_description             Total Processes
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        check_command                   check_local_procs!250!400
        }

# 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                             generic-service         ; Name of 
service template to use
        host_name                       localhost
        service_description             Current Users
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        check_command                   check_local_users!20!50
        }

# Define a service to "ping" the local machine

define service{
        use                             generic-service         ; Name of 
service template to use
        host_name                       localhost
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        check_command                   check_ping!100.0,20%!500.0,60%
        }

# Generic service definition template - This is NOT a real service, just a 
template!

define service{
        name                            generic-service ; The 'name' of 
this service template
        active_checks_enabled           1       ; Active service checks 
are enabled
        passive_checks_enabled          1       ; Passive service checks 
are enabled/accepted
        parallelize_check               1       ; Active service checks 
should be parallelized (disabling this can lead to major performance 
problems)
        obsess_over_service             1       ; We should obsess over 
this service (if necessary)
        check_freshness                 1       ; Default is to NOT check 
service 'freshness'
        notifications_enabled           1       ; Service notifications 
are enabled
        event_handler_enabled           1       ; Service event handler is 
enabled
        flap_detection_enabled          1       ; Flap detection is 
enabled
        failure_prediction_enabled      1       ; Failure prediction is 
enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status 
information across program restarts
        retain_nonstatus_information    1       ; Retain non-status 
information across program restarts
        register                        0       ; DONT REGISTER THIS 
DEFINITION - ITS NOT A REAL SERVICE.
        }


COMMANDS:

# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }

# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c 
$ARG2$ -p 5
        }

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }

# 'check_local_users' command definition
define command{
        command_name    check_local_users
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
        }

# 'check_local_procs' command definition
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050603/e300c574/attachment.html>


More information about the Users mailing list