How must I define this in checkcommands.cfg and services.cfg?

Ben O'Hara bohara-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Aug 3 10:05:06 CEST 2005


On 8/3/05, Ralph.Grothe-YpEHkxAi6oMehzHBf2RrnA at public.gmane.org <Ralph.Grothe-YpEHkxAi6oMehzHBf2RrnA at public.gmane.org> wrote:
> Hi,
> 
> as long as I cannot find a way how to see what the nagios
> scheduler is actually substituting and executing as a check_nrpe
> command, I am stuck, and I have to treat Nagios as a black box.
> I find this very unsatisfactory.
> 
> I tried all to me conceivable command and service definition
> variants but all don't work,
> and all I get is CRC32 errors that result in UNKNOWN states.
> 
> 
> I want exactly a check_nrpe command line like the one below
> (issued manually from the Nagios server daisy against the remote
> host nemesis) to be run by the nagios daemon.
> 
> 
> [nagios at daisy:~/etc]
> $ /opt/sw/nagios/libexec/check_nrpe -H nemesis -c
> check_vcs_sg\!evo1\!nemesis
> 
> OK: hagrp evo1 is ONLINE
> 
> 
> 
> 
> How should a command and service object definition look like for
> it to work?
>

First off, define "nemesis" in etc/hosts.cfg as follows

define host{
        use                     generic-host
        host_name               nemeis
        alias                   Nemesis
        address                 1.2.3.4
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,u,r
        }

Also add it to a hostgroup in etc/hostgroups.cfg

define hostgroup{
        hostgroup_name  nemesisgroup
        alias           ServerGroup
        contact_groups  admins
        members         nemesis
       }

Add a check_nrpe command into etc/checkcommands.cfg

define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

and then add the service into etc/services.cfg

define service{
        use                             generic-service
        host_name                       nemesis
        service_description             EVO
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              5
        normal_check_interval           3
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_nrpe!check_vcs_sg\!evo1\!nemesis
        }

Looksl ike NRPE is already configured correctly with the check command
setup in nrpe.cfg so this should be all thats required.

Regards

Ben


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list