Plugin issue

tyrus at icsit.jkuat.ac.ke tyrus at icsit.jkuat.ac.ke
Mon Jan 15 05:56:47 CET 2007


> tyrus at icsit.jkuat.ac.ke wrote:
>>> Don't forget to copy the mailing list in so others can chip in and
>>> help.
>>>
> Read the above line again!!
>> HI Andy am kinda confused here: when you say i insert the values
>> "2000,25%" to the $ARG1$ and $ARG2$ respectively do you mean that i
>> should
>> insert them in the check_ping command defination or what??
>> Kindly explain!
>> Thanks
>>
> OK there are a few ways of doing it - in your current definition, you
> need something like this "2000,25%" in anything that uses your
> check_ping command - i.e. host, service, whatever.
> I'll show you an example using a host definition.
>
> Firstly, the way you're doing it:
>
> define command {
>          command_name    check_ping
>          command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c
> $ARG2$ -p 5
> }
>
> You need to be passing, for example, 2000,25% as $ARG1$ and, for
> example, 4000,50% as $ARG2$.
> So, your object definition (in this example, host) will need to be as
> follows:
>
> define host {
>     ...
>     check_command            cmd-Ping!2000,25%!4000,50%
>     ...
> }
>
> Your check_ping command will then turn out to be something like:
> "/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 2000,25% -c
> 4000,50% -p 5"
>
> The second way is the way I'm doing it at the moment.
> The check_ping command:
>
> define command {
>     command_name            cmd-Ping
>     command_line            $USER1$/check_ping -p 3 -t 10 -4 -H $ARG1$
> -w $ARG2$,$ARG3$% -c $ARG4$,$ARG5$%
> }
>
> The object definition:
>
> define host {
>     ...
>     check_command            cmd-Ping!$HOSTADDRESS$!1000!20!2000!50
>     ...
> }
>
> As you can see, a few more arguments need to be passed from the object,
> but you can override any of the thresholds for one particular object.
>
> Another way is simply to "hard-code" the values in your command, and
> have no arguments passed in from the object.
>
> The command:
>
> define command {
>     command_name            cmd-Ping
>     command_line            $USER1$/check_ping -p 3 -t 10 -4 -H
> $HOSTADDRESS$ -w 2000,25% -c 4000,50%
> }
>
> The object:
>
> define host {
>     ...
>     check_command            cmd-Ping
>     ...
> }
>
> Hopefully this clears things up - but *don't forget to copy the mailing
> list in* to your replies - hit "Reply to all" in your mailer and it'll
> sort it out for you.
>
> --
> Andy Shellam
> NetServe Support Team
>
> the Mail Network
> "an alternative in a standardised world"
>
>
>

Hallo thanks so much for your time.However the command is still timing out
and giving me the same error.Here is my command definition in the hosts
object:
define host
{
..........
check_command           check_ping!2000,25%!4000,50%
..........
}
Now my question is if the above command will check the values of the
check_ping command in the command definition, then are those the values i
should insert in the command defination file? And also you said:
>Your check_ping command will then turn out to be something like:
> "/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 2000,25% -c
> 4000,50% -p 5"
However when i go to my command defination it still reads as before.
Kindly assist.I really hope am not missing out on something.
cheers.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin 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