Ad Widget

Collapse

vfs.file.regmatch is not working on my Zabbix 2.0.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sneak
    Junior Member
    • Jul 2013
    • 6

    #1

    vfs.file.regmatch is not working on my Zabbix 2.0.6

    Hello,

    We are running Zabbix 2.0.6 at work.

    I want to monitor some very specific tables on a Microsoft SQL Server and since the database monitor is not working correctly on 2.0.6 for me I thought I'd do a workaround.

    I make a job which fills a .txt file on the server and want to make a trigger based on a vfs.file.regmatch-item.

    My file looks like this:

    Code:
    Job 'JOBNAME' : Step 1, 'SQL query' : Began Executing 2013-07-26 18:03:00
    
               
    -----------
    0
    
    (1 rows(s) affected)
    My item looks like this:

    vfs.file.regmatch[C:\FOLDER\NAMEOFFILE.txt,/-----------\s0/gm,ASCII]
    So basically I want to check if there is a zero in place. If it shows any other value the item should result in '1'.

    This is not working - it's never '1'. It seems to me that the regex is correct, but zabbix can't handle it.

    I'm thankful for any help on this!
    Last edited by Sneak; 27-07-2013, 10:46.
  • Sneak
    Junior Member
    • Jul 2013
    • 6

    #2
    No ideas for this?

    Does this even work for Windows? It seems like it can't even find the file in the folder with vfs.file.exists... =/

    Comment

    • Sneak
      Junior Member
      • Jul 2013
      • 6

      #3
      Ok, just in case anybody cares or runs into the same problem...

      After I tried everything with regmatch for two days, I got frustrated.

      So now I'm using another solution:

      The output file get's cut by a powershell script which starts in a setp after the creation of the file by the sql job.
      This file then only contains the number of the count-query and can be accessed with vfs.file.content.

      Comment

      Working...