Ok, I am not getting it...

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Mon Nov 4 22:03:11 CET 2002


Here's how I do it.  I'll provide all the snippets so there's minimal
confusion:

In services.cfg:

define host{
        name                            generic-host
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        register                        0
        }

define service{
        name                            icmp
        use                             generic-service
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           60
        notification_period             24x7
        notification_options            c,r
        check_command                   check_ping!100.0,20%!500.0,60%
        register                        0
        }

define service{
        name                            http
        use                             icmp
        service_description             HTTP
        notification_options            w,u,c,r
        check_command                   check_http!80
        register                        0
        }

define service{
        name                            http_8080
        use                             http
        service_description             HTTP_8080
        notification_options            w,u,c,r
        check_command                   check_http!8080
        register                        0
        }

(You don't have to do it this way, of course.  I have my reasons for doing
it this way, ie, the levels of abstraction.)

Here's an additional snippet from services.cfg, just to show the port 80 and
the port 8080 variants in action:

define service{
        host_name                       itdmll61
        use                             http
        contact_groups                  linux-admins
        }

define service{
        host_name                       itdmll64
        use                             http_8000
        contact_groups                  linux-admins
        }

>From checkcommands.cfg:

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$
        }

HTH.

jc

> -----Original Message-----
> From: Kim Callis [mailto:kim.callis at c2associates.net]
> Sent: Monday, November 04, 2002 2:14 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Ok, I am not getting it...
> 
> 
> I really don't get how to pass arguments to the check_command 
> in service.cfg. I
> have been trying to get check_http to check a service at a 
> no-standard port.
> From the command line, -p will allow for the port to be 
> passed. But I don't get
> how you  pass it in services.cfg. Can someone give me a pointer?
> 
> Thanks, 
> 
> 
> -- 
> Kim C. Callis
> Callis, Chung & Associates, Inc.
> (323) 735-7160
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ApacheCon, November 18-21 in
> Las Vegas (supported by COMDEX), the only Apache event to be
> fully supported by the ASF. http://www.apachecon.com
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com




More information about the Users mailing list