Created
January 7, 2020 20:10
-
-
Save drwahl/19ec7bcf58ec4f0e2e13d42562d84212 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# $1 should be one of: | |
# SpdAvg | |
# SpdGst | |
# DirAvg | |
# DirGst | |
result=$(wget -q -O - 'http://rwis.mdt.mt.gov/scanweb/RPUStatus.asp?Pageid=RPUStatus&Units=English&Groupid=564000&Siteid=564005' | \ | |
grep -A6 $1 | \ | |
tail -1 | \ | |
cut -d'>' -f2 | \ | |
cut -d' ' -f1 | \ | |
cut -d'<' -f1) | |
case $1 in | |
SpdAvg) | |
zbxkey=wind.spdavg | |
;; | |
SpdGst) | |
zbxkey=wind.spdgst | |
;; | |
DirAvg) | |
zbxkey=wind.diravg | |
;; | |
DirGst) | |
zbxkey=wind.dirgst | |
;; | |
esac | |
zabbix_sender -z zabbixserver -s 'host' -k $zbxkey -o $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment