zabbix传参形式的自定义监控项
目录
警告
本文最后更新于 2020-05-30 17:09,文中内容可能已过时。
agent端配置
[*]用来接收参数,用$可以调用,参数一$1,参数二$2,参数三$3....以此类推
自定义key: UserParameter=tps[*],sh /server/scripts/tps.sh $1
|
|
测试获取sda:
|
|
大概执行过程: tps[sda]
|
|
这样传参的形式可以提高灵活性。
web配置


请我喝杯水


[*]用来接收参数,用$可以调用,参数一$1,参数二$2,参数三$3....以此类推
自定义key: UserParameter=tps[*],sh /server/scripts/tps.sh $1
|
|
测试获取sda:
|
|
大概执行过程: tps[sda]
|
|
这样传参的形式可以提高灵活性。