graph your harddisk temperature
Moderators: Developers, Moderators
graph your harddisk temperature
Hi guys,
Just wrote a small script to graph my harddisk temperature - a nice way to see how well they are doing - I found my discs going just outside of operating temperatures during backup
Documented it here - as this forum is not searchable by google - and everyone should be able to find this - this script can be used for more than just Cacti
http://vsen.dk/monitoring
Have fun.
Just wrote a small script to graph my harddisk temperature - a nice way to see how well they are doing - I found my discs going just outside of operating temperatures during backup
Documented it here - as this forum is not searchable by google - and everyone should be able to find this - this script can be used for more than just Cacti
http://vsen.dk/monitoring
Have fun.
HDDTEMP --> another way to do the same
first of all - I'm not a native English speaker........
I found out another way to get your harddisk temperature, using the unix hddtemp program (visit http://www.guzu.net/linux/hddtemp.php - some binary packages available too)
First you have to allow your cacti user to get the drive temperature. I assume you have sudo:
* run visudo as root
* edit to get something like this (I'm monitoring two drives: /dev/hdc and /dev/hdd)
* save and exit with <escape> <:> <wq>
* create a script hddtemp.sh in you /cacti/scripts/ dir:
this returns the actual temperature of the specified drive in degrees Celsius without unit within 2 seconds.
* save and exit
* now go to your cacti website, create a new data input method. Specify to call the script like this:
* save the data input method, enter it again and create an input field to enter the drive in the data source, and an output field to write the temperature to. Make sure to set the drive path input variable to be entered in the data source
* save.
* create a new data source for every drive, using the input method we just created. Specify the harddisk drive path like /dev/hdx (there has to be some way for scsi drives too)
* now create graphs to display your harddisk temperatures using the data sources you just created.
* have fun!
[EDIT]
view my results: http://eedenvan.demon.nl/cacti/graph.ph ... raph_id=19
I found out another way to get your harddisk temperature, using the unix hddtemp program (visit http://www.guzu.net/linux/hddtemp.php - some binary packages available too)
First you have to allow your cacti user to get the drive temperature. I assume you have sudo:
* run visudo as root
* edit to get something like this (I'm monitoring two drives: /dev/hdc and /dev/hdd)
Code: Select all
www-data ALL=NOPASSWD:/usr/sbin/hddtemp -n /dev/hdc
www-data ALL=NOPASSWD:/usr/sbin/hddtemp -n /dev/hdd
* create a script hddtemp.sh in you /cacti/scripts/ dir:
Code: Select all
#!/bin/sh
#sudo /usr/sbin/hddtemp -n $1
* save and exit
* now go to your cacti website, create a new data input method. Specify to call the script like this:
Code: Select all
path/to/cacti/cacti/scripts/hddtemp.sh <drivevar>
* save.
* create a new data source for every drive, using the input method we just created. Specify the harddisk drive path like /dev/hdx (there has to be some way for scsi drives too)
* now create graphs to display your harddisk temperatures using the data sources you just created.
* have fun!
[EDIT]
view my results: http://eedenvan.demon.nl/cacti/graph.ph ... raph_id=19
Last edited by faked on Tue Dec 07, 2004 3:18 pm, edited 1 time in total.
I see this working locally, but how would i monitor hdtemps on remote machines ?
EDIT:
this script workd for me. Taking hostname and full device path (/dev/hde) as arguments.
EDIT:
this script workd for me. Taking hostname and full device path (/dev/hde) as arguments.
Code: Select all
nc $1 7634 | sed -e 's/^|//' -e 's/||/\n/g' | awk -F \| --assign=drive=$2 '$1 == drive {print $3}'
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: graph your harddisk temperature
What about "+harddisk +temperature site:forums.cacti.net"?klavs wrote:Documented it here - as this forum is not searchable by google -
Reinhard
Who is online
Users browsing this forum: No registered users and 0 guests