Hi,
ok I will do that - thanks.
If anyone on here does come up with something though - please let us know.
Regards,
Richard
Check HP P2000 API
Re: Check HP P2000 API
We'll keep the thread open in case anyone does have a fix, or if you get it working and wish to report back.
Former Nagios employee
-
- Posts: 17
- Joined: Sat Apr 06, 2013 2:07 am
Re: Check HP P2000 API
Hopefully the author will reply or if anyone on here spots anything that would be helpful.
I tried posting on the authors site but my posts haven't appeared.
I tried posting on the authors site but my posts haven't appeared.
Re: Check HP P2000 API
Posts probably need to be moderated before they show publicly. I'd give it some time.
Former Nagios employee
-
- Posts: 17
- Joined: Sat Apr 06, 2013 2:07 am
Re: Check HP P2000 API
Hi,
Not gotten a reply from the author yet but I asked a coder to take a look for me.
Basically he found that the FRU is returning some absent values which are being interpreted as "Critical". The hack or workaround is to bypass/ignore the absent values.
The actual code used for the FRU check function is below if you wish to copy it. Please note that this is not supported by the author or me, it is simply a workaround that has done the job for us. These values can't be important to us as they were not present in the firmware pre the upgrade, plus the SAN management interface does not register them which uses the same API.
Not gotten a reply from the author yet but I asked a coder to take a look for me.
Basically he found that the FRU is returning some absent values which are being interpreted as "Critical". The hack or workaround is to bypass/ignore the absent values.
The actual code used for the FRU check function is below if you wish to copy it. Please note that this is not supported by the author or me, it is simply a workaround that has done the job for us. These values can't be important to us as they were not present in the firmware pre the upgrade, plus the SAN management interface does not register them which uses the same API.
Code: Select all
//Get FRU Information
$regXML = getRequest($sessionVariable, "{$url}show/frus", $secure);
$regXML = new SimpleXMLElement($regXML);
foreach($regXML->OBJECT as $obj) {
$attr = $obj->attributes();
if($attr['name']== "fru") {
// RG: Temp hack to remove empty values returned by the API.
$type = (string) getEnclosureStatus($obj->PROPERTY, array('name'=>'name', 'value'=>'fru-shortname'));
if ( empty($type) || $type == "" )
{
continue;
}
else
{
$statuses[$type][]= getEnclosureStatus($obj->PROPERTY, array('name'=>'name', 'value'=>'fru-status'));
}
}
}
Re: Check HP P2000 API
Nice work! Thanks for the update.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
- Posts: 15
- Joined: Fri Sep 19, 2014 2:32 pm
Re: Check HP P2000 API
Sorry for the late reply, been busy here. Nice work! Thanks for the update. That worked. The problem started when I upgraded my firmware as well.