View Full Version : system.run in triggers
st4nis1av
20-12-2006, 15:28
Hi! first sorry for my poor english.
I have script name "wbtest" with output 1 or 0, depended on
wbinfo -t output.
can I somehow do something like
{host:system.run["/etc/zabbix/wbtest].last(0)}]=0
? Is this possible?
thank's for help )
just2blue4u
20-12-2006, 16:17
Welcome here! :)
Why don't you try it out?
But make sure you say {host:system.run["/etc/zabbix/wbtest"].last(0)}=0
Notice that you have to monitor system.run["/etc/zabbix/wbtest"] before you can use it as a trigger!
st4nis1av
21-12-2006, 07:51
Yes, i have monitored item
system.run["/etc/zabbix/wbtest"] active,
but in creating trigger i have this error:
Expression [{gentoo:system.run["/etc/zabbix/wbtest"].last(0)}] does not match to [server:key.func(param)]
is this possible to use system.run func in triggers ??
You could try to shorten the item, then setup the trigger, then change the item back to the longer specification (and the key in the trigger will be changed automatically).
That's how I had to setup a lot of system.run triggers for commandline actions; not comfortable, but it works.
st4nis1av
21-12-2006, 09:47
could you post example here ?
You may try system.run[/etc/zabbix/wbtest]. I hope it helps.
st4nis1av
21-12-2006, 10:34
{gentoo:system.run[/etc/zabbix/wbtest]}=0
and {gentoo:system.run[/etc/zabbix/wbtest]} doesn't work (
same error:
Expression [{gentoo:system.run[/etc/zabbix/wbtest]}] does not match to [server:key.func(param)]
- change item to {gentoo:system.run[ps]}
- create trigger
- change item back to system.run{gentoo:system.run[/etc/zabbix/wbtest]}
st4nis1av
21-12-2006, 11:46
Heva, thank's for you'r help!
All working just fine!