IPMI sensors -- update June 21, 2009
Moderators: Developers, Moderators
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
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
-
- Posts: 1
- Joined: Thu Jun 25, 2009 12:12 pm
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:
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:
things seem to work as expected. Am I doing something wrong or is this a bug in the XML files?
Code: Select all
<arg_prepend>|host_hostname|:ipmi_username:ipmi_password fan</arg_prepend>
Code: Select all
arg_prepend>|host_hostname|:|host_snmp_username|:|host_snmp_password| fan</arg_prepend>
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.
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.
Thold plugin.markee wrote:Is it possible to send out any alert via email if the temperature reaches certain threshold?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
The link in the site is corrupted can anyone post the file here?ehall wrote:I've also moved the files to this page on my web server so that I can more easily maintain them
I verified and uploaded the tarball again. Let me know if you still have problems with it.mcresti wrote:The link in the site is corrupted can anyone post the file here?ehall wrote:I've also moved the files to this page on my web server so that I can more easily maintain them
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.
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 (28.9 KiB) Viewed 8425 times
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.
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.
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.
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.
-
- Posts: 3
- Joined: Fri Apr 23, 2010 12:23 pm
Eric's IPMI->CACTI templates on HP ML 110
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
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
-
- Posts: 18
- Joined: Mon Jul 13, 2009 4:11 pm
Who is online
Users browsing this forum: No registered users and 1 guest