active response

Lars Stavholm stava at telcotec.se
Wed Apr 4 13:56:12 CEST 2007


Rob Blake wrote:
> On 4/4/07, Jesús Arnáiz <jesus.arnaiz at 0z0ne.com> wrote:
>>
>> Hi there.
>>
>> I use the doc. about event handlers and I define this one:
>>
>> # SERVICE CLAMD
>> define service {
>>          use generic-service
>>          host_name       MYHOST
>>          service_description CLAMD
>>          check_command   check_clamd
>>          max_check_attempts 2
>>          event_handler   event_clamd
>> }
>>
>> # COMMAND
>> define command {
>>          command_name    event_clamd
>>          command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c
>> event_clamd $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
>> }
>>
>> And, on the remote machine I configure nrpe.cfg like this:
>>
>> command[event_clamd]=/data/general/nagios/libexec/event_clamd $ARG1$
>> $ARG2$ $ARG3$
>>
>> Also, I put that script (event_clamd), with 755 permission. This script
>> write to a file in /tmp in order to see if it run or not. I see it don't
>> takes the args (SERVICESTATETYPE SERVICESTATE...), so I try to run the
>> script by hand like this:
>>
>> libexec/check_nrpe -H MYHOST -c event_clamd OK HARD 1
>>
>> And I see it run but it doesn't get that arguments (OK, HARD, 1). I try
>> also:
>>
>> libexec/check_nrpe -H MYHOST -c event_clamd -a OK HARD 1
>> CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs
>> for error messages.
>>
>> Any help?
> 
> 
> 
> By default NRPE will ignore any passed command arguments. Have you made
> sure
> that you have dont_blame_nrpe set to 1 so that command arguments are
> allowed?

In addition, nrpe need to be built with "--enable-command-args".
It's all in the new doc's:
<http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf>
/Lars

-------------------------------------------------------------------------
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