PDA

View Full Version : Has the zabbix_sender the same posibilities as the agent?


Tristan
07-10-2008, 13:53
I use within my zabbix environment a lot of userparameters and it works perfect. But one of my coworkers had ask me if it's possible to use zabbix_sender to send the information to the zabbix server within a script.

I have tried a few options but no results.

When i use my zabbix_agent i use the following userparameter:
UserParameter=appparam , cat /tmp/test.txt

this works perfect, but when i use the syntax in zabbix_sender it doen't work:
zabbix_sender -o cat /tmp/test.txt
It just sends the string "cat /tmp/test.txt" to zabbix.

so when i use a subshell it even doens't work:
zabbix -o $( cat /tmp/test.txt )

My question is: is this possible? I can use variable's but i need a better solution.

Tenzer
07-10-2008, 14:31
Using '... -o "`cat test.txt`"' works fine for me, even with line changes and apostrophes.

Btw, if you use the "-vv" flag, it makes it a lot easier to debug, as the data it's trying to send is written by the zabbix_sender.

Tristan
24-01-2009, 13:02
Does someone has an idea to do the samething in windows with the zabbix_sender?
I can't get it to work.

Tristan
24-01-2009, 13:10
Does someone has an idea to do the samething in windows with the zabbix_sender?
I can't get it to work.