(service|host)_notification_commands

Andreas Ericsson ae at op5.se
Wed Jul 27 18:49:39 CEST 2005


Ken Dyke wrote:
> On Tue, Jul 26, 2005 at 05:46:07PM -0500, Marc Powell (marc at ena.com) wrote:
> 
>>If they're
>>stored in a hash internally then they could be returned/run in any
>>order. I don't know enough to tell if that's how Nagios is storing them
>>but my guess would be that it is.
> 
> 
> Storing all values in a hash would be something I would expect to be
> documented.  Yet I do not recall a single mention of this.
> 

Why on earth should internal design be documented? Hash-tables have 
absolutely nothing to do with the order of anything. That's just not how 
hashes work (in a sane implementation).


> But, even if they are stored in a hash does not mean that order listed
> must be throw away.  After all it is *_notification_commands (plural).
> Thus inviting one to list more then one command.
> 

And so you can. Nagios uses popen() to run the command, which means it 
will fork(), dup() and execve() sh -c [command]. Just separate all your 
commands with escaped semi-colons.

> Dropping the above for now as I need a solution today.  When defining a
> command, what is the syntax for executing two commands on the
> "command_line"?

man bash

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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