[Xymon] Combining Macros in alerts.cfg EXHOST?
    Jeremy Laidman 
    jlaidman at rebel-it.com.au
       
    Wed Nov 28 00:55:33 CET 2012
    
    
  
On 28 November 2012 07:32, Betsy Schwartz <betsy.schwartz at gmail.com> wrote:
> I'm not getting this to work , with various combinations :
>     %($NOPAGE,$VIP)
>
Can you use a comma in this context?  If so, this is news to me, and I
don't think it's reflected in the doco.  If not, it could explain why your
$VIP is not matching, although I don't know
>     %($NOPAGE|$VIP)
>
I think this should work, as long as you remove the percent (%) from the
macros, and as long as the commas in $VIP are addressed (assuming commas
are invalid).  So:
   $NOPAGE=(^.*eng|^netmon2).example.com
   $VIP=(^web|^ftp|^mail-relay).example.com|web-vip|mail-vip
   HOST=* EXHOST=%($NOPAGE|$VIP) ...
[I'm assuming you had a typo in your NOPAGE definition: "^*.eng" should be
"^.*eng"]
You can simplify these regexps by putting the caret only once at the start:
   $NOPAGE=^(.*eng|netmon2).example.com
   $VIP=^(web|ftp|mail-relay).example.com|web-vip|mail-vip
Or even moving the carets to the EXHOST definition:
   $NOPAGE=(*.eng|netmon2).example.com
   $VIP=(web|ftp|mail-relay).example.com|web-vip|mail-vip
   HOST=* EXHOST=%^($NOPAGE|$VIP) ...
Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20121128/a94d6f9a/attachment.html>
    
    
More information about the Xymon
mailing list