Nagios killing xmessage

Andreas Ericsson ae at op5.se
Tue Nov 6 10:30:48 CET 2007


Redder,Greg wrote:
> We're running Nagios 2.9.  We have a command configured:
> 
> define command {
>         command_name    host-notify-by-xmessage
>         command_line    /etc/nagios/scripts/host-notify-by-xmessage "$HOSTSTATE$" "$HOSTNAME$" "$HOSTALIAS$" "$DATETIME$"
>         }
> 
> The "host-notify-by-xmessage" is a shell script that pulls in a text file and displays that text file along with the host and the problem via an xmessage to an xdisplay.  This all works fine when run from the command line.  It even works when invoked by nagios, but when nagios invokes it, it also kills the process in about 30 seconds.  This wasn't a problem on Nagios 1.x.  We recently upgraded to 2.9 and ran into this issue.  I've tried nohup'ing the xmessage, but no luck - it seems like the nagios process kills it no matter what!?   I've tried converting the script to perl and using 'system' or 'exec' calls, but that didn't fix the problem either.
> 
> Does anyone have a workaround for this or a suggestion on things to try, please?
> 

xmessage <args> &

Nagios must kill the notification commands if they run for too long,
otherwise each notification will leak filedescriptors, and Nagios
will, eventually, no longer be able to run any commands at all.

Don't create notification scripts that never exit (under normal
circumstances). You'll just eat resources for nothing.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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