IPMI sensors -- update June 21, 2009

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

Moderators: Developers, Moderators

ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

I posted a new version of the script with many significant enhancements. The biggest change is a switch from the expensive and slow script query interface to the persistent and fast script server interface. I also dropped the comma-separated parameters and switched to a colon-separated "bundle" for IPMI arguments, tightened up the array and variable management, added a lot more error checking, and otherwise did a complete rewrite of the script.

Due to the changes, the script and resource xml files need to be reinstalled and any data queries need to be reimported. However the existing graphs and data sources should continue to operate afterwards.

I've also moved the files to this page on my web server so that I can more easily maintain them
tonyfairbanks
Posts: 1
Joined: Thu Jun 25, 2009 12:12 pm

Post by tonyfairbanks »

I noticed a problem with usernames/passwords when switching over to the new version of your scripts. The new XML files contain lines like this:

Code: Select all

<arg_prepend>|host_hostname|:ipmi_username:ipmi_password fan</arg_prepend> 
This seemed to stop the passthrough of the SNMPv3 username and password to the rest of the script. When I changed them to look like this:

Code: Select all

arg_prepend>|host_hostname|:|host_snmp_username|:|host_snmp_password| fan</arg_prepend>  
things seem to work as expected. Am I doing something wrong or is this a bug in the XML files?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

The fields have to be hardcoded values in the XML to reflect site-specific credentials. The ipmi_username and ipmi_password are just placeholders for the hard-coded values. If you are using the NULL username and password just set them blank.

I had used SNMP3 username and password in the past, but since that technology is becoming more prevalent (and works in Cacti now) I felt like I should stop.
markee
Posts: 5
Joined: Mon Jul 13, 2009 12:06 am

Post by markee »

Hi, I'm new here. This script works good with me. However I would like to know if:

Is it possible to send out any alert via email if the temperature reaches certain threshold?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

markee wrote:Is it possible to send out any alert via email if the temperature reaches certain threshold?
Thold plugin.
markee
Posts: 5
Joined: Mon Jul 13, 2009 12:06 am

Post by markee »

Thanks, will look on it.
markee
Posts: 5
Joined: Mon Jul 13, 2009 12:06 am

Post by markee »

Hi again..hope someone can enlighten me.
In IPMI - Thermal Sensors Data Query of this template, there's Temp & Planar Temp?

What's the difference of the two? Which one should be use to monitor the temperature of the server?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

You'll need to ask your server vendor about specific sensors
mcresti
Posts: 1
Joined: Thu Aug 27, 2009 9:33 am

Post by mcresti »

ehall wrote:I've also moved the files to this page on my web server so that I can more easily maintain them
The link in the site is corrupted can anyone post the file here?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

mcresti wrote:
ehall wrote:I've also moved the files to this page on my web server so that I can more easily maintain them
The link in the site is corrupted can anyone post the file here?
I verified and uploaded the tarball again. Let me know if you still have problems with it.
rluiten
Posts: 2
Joined: Thu Nov 19, 2009 10:51 pm

Post by rluiten »

Just ran across your Cacti templates for IPMI good stuff :)
Have fixed up two hiccups relating to Dells IPMI results.
Yay for non numerical results from a given type of sensor be it Temperature or Fan.
I still have one remaining issue I am still to figure out why graphs are not rendering at moment.
The other graphs that come with the VirtualAppliances Cacti setup render fine, but the ones added form the template do not.
I have attached a screen shot

The Device I have setup in Cacti the has no snmp so Cacti actually shows the box as "SNMP Error" also with Status "Down" could this be part of the issue for graph rendering ?

Below are the problems I had.

I worked around them by modifyign the regex for now but my solution at the moment is just a hack to see if i can get data to flow.

