[sysmon-help] spawn when a services comes backup

Jared Mauch jared at sysmon.org
Fri Dec 13 11:25:11 EST 2002

On Fri, Dec 13, 2002 at 04:11:15PM -0000, Marko Milivojevic wrote:
> 	OK, since you quoted what I've put into Bugzilla, let me clear what
> I had in mind there :-).
> 	Your concern regarding running external programs is absolutely
> correct and in place. On the other hand, why would you care about it? :-).
> If someone uses broken script to perform some check, it's out of your
> control, it's not a bad design in Sysmon, isn't it? They asked for it ;-)

	If it takes that script more than a few seconds (even up to 30)
it will cause those annoying numkilled things.  (once i see a test
that takes more than 60 seconds, i stop it.. because that shouldn't

	i would then have to track the time it spent doing exec() then
go and skew existings tests to give them that much more
buffer time.

	(eg: i send 1 ping every second, up to 7 pings to determine if
a host is down, if I send 1 ping, exec an external proc, it takes 50 seconds
to run, i come back with 1-2 seconds already being counted then
need to send the other 6 in the ~10 seconds left.  I think i have a 2 sec
delay between pings).  one could miss a host that was down for some
time if a check is queued every 60 seconds (default) then
taking 50 away from everyone else will cause bad things to happen.

> 	IMHO, it's valuable to have the possibility of running external
> programs to check on certain complex things (*SQL inserts, deletes, etc.,
> bandwidth or temperature trends (not very simple thing)). It would greatly

	i have snmp support already.  you can't do temp trends via snmp?

> improve the value, of already valuable asset such as Sysmon.
> 	I'm not programmer by trade, but I believe that timing issues could
> be addressed somehow. After all, you ARE allowing exec for notify - why not
> for check, too?

	well, this would be easy to do, i'm just paranoid about
people shooting themselves in the foot with it then coming to me and
saying "why does YYY happen", then i say "your external program sucks".

> 	The other thing is - what to expect from external program? I'd
> believe that return code is the most preferred way. If it's 0, service is
> OK, if it's not 0, service is down. Anything coming out to stdout (meaning
> there was not an error in software, but in service itself) could go as
> message body, or whatever. Also, you could reserve certain exit codes for
> external program failures, too.

	actually, i'd probally just do this:

object extcheck {
	type ext;
	exec "/tmp/check";
	exit-failure 0;
	exit-success 25;
	contact "joe@foo.bar";


> Regards,
> Marko.
> > -----Original Message-----
> > From: Jared Mauch [mailto:jared@sysmon.org]
> > Sent: föstudagur, 13. desember 2002. 15:51
> > To: Simon White
> > Cc: sysmon-help@puck.nether.net
> > Subject: Re: [sysmon-help] spawn when a services comes backup
> > 
> > 
> > 	This should be fairly simple to implement, the biggest concern I
> > have is that I hate calling external programs.  I keep what I consider
> > 'delicate' track of the time that sysmon spends doing varying
> > tasks.
> > 
> > 	execute-on-down and execute-on-up could be easily done.
> > 
> > 	(spawn would be alias to execute-on-down)
> > 
> > 	i just don't want some external task to take forever
> > to run and cause the other tests to be all screwed up.
> > 
> > http://puck.nether.net/bugzilla-2.17.1/show_bug.cgi?id=20
> > 
> > 	- jared
> [ 8< ]
> Tölvupóstur þessi er frá Margmiðlun hf., Suðurlandsbraut 4, Reykjavík.
> Fyrirvara og leiðbeiningar til viðtakenda tölvupósts frá Margmiðlun hf. er
> að finna á vefsíðunni http://www.mi.is/fyrirvari 

Jared Mauch  | pgp key available via finger from jared@puck.nether.net
clue++;      | http://puck.nether.net/~jared/  My statements are only mine.

More information about the Sysmon-help mailing list