Ad Widget

Collapse

regexp function in trigger expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sspyrison
    Junior Member
    • Jun 2007
    • 5

    #1

    regexp function in trigger expression

    Hello all,

    Can anyone offer some working examples of regexp functions working within trigger expressions? Ideally, with actual regular expressions and not just strings?

    Per my prior post, I kind of have it working with strings, spaces, and simple range of characters ( [(] for example ), but when add in things like .* things start to fail. I get bad matches or no matches. So, it's great that I can match strings, but ideally we should be able to use patterns.

    I know this is a vague request, but if anyone could post some working examples I think it would be a great deal of help.

    Does anyone know if regular expression support in zabbix is limited to basic? Do they support extended regular expressions or perl-compatible? Is that something that is configurable at build time?

    Thanks!
  • sspyrison
    Junior Member
    • Jun 2007
    • 5

    #2
    examples

    Well, I take it all back.... I'll blame it on hasty testing.

    It does seem to be working, and with extended regular expressions. Example trigger I have working:

    zabbix:log[/var/adm/messages].regexp(Power Supply [0-9]+ OVERHEATING)>0

    Comment

    • dmz
      Junior Member
      • Jun 2005
      • 26

      #3
      I've gotten my server to log & alert based on regular expressions. The problem I'm having is that my logs are active. I get an alert and when I get to the zabbix console (say 2-5 minutes later) the log file has been parsed again and the regex is now OFF because it's not seen that error again.

      How can I keep the trigger active until either another trigger goes off & turns it off (ie status that things are OK) or until it gets acknowledged?

      --
      Update:

      I found this while searching. Still testing TRIGGER.STATUS but hoping i'll get it running soon!
      Last edited by dmz; 25-07-2007, 04:47.

      Comment

      Working...