there is a lot of challenge, when we are doing HP hardware monitoring by Solarwinds, many time we are not getting alert and it leads the problem and question for solarwinds which are not able to monitor the h/w component

So i have come in one next steps for monitoring of HP hardware by Powershell script.

I installed the below HPILO CMD let into one DEV machine.

Download and install HPiLOCmdlets-x64.msi

Cmdlet Get-HPiLOHealthSummary

Post installation i ran the below PS script to get the out put of HP hardware with status.

#how-to-replace-multiple-strings-in-a-file-using-powershell One option is to chain the -replace operations together. The ` at the end of each line escapes the newline, causing PowerShell to continue parsing the expression on the next line

You need to get your script to Write-Host the results using the "Statistic:" and (optional) "Message:" output for the SAM template to pick up on them.

The script will have to be alter to run on the host in question, use Execution Mode: Remote Node to run the script locally on the server in question and then return only one Statistic (and Message) per result.

You can have up to ten of these, returned by each script. Any more will be ignored by the SAM PowerShell component.

Write-Host "Message.<unique id>: $message"

Write-Host "Statistic.<unique id>: $statistic"

I am just arranging a blade to play with and I will have a crack at formatting an example for you.

The following code should work, as a PowerShell monitor, returning a 1 for OK status and a zero for anything else. Each value is returned with a unique Statistic (and optional Message) name, of which there are under 10. Create an ILO monitoring template, add a Windows PowerShell Monitor to it and add the script body, and the template can then be assigned to the ILO card

Don't forget to set the Execution Mode to Local Host, which will be your Orion server, which will need the HP iLO Cmdlets installed.

Even if the scripts doesn't suit your needs, hopefully you know understand how Orion is expecting the results.

#---------------------------Start of Script---------------------------------#

As i am sure, Script will run by local host, and i tested the above script from Orion server (PS IDE), which is working fine, but we need to set the variable hostname instead on IP, So script can pic the hostname and give the result as expected.

Actions

More Like This

Incoming Links

SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process. Learn more today by joining.

SolarWinds uses cookies on its websites to make your online experience easier and better. By using our website,
you consent to our use of cookies. For more information on cookies, see our cookie policy.