Ad Widget

Collapse

Differences in behavior of regular expressions within Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vestias
    Junior Member
    • Aug 2017
    • 1

    #1

    Differences in behavior of regular expressions within Zabbix

    I am experiencing some weird differences in how Zabbix handles regular expressions:
    In Administration->General->Regular Expressions I created an expression consisting of a combination of multiple terms with different expression types (Any character string included, character string not included, result is FALSE):

    The troubling term is the "result is FALSE term": "ovpn-client.\d+.: Exiting due to fatal error".
    If I use the integrated test I get the expected results: if the test string (e.g. "ovpn-client[28275]: Exiting due to fatal error") contains the term, the result is false and if it does not, the result is true.

    Now things are getting interesting:
    If I apply this regular expression to a log-monitoring item, where I want to exclude specific lines, for all terms I get the correct result, except the described one. For example if the log contains the string "ovpn-client[28275]: Exiting due to fatal error", the regular expression in the item does not filter this line.

    Are there any differences between how Zabbix handles regular expressions in the general-tab and in an item?
    Last edited by vestias; 03-09-2017, 12:12.
Working...