Created
January 14, 2016 10:46
-
-
Save n-johnson/59cc6da6e19d1b0a8d69 to your computer and use it in GitHub Desktop.
remote cpu temp monitor
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
#!/bin/bash | |
host01_temp() { | |
local key="host01.cpu.temp" | |
local temp=$(ssh stats@10.0.0.1 sensors | grep 'Physical id' | awk -F':' '{print $2 }' | awk '{print $1}' | tr -d '+' | tr -d '°C') | |
echo "$key $temp" | |
} | |
statsd `host01_temp` |
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
#!/bin/bash | |
key="$1" | |
value="$2" | |
date=$(date +%s) | |
echo "$key $value $date" | nc -q0 127.0.0.1 2003 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment