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.
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.
Comment