Net-SNMP lm_sensors temperature, fan speed, voltage monitor

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Fixed it

Post by knebb »

Sorry to wakeup this old thread ;)

Just one question:

Anyone got lm_sensors with the net-snmp 5.1.3.1 on the SuSE Enterprise 9 (SLES9) running?

From which version on is there support for this?

If it doesn't work, I will have to write some scripts :P
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Fixed it

Post by knebb »

knebb wrote:If it doesn't work, I will have to write some scripts :P
I did it meanwhile.

To all who are interested in it:
First, the script itself:

Code: Select all

#!/bin/bash
TFILE="/tmp/tmp.$$"
sensors > $TFILE
RET=""

case $2 in
        "temp")
                RET=`grep -1 "$1 DDR VRM" $TFILE| tail -1|awk  '{print $1}'|sed                                              s/+//g|cut -d "▒" -f 1`
;;
        "fan")
                RET=`grep "$1 Fan" $TFILE | tail -1| awk '{print $3}'`
                ;;
        "volt")
                RET=`grep "$1 Volt" $TFILE| tail -1| awk '{print $3}'| sed s/+//                                             g`
                ;;
esac
rm -f $TFILE

echo $RET
And the snmpd.conf

Code: Select all

exec .1.3.6.1.4.1.2021.555 lms1 /root/read_sensors.sh CPU1 temp
exec .1.3.6.1.4.1.2021.556 lms2 /root/read_sensors.sh CPU2 temp
exec .1.3.6.1.4.1.2021.557 lms3 /root/read_sensors.sh CPU1 volt
exec .1.3.6.1.4.1.2021.558 lms4 /root/read_sensors.sh CPU2 volt
exec .1.3.6.1.4.1.2021.559 lms5 /root/read_sensors.sh CPU1 fan
exec .1.3.6.1.4.1.2021.560 lms6 /root/read_sensors.sh CPU2 fan

Obviously, this is special for my Tyan Thunder K8.. mainboard. For your purpose you have to change the above files accordingly.

Just if someone needs some hints.
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Post by RaduAlexandru »

deleted
Last edited by RaduAlexandru on Tue Jun 02, 2009 7:16 am, edited 1 time in total.
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Post by RaduAlexandru »

deleted
Last edited by RaduAlexandru on Tue Jun 02, 2009 7:17 am, edited 1 time in total.
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Post by RaduAlexandru »

deleted
Last edited by RaduAlexandru on Tue Jun 02, 2009 7:17 am, edited 1 time in total.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

thanks
Xi0N
Posts: 36
Joined: Mon Jul 06, 2009 1:03 pm

Post by Xi0N »

Hi! Is there any way to get this working nowadays?
thanks!
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Post by RaduAlexandru »

I don't think so... Try using other scripts...
I found a nice replacement in http://forums.cacti.net/about11590.html
Xi0N
Posts: 36
Joined: Mon Jul 06, 2009 1:03 pm

Post by Xi0N »

RaduAlexandru wrote:I don't think so... Try using other scripts...
I found a nice replacement in http://forums.cacti.net/about11590.html
Thanks!!! I will have a look!!!!!!!
sidacoq
Posts: 14
Joined: Wed Jul 30, 2008 3:34 am
Location: Chartres

Re: Net-SNMP lm_sensors temperature, fan speed, voltage moni

Post by sidacoq »

(nothing)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests