Ad Widget

Collapse

User Macro Regexp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanoden
    Junior Member
    • May 2013
    • 1

    #1

    User Macro Regexp

    I've applied some macros to my hosts, ie {$ENVIRONMENT} value 'Production', and I would like to check for this in triggers as follows:

    {ops-search-01.prod.buydomains.com:system.cpu.util[,iowait].last(#2)}>95 & {{$ENVIRONMENT}.regexp(Production)}>0

    I get the error

    Incorrect user macro "{{$ENVIRONMENT}}" format is used in expression.

    I've tried various formats, but nothing seems to work. Can you use the regexp function on a User Macro? If so, how should I format it?
Working...