Added slacktee.sh notification

Added slacktee.sh notification
slacktee.sh – https://github.com/course-hero/slacktee
This commit is contained in:
NoLooseEnds 2018-05-06 13:30:11 +02:00
parent 5e66cf53df
commit 32e763017b
3 changed files with 15 additions and 10 deletions

View file

@ -3,8 +3,9 @@
# ----------------------------------------------------------------------------------
# Script for setting manual fan speed to 2160 RPM (on my R710)
#
# Requires ipmitool  apt-get install ipmitool
# Tested on Ubuntu 17.04
# Requires:
# ipmitool  apt-get install ipmitool
# slacktee.sh  https://github.com/course-hero/slacktee
# ----------------------------------------------------------------------------------
@ -16,6 +17,6 @@ IPMIUSER=root
IPMIPW=calvin
printf "Activating manual fan speeds! (2160 RPM)" | systemd-cat -t R710-IPMI-TEMP
echo "Activating manual fan speeds! (2160 RPM)"
echo "Activating manual fan speeds! (2160 RPM)" | slacktee.sh -t "R710-IPMI-TEMP [$(hostname)]"
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW raw 0x30 0x30 0x01 0x00
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW raw 0x30 0x30 0x02 0xff 0x09

View file

@ -1,11 +1,12 @@
#!/usr/bin/env bash
#!/bin/bash
# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed to high send the raw IPMI command to enable dynamic fan control.
#
# Requires ipmitool  apt-get install ipmitool
# Tested on Ubuntu 17.04
# Requires:
# ipmitool  apt-get install ipmitool
# slacktee.sh  https://github.com/course-hero/slacktee
# ----------------------------------------------------------------------------------
@ -17,7 +18,7 @@ IPMIUSER=root
IPMIPW=calvin
# TEMPERATURE
# Change this to the temperature in celcius you are comfortable with.
# Change this to the temperature in celcius you are comfortable with.
# If the temperature goes above the set degrees it will send raw IPMI command to enable dynamic fan control
MAXTEMP=27
@ -28,8 +29,8 @@ TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW sdr type tempera
if [[ $TEMP > $MAXTEMP ]];
then
printf "Temperature is too high! Activating dynamic fan control! ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
echo "Temperature is too high! Activating dynamic fan control! ($TEMP C)"
printf "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
echo "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | /usr/bin/slacktee.sh -t "R710-IPMI-TEMP [$(hostname)]"
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW raw 0x30 0x30 0x01 0x01
else
# healthchecks.io

3
R710-IPMI-TEMP/readme.md Normal file → Executable file
View file

@ -9,6 +9,9 @@ I run the script via CRON every 5 minutes from my Ubuntu Server VM running on ES
Notice thate I use [healthchecks.io](https://healthchecks.io) in the script to notify if the temp goes to high (it would also trigger if the internet goes down for some reason). Remember to get your own check URL if you want it, or else just remove the curl command.
I'm also currently testing out [slacktee.sh](https://github.com/course-hero/slacktee) to get notifications in my slack channel.
The Scripts [Reddit thread](https://www.reddit.com/r/homelab/comments/779cha/manual_fan_control_on_r610r710_including_script/)
*****