Welcome to Pandora FMS Community › Forums › Community support › Create IPMI module?
-
Create IPMI module?
Posted by Anisim on March 25, 2009 at 17:33Can I create own IPMI module? I need to monitor few Dell servers using ipmitool. Or may be those modules already there I just do not see them. Thanks.
hbib replied 3 years, 9 months ago 7 Members · 14 Replies -
14 Replies
-
-
::
I have 20 Dell servers and I need to monitor some sensors (fans, raid etc) On linux I can run this command
ipmitool -I lan -H serverIP -U username -P password sdr get sensor | grep ‘Sensor Reading’ | awk ‘{print$4}’ where serverIP and will be variable,
I cannot run this on Dell server itself because it does not see local bmc console. It works from remote server but if I modify pandora_agent.conf on pandora server all those modules will be assigned to pandora server. Is there way to create module template so I can create module on Pandora for each dell server? thank you. -
::
No, if you set up that command in pandora_agent.conf as you said the data will be in that agent.
Maybe you can create a shell script plugin to reuse it with all the servers so you can add a different module to every agent you want to.Examples of shell script plugins:
http://pandora.svn.sourceforge.net/viewvc/pandora/trunk/pandora_server/util/plugin/Your plugins would just need:
IP
Username
Password
Variable to check.
You can do all the parse in the plugin -
-
::
[cite]Posted By: Anisim[/cite]
I have 20 Dell servers and I need to monitor some sensors (fans, raid etc) On linux I can run this command
ipmitool -I lan -H serverIP -U username -P password sdr get sensor | grep ‘Sensor Reading’ | awk ‘{print$4}’ where serverIP and will be variable,
I cannot run this on Dell server itself because it does not see local bmc console. It works from remote server but if I modify pandora_agent.conf on pandora server all those modules will be assigned to pandora server. Is there way to create module template so I can create module on Pandora for each dell server? thank you.Hi!, I would like to help you to build an IPMI module because it’s a great idea!.
First step is to build a shellscript who admit parameters, I suppose here we have:
-H hostname,
-U username
-P password-l lan, I don’t know what is this, explain me more so I can understand… but it will probably some “generic plugin parameter”.
sdr get sensor. the same as before, a generic plugin parameter.So we need to define also the way to parse output, can you put here the results of a few complete ipmitool command output ?
-
::
A first approach:
——–[cut here]——–8<————-8<————-8<————-8<————-8<————-8<————
#!/bin/bash
# IPMI remote Plugin for Pandora FMS Plugin server
# (c) ArticaST, Sancho Lerena 2008# Default values
PASSWORD=""
SERVER=""
USER=""
LAN="lan"
PARSEQUERY=""function help {
echo -e "IPMI Plugin for Pandora FMS Plugin server. http://pandorafms.com"
echo -e "Syntax:"
echo -e "tt-u username"
echo -e "tt-p password"
echo -e "tt-s server"
echo -e "tt-q IMPI query, for example 'sdr get sensor'n"
echo -e "tt-Q query string to search on result , for example 'Sensor Reading'n"
echo -e "tt-l XXXXXX string, por example -l lan n"
echo -e "Samples:"
echo ""
exit
}if [ $# -eq 0 ]
then
help
fi# Main parsing code
while getopts ":hu:p:s:l:q:" optname
do
case "$optname" in
"h")
help
;;
"u")
USER=$OPTARG
;;
"p")
PASSWORD=$OPTARG
;;
"s")
SERVER=$OPTARG
;;
"q")
QUERY=$OPTARG
;;
"Q")
PARSEQUERY=$OPTARG
;;"l")
LAN=$OPTARG
;;
?)
help
;;
default)
help
;;esac
done# Execution
ipmitool -I $LAN -H $SERVER -U $USER -P $PASSWORD $QUERY | grep "$PARSEQUERY" | awk '{print$4}'
——–[cut here]——–8<————-8<————-8<————-8<————-8<————-8<————
Probably dont work because I don't know the outputs of ipmitool, so send me more examples to work on.
The best way it's to have the plugin a full bunch of examples to be added to plugin in order people can use it without test and investigate too long.
-
-
-
-
-
::
Hey MACscr, if you hace access to a IPMI device, we can try to make the IPMI module, just put here the output of as many ipmitool executions as you can to try to imagine a generic way to grab data, for example:
ipmitool -I lan -H serverIP -U username -P password sdr get sensor
The “sdr get sensor” seems to be the part to get different data, so play with it to provide so much information as you can and put here the commands and the results.
-
::
There has been a plugin for this a long time already in Pandora (it was hiding!). It’s in the agent plugins (SVN) and called ipmi2xml.php
http://pandora.svn.sourceforge.net/viewvc/pandora/trunk/pandora_agents/linux/plugins/ipmi2xml/
http://pandora.svn.sourceforge.net/viewvc/pandora/trunk/pandora_agents/mac_osx/plugins/ipmi2xml/Check out my blog on how to modify it: http://blog.pandorafms.org/?p=134
It works on my XServe machines but I don’t know whether Dell (or other brands) return other things. If you have any questions or ideas on how to modify it, let me know. I’m one of the developers of Pandora FMS by the way.
If the return is majorly different than XServe, let me know. Give me some sample outputs so I can modify it for you. Make sure you have the latest incarnation of ipmitools before though.
The way I implement it is I have one system running 4 agents. First of all it’s own agent, then the 3 IPMI agents that I need. You just copy /etc/pandora/ to /etc/pandora-server1 /etc/pandora-server2 etc. so you have 4 different configuration files. Then you need to modify your startup scripts to read from those directories (which is simple to do) and in each agent config you set “agent_name ” and module_plugin ipmi2xml_server1
I’ll see if I can modify it into a server plugin.
-
::
Hello,
an interesting document about IPMI
http://publib.boulder.ibm.com/infocenter/systems/topic/liaai/ipmi/BPipmi.pdf
Best regards,
Baxajaun
-