[Xymon] TIME=*:2101:0729 DURATION>5 and MAIL MACRO

Bakkies Gatvol bakgat8 at hotmail.com
Tue Apr 16 19:20:17 CEST 2013


Can anyone shed any light for me? 


larry:/xymondev/L:=> date -d "Tue Apr 16 22:01:23 EDT 2013" +%s
1366164083

this works:  [[note  *** Match with '$XCD' ***]]

$XCD=MAIL user at user.com FORMAT=PLAIN RECOVERED TIME=*:2101:0729   DURATION>5
#--------------------------------------------------------------------

HOST=* SERVICE=conn
     MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5  
        $XCD 



larry:/xymondev/-L:=> gelaptopp conn --duration=6 --time=1366164083                                           <
00009651 2013-04-16 22:01:23 send_alert gelaptopp:conn state Paging
00009651 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 132
00009651 2013-04-16 22:01:23 *** Match with 'HOST=* SERVICE=conn' ***
00009651 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 133
00009651 2013-04-16 22:01:23 *** Match with 'MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5' ***
00009651 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00009651 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 134
00009651 2013-04-16 22:01:23 *** Match with '$XCD' ***
00009651 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00009651 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 151
00009651 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=msgs' (service not in include list)
00009651 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 155
00009651 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=* EXSERVICE=conn,memory' (service excluded)



this works -- moved only the duration part to be on the line within the HOST paragraph  [[*** Match with '$XCD  DURATION>5' ***]]

$XCD=MAIL user at user.com FORMAT=PLAIN RECOVERED TIME=*:2101:0729  
#--------------------------------------------------------------------

HOST=* SERVICE=conn
     MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5  
        $XCD  DURATION>5 


larry:/xymondev/ -L:=> /xymondev/dev1/server/bin/xymond_alert --test gelaptopp conn --duration=6 --time=1366164>
00009878 2013-04-16 22:01:23 send_alert gelaptopp:conn state Paging
00009878 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 132
00009878 2013-04-16 22:01:23 *** Match with 'HOST=* SERVICE=conn' ***
00009878 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 133
00009878 2013-04-16 22:01:23 *** Match with 'MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5' ***
00009878 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00009878 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 134
00009878 2013-04-16 22:01:23 *** Match with '$XCD  DURATION>5' ***
00009878 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00009878 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 151
00009878 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=msgs' (service not in include list)
00009878 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 155
00009878 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=* EXSERVICE=conn,memory' (service excluded)


If I try and move the TIME as well it fails to match. Why?

$XCD=MAIL user at user.com FORMAT=PLAIN RECOVERED 
#--------------------------------------------------------------------

HOST=* SERVICE=conn
     MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5  
        $XCD  TIME=*:2101:0729  DURATION>5 



larry:/xymondev/ -L:=> /xymondev/dev1/server/bin/xymond_alert --test gelaptopp conn --duration=6 --time=1366164>
00010046 2013-04-16 22:01:23 send_alert gelaptopp:conn state Paging
00010046 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 132
00010046 2013-04-16 22:01:23 *** Match with 'HOST=* SERVICE=conn' ***
00010046 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 133
00010046 2013-04-16 22:01:23 *** Match with 'MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5' ***
00010046 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00010046 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 151
00010046 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=msgs' (service not in include list)
00010046 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 155
00010046 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=* EXSERVICE=conn,memory' (service excluded)


this does not work either ... 
$XCD=MAIL user at user.com FORMAT=PLAIN RECOVERED DURATION>5
#--------------------------------------------------------------------

HOST=* SERVICE=conn
     MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5  
        $XCD  TIME=*:2101:0729  


00013510 2013-04-16 22:01:23 send_alert gelaptopp:conn state Paging
00013510 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 132
00013510 2013-04-16 22:01:23 *** Match with 'HOST=* SERVICE=conn' ***
00013510 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 133
00013510 2013-04-16 22:01:23 *** Match with 'MAIL user at user.com  FORMAT=PLAIN RECOVERED TIME=*:2101:0729  DURATION>5' ***
00013510 2013-04-16 22:01:23 Mail alert with command '/var/spool/mail/xymondev1 "Xymon [12345] gelaptopp:conn CRITICAL (RED)" user at user.com'
00013510 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 151
00013510 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=msgs' (service not in include list)
00013510 2013-04-16 22:01:23 Matching host:service:dgroup:page 'gelaptopp:conn:NONE:test' against rule line 155
00013510 2013-04-16 22:01:23 Failed 'HOST=* SERVICE=* EXSERVICE=conn,memory' (service excluded)

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130416/46295f30/attachment.html>


More information about the Xymon mailing list