Monitoring Alerts (a.k.a. Alarms) on VMWare vCenter Server

Hi Guys,

Another exciting scripts to give away to my dear community fellows - ability to catch alarms on vCenter server from SolarWinds SAM. In fact, vCenter alarms are pretty cool and robust, the only downside - they fall outside of SW workflow and alerts (unless, probably, you have VMAN, which I don't). So, let's fix it...

Final result:


4 counters will extract info about alerts and will count number of them. Only 1 component needed, which will utilize the power of multiply outputs in SAM templates

002.jpg


The moment you acknowledge them in vCenter, upon next poll it will give the following (notice some new additional bits of information about acknowledged user and time)

001.jpg


You can set thresholds yourself as you wish. In my case I want to be alerted only when there are new unacknowledged alerts in vCenter, so, I have only set threshold for Unacked counters, as follows:


003.PNG


You can obviously change it as you desire.


I have also made it to trigger over 5 polls in order to avoid firing too many alerts about vCenter alarms with too short life span



Summary


  • PowerShell script will do the job
  • I have never been able to execute powershell directly from SolarWinds. So, I have followed workaround kindly shared by lukas.belza (Re: PowerShell/PowerCLI Monitor Problem) where I simply drop this PS script on the SolarWinds' server local drive and then wrap it around VBScript in app template
  • Then I attach this template to vCenter server node and run it every 15 minutes.



Step-by-step:


(1)


1.1 Download attached PowerShell script (attached)


1.2 Open it in notepad and follow instruction in comments section on top of the script


1.3 Test script by running it from SolarWinds box - it should give you desirable output in SolarWinds supported output format


1.4 Place it in the local drive. C:\Scripts\ folder would be a good candidate


(2)


2.1 Download VMWare Alerts SolarWinds Template (attached) and apply this to your vCenter node


2.2 Update arguments parameter with the full path to your PowerShell script file from step (1)


2.3 Ensure credential you provide in template/application can run PowerShell script locally on SolarWinds app server (usually <inherit from Node> will work in most cases)


(3)


3.1 Come back here and comment if you like it emoticons_happy.png



Credits


Credits to Eric and massive Thank You for his post which I have used as a base to build script above:

http://wannemacher.us/?p=457

With Gratitude,

Alex Soul

Parents Comment Children
No Data