active response
Jesús Arnáiz
jesus.arnaiz at 0z0ne.com
Wed Apr 4 13:06:13 CEST 2007
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?
Patrick Morris escribió:
> On Mon, 02 Apr 2007, Jes?s Arn?iz wrote:
>
>> Hi there.
>>
>> It is posible to make nagios to do some things when it detect a
>> problems? I mean, if it detects one service stoped, I want it to try to
>> start the service in addition to notify me by email.
>
> See the docs for event handlers.
-------------------------------------------------------------------------
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