Talking about zabbix 1.1 (and so referring to 1.1 syntax), it is possible to put custom intems into zabbix_agentd.conf, for example:
If I want to create a custom item that accepts arguments, how can I do?
If I write something like this:
then after the comma goes the shell command, in that command how can I refer to the item's argument? Can I write something like this:
where $1 refers to mycommand[] argument?
Or maybe just isn't possible to use arguments?
Code:
UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" UserParameter=mysql.version,mysql -V
If I write something like this:
Code:
UserParameter=mycommand[*],
Code:
UserParameter=mycommand[*],shellcommand [B]$1[/B]
Or maybe just isn't possible to use arguments?
Comment