issue with LASTSTATECHANGE macro
Bob
rmroczk at mroczka.com
Wed Nov 19 14:51:54 CET 2008
I'm using nagios 1.2 and did not find anything in the change log for
1.x, 2.x or 3.x indicating any fixes for this macro.
The problem I'm having is that I have an event handler that is being
passed this macro and the TIMET macro.
The event handler is defined as:
define command{
command_name psynch_maint
command_line /usr/local/nagios/libexec/eventhandlers/psynch_maint
$HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$ $HOSTSTATE$ "$DATETIME$"
$STATETYPE$ $SERVICEATTEMPT$ $LASTSTATECHANGE$ $TIMET$ '$OUTPUT$'
}
Every time this handler fires it records the values of each of the
command-line arguments into a log file.
The issue appears that the value of $LASTSTATECHANGE$ is always the same
as the $TIMET$ macro.
Wed Nov 19 02:44:22 CST 2008: HOSTNAME=psync-cluster SERVICEDESC=PSYNC
SERVICESTATE=CRITICAL HOSTSTATE=UP DATETIME="Wed Nov 19 02:44:22 CST
2008" STATETYPE=SOFT SERVICEATTEMPT=1 LASTSTATECHANGE=1227084262
TIMET=1227084262 OUTPUT=Service cluster problem: 0 ok, 0 warning, 0
unknown, 2 critical
===================================
Wed Nov 19 02:46:22 CST 2008: HOSTNAME=psync-cluster SERVICEDESC=PSYNC
SERVICESTATE=CRITICAL HOSTSTATE=UP DATETIME="Wed Nov 19 02:46:22 CST
2008" STATETYPE=HARD SERVICEATTEMPT=2 LASTSTATECHANGE=1227084382
TIMET=1227084382 OUTPUT=Service cluster problem: 0 ok, 0 warning, 0
unknown, 2 critical
===================================
Wed Nov 19 04:31:21 CST 2008: HOSTNAME=psync-cluster SERVICEDESC=PSYNC
SERVICESTATE=OK HOSTSTATE=UP DATETIME="Wed Nov 19 04:31:21 CST 2008"
STATETYPE=HARD SERVICEATTEMPT=2 LASTSTATECHANGE=1227090681
TIMET=1227090681 OUTPUT=Service cluster ok: 2 ok, 0 warning, 0 unknown,
0 critical
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20081119/997a4bd6/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list