Add monitoring for Network Adapters - Brocade

This commit is contained in:
Kamil Porembiński 2014-11-22 22:53:01 +01:00
parent de73a4c972
commit ddad10e793
2 changed files with 1036 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
UserParameter=bcu-adapter-list, echo -e "{\n\"data\":["; sudo bcu adapter --list | head -n-1 | tail -n+4 | awk '{ print $1 }' | awk '{ print "{\"{#ADAPTER}\":\""$0"\"}," }' | head -c -2; echo -e "]\n}";
UserParameter=bcu-adapter-state[*], sudo bcu adapter --query $1 | grep status | grep -c good
UserParameter=bcu-adapter-query[*], sudo bcu adapter --query $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
UserParameter=bcu-adapter-temperature[*], sudo bcu diag --tempshow $1 | cut -d ":" -f 2 | sed 's/^[ \t]*//g' | cut -d " " -f 1
UserParameter=bcu-port-list, echo -e "{\n\"data\":["; sudo bcu port --list -terse | head -n-1 | tail -n+5 | awk '{ print $1 }' | awk '{ print "{\"{#PORT}\":\""$0"\"}," }' | head -c -2; echo -e "]\n}";
UserParameter=bcu-port-state[*], sudo bcu port --query $1 | grep "state" | grep -c "Linkup"
UserParameter=bcu-port-speed[*], sudo bcu port --speed $1 | grep "Current" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
UserParameter=bcu-port-stats[*], sudo bcu port --stats $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
UserParameter=bcu-lport-stats[*], sudo bcu lport --stats $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'