PDA

View Full Version : vfs.file.regmatch woes


richardh
12-12-2005, 01:31
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
12-12-2005, 23:01
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

Rudolf
13-12-2005, 09:27
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