FROM: if (preg_match("/^(.+?)\s+\|.+\|.+\|.+\|\s([\-|\.|\d]+)\s/",
TO: if (preg_match("/^(.+?)\s+\|.+\|.+\|.+\|\s(([\-|\.|\d]+\s)|Disabled|Fully Redundant)/",



Execute '/usr/bin/ipmitool -I lan -H AcaciaBMC.wilddog.int -U root -P password sdr type temperature'
Returns
Temp | 01h | ok | 3.1 | -38 degrees C
Temp | 02h | ok | 3.2 | 50 degrees C
Temp | 05h | ok | 10.1 | 40 degrees C
Temp | 06h | ok | 10.2 | 40 degrees C
Ambient Temp | 08h | ok | 7.1 | 26 degrees C
CPU Temp Interf | 76h | ns | 7.1 | Disabled

Which breaks the script as the last line has not got a integer value to match the regex

So no sensor name is picked up.
Execute "/usr/bin/php -q /usr/share/cacti/site/scripts/ss_ipmitool_sensors.php AcaciaBMC.wilddog. int:root:password temperature query sensorName"
Returns as a rule the following
1:Temp
2:Temp
3:Temp
4:Temp
5:Ambient Temp

Notice: Undefined index: name in /usr/share/cacti/site/scripts/ss_ipmitool_sensors.php on line 412
6:


Also execute '/usr/bin/ipmitool -I lan -H AcaciaBMC.wilddog.int -U root -P passw0rd! sdr type fan'
Returns
FAN 1 RPM | 30h | ok | 7.1 | 2625 RPM
FAN 2 RPM | 31h | ok | 7.1 | 2700 RPM
FAN 3 RPM | 32h | ok | 7.1 | 2775 RPM
FAN 4 RPM | 33h | ok | 7.1 | 2700 RPM
FAN 5 RPM | 34h | ok | 7.1 | 2700 RPM
FAN 6 RPM | 35h | ok | 7.1 | 2700 RPM
FAN 7 RPM | 36h | ok | 7.1 | 4500 RPM
FAN 8 RPM | 37h | ok | 7.1 | 4500 RPM
Fan Redundancy | 75h | ok | 7.1 | Fully Redundant

Which also breaks the regex above.

Robin.
Attachments
2009-11-20 14 14 35 example cacti graph issue.png
2009-11-20 14 14 35 example cacti graph issue.png (28.9 KiB) Viewed 8419 times
rluiten
Posts: 2
Joined: Thu Nov 19, 2009 10:51 pm

Post by rluiten »

Figured out why I wasnt getting graphs.
The udp ping method wont detect the BMC on dell servers as up, so the device was down and it never collected data.

Theres some comments around about getting the ping to be run as root to use ICMP ping but i havnt figured that out yet.

However if i run the cmd.php as root it pings as up and collects.

Hope this helps someone down the track.
hayou
Posts: 5
Joined: Wed Jan 13, 2010 4:13 am
Contact:

Post by hayou »

hi everybody,
I have Dell 2950, with ipmi v2. To use my scipt, you need :

** create on IPMI : 1 user
username : cacti
password : cacti

** on your cacti's server :
ipmitool installed


here is my template :
1) You have to put my script on you cacti's folder scripts ( /var/www/cacti/scripts/ )
2) rename it : check_BMCAmbientTemp.
3) import template file
4) # chmod 755 /var/www/cacti/scripts/check_BMCAmbientTemp


Keep me update if you have some issues.
facePlanter
Posts: 3
Joined: Fri Apr 23, 2010 12:23 pm

Eric's IPMI->CACTI templates on HP ML 110

Post by facePlanter »

Hi Eric, Hi All, first post here.

On an HP ML 110 I get those results:

[root@cup ~]# ipmitool sdr type fan
FAN_1 | 11h | ns | 29.1 | No Reading
FAN_3 | 13h | ok | 29.3 | 1737.74 RPM
FAN_4 | 12h | ok | 29.4 | 2085.29 RPM

and if using the php script I get this result:
ss_ipmitool_sensors.php fan query sensorreading
1:
2:1737.74
3:2103.58

but cacti is unable to graph the fan sensor, writing 'nan' for both FAN_3 and FAN_4.

Any hints ?


Thanks for supporting,
have a nice week-end.
Mike
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

Is there a way to create a user for this which does not require admin rights to out put sensor details

its a supermicro server if that makes any difference
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests