Ad Widget

Collapse

vfs.file.regmatch wildcard / multiple files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ulewu
    Junior Member
    • Feb 2011
    • 5

    #1

    vfs.file.regmatch wildcard / multiple files

    Hello there...

    i like to know if it is possible do create a item with the
    vfs.file.regmatch key to check all files in an given directory for the expression.

    i think of something like:
    vfs.file.regmatch[c:\logfiles\login*.log,error]

    if i do so i get an not supportet message from zabbix.
    if i put a full filename in (c:\logfiles\login-username.log) as example it works.

    thanks for any advise
  • hirschnf
    Member
    • Jan 2010
    • 56

    #2
    it seems it is not possible to use regular expressions in the filename.

    Code:
      8460:20110817:093519.469 Active check [vfs.file.regmatch["d:\nvt\log\patrol_[0-9]{8,8}.log",".*"]] is not supported. D
    isabled.
      8460:20110817:094519.633 Active check [vfs.file.regmatch["d:\nvt\log\patrol_.*.log",".*"]] is not supported. Disabled.
    
      8460:20110817:094719.666 Active check [vfs.file.regmatch["d:\nvt\log\patrol_*.log",".*"]] is not supported. Disabled.
    Perhaps it is possible in newer versions than 1.8.5?

    For me, I'm using global Macros for example {$DATE_YEAR}. Then I have write a little PHP Script which runs as a cronjob.

    In this script I update the values from Global Macros so I can use these macros in the filename of the "vfs.file"-Key in the item.
    Attached Files
    Last edited by hirschnf; 17-08-2011, 14:44. Reason: Update

    Comment

    • pvil
      Junior Member
      • Apr 2024
      • 1

      #3
      Thank You hirschnf !
      Your script globalmacro_mod.php saved me.

      Comment

      Working...