Ad Widget

Collapse

vfs.file.regmatch woes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richardh
    Junior Member
    • Dec 2005
    • 3

    #1

    vfs.file.regmatch woes

    I am trying to read a 1 line text file and check whether it contains either a 1 or 0E0. I have tried to set this up using vfs.file.regmatch but I keep getting an error that the check returns an empty string

    Got empty string from [myserver] IP [x.x.x.x] Parameter [vfs.file.regmatch[/tmp/popresult, [1]]]

    I'm not exactly sure on the usage of this check, there is very little info in the manual

    Could someone point me in the right direction with configuring this check?

    cheers
  • richardh
    Junior Member
    • Dec 2005
    • 3

    #2
    I can telnet to port 10050 and get a strng back with the check... actually all I get is a zero but all the other vfs checks return a string and all give the same error within zabbix...

    I have anoher Zabbix agent check running on the box and it works ok

    Comment

    • Rudolf
      Member
      • Dec 2004
      • 90

      #3
      Hi,

      In the official zabbix manual we read: "Scripts used for user parameters must have exit status '0' and must not return empty result (empty string or string having EOL character only), otherwise parameters will be treated as unsupported."

      try doing something like:
      if returnstring = empty then
      returnstring = 0
      else
      returnstring = 1
      end
      like that the return value is 0 (or 1) and that's no problem for zabbix

      Comment

      Working...