thecamels-zabbix/zabbix_agentd.conf.d/powermt.conf

6 lines
654 B
Plaintext
Raw Normal View History

UserParameter=powermt-path-list, echo -e "{\n\"data\":["; sudo /sbin/powermt display dev=all | tail -n+9 | grep -v "^$" | awk '{ print "{\"{#PATH}\":\""$3"\" }," }' | head -c -2; echo -e "]\n}";
UserParameter=powermt-device-state, sudo /sbin/powermt display dev=all 2>&1 | grep -c state=alive
UserParameter=powermt-path-mode[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 6 }' | grep -c active
UserParameter=powermt-path-state[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 7 }' | grep -c alive
UserParameter=powermt-path-errors[*], sudo /sbin/powermt display dev=all | grep "$1" | awk '{ print $ 9 }'