Page 2 of 2

Re: Check HP P2000 API

Posted: Thu Oct 30, 2014 2:57 am
by Richard_Lian
Hi,

ok I will do that - thanks.

If anyone on here does come up with something though - please let us know.

Regards,

Richard

Re: Check HP P2000 API

Posted: Thu Oct 30, 2014 9:48 am
by tmcdonald
We'll keep the thread open in case anyone does have a fix, or if you get it working and wish to report back.

Re: Check HP P2000 API

Posted: Thu Oct 30, 2014 10:03 am
by Richard_Lian
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.

Re: Check HP P2000 API

Posted: Thu Oct 30, 2014 10:07 am
by tmcdonald
Posts probably need to be moderated before they show publicly. I'd give it some time.

Re: Check HP P2000 API

Posted: Sun Nov 02, 2014 7:03 am
by Richard_Lian
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.

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

Posted: Mon Nov 03, 2014 11:56 am
by abrist
Nice work! Thanks for the update.

Re: Check HP P2000 API

Posted: Wed Nov 05, 2014 2:16 pm
by christudorache
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.