Ad Widget

Collapse

Monitoring a line WITH regexp.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brownguy
    Junior Member
    • Feb 2015
    • 3

    #1

    Monitoring a line WITH regexp.

    Hello everyone,

    I am trying to monitor a txt file, however I am having problems getting the trigger to work properly. (Windows 2012 R2)

    ITEM
    Item: TextMonitoring
    Type: Zabbix Agent (Active)
    Key: vfs.file.regexp[C:\test.txt,(("Port status: ")(?!("active"))),,,,]
    Type of Info: text
    update (sec): 15

    TRIGGER
    name: textLogTrigger
    Expression:

    {hostname:vfs.file.regexp[C:\test.txt,(("Port status: ")(?!("active"))),,,,].nodata(30)}=0

    TEXT.txt
    name: test.txt
    the line I am monitoring,
    Port status: active
    or
    Port status: anything other then active.


    my thought on the trigger,
    {hostname, function [location,regexp=if "Port status :" has anything else(?!) than "active", PROBLEM, else OK (if i stated that correctly.)

    confused because I can manual trigger it by changing "=0" at the end of the trigger
    0 = problem
    1 = OK
    but cannot get the trigger to..... trigger.
Working...