Custom command
Assaf Flatto
assaf at m-wise.com
Thu Feb 2 16:44:59 CET 2006
Have you tried placing the script under the libexec directory?
I had the same issue some time ago and the script only worked when it was in the
libexec directory even though the absolute path was set.
Assaf
Robert Fitzpatrick wrote:
> Thanks to Jim here on the list, I have defined a command to send an
> e-mail using a sendEmail perl script. From the command line, the script
> works fine. When I try to use the new notify-by-sendEmail as the
> service_notification_commands for my contact, Nagios logs the message as
> sent, which never makes it to the SMTP server and I get this error in
> the /var/log/messages:
>
> Feb 2 10:13:39 esmtp kernel: pid 14486 (nagios), uid 2004: exited on
> signal 10
>
> I have the same permissions on the file as the other commands that
> Nagios uses in the minimail.cfg, like /usr/bin/mail:
>
> esmtp# ls -lah /usr/local/bin/sendEmail
> -r-xr-xr-x 1 root wheel 62K Feb 1 17:58 /usr/local/bin/sendEmail
>
> Can someone suggest why I get this error? I simplified the new command
> without the variables like below, I can copy and paste this command to
> the command line and the message gets sent successfully:
>
> define command{
> command_name notify-by-sendEmail
> command_line /usr/local/bin/sendEmail -f
> nagios at esmtp.webtent.net -t robert at webtent.com -s 10.0.0.40 -m "Body" -u
> "Subject"
> }
>
> define contact{
> contact_name webtent
> alias WebTent
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-by-sendEmail
> host_notification_commands host-notify-by-email
> email support at mydomain.com
> }
>
>
--
Assaf Flatto
m-Wise Operations
Cellular: +972-54-5679230
e-mail: assaf at m-wise.com
MSN : firedrake_3 at hotmail.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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