0 Replies Latest reply on Aug 6, 2014 4:54 AM by simonp73

    Can you use a FOR Loop in custom SQL alerting


      Hi all


      I have a custom SQL alert that is looking at the SNMP trap table which is joined to the Node table and I need to raise an alert for every Node ID returned by the SQL not just the first one.


      The reason I need this is that we are implementing DRS/DPM within our Virtual infrastructure and as such i need to pu the nodes into maintenance mode to stop alerts coming out of Solarwinds.


      Solarwinds does not deal with DRS/DPM from VMware in any way so if we switch on DRS/DPM right now then nodes will show up as being down, rather than in standby.  To this fact I have been tasked with making our solarwinds not raise alerts, but instead automatically put the ESX hosts into/out of maintenance mode when DRS puts the node in/out of standby.


      Teh first issue - solarwinds does not pull this information back from vcenter as to whether a node has gone into standby via DRS - got around this by setting up SNMP traps from vcenter through to solarwinds


      Second issue - what to do with the traps - this is the part I'm currently stuck on and need some help with the SQL and need to put a loop in the query so that it will trigger for each node, not just the first one


      Final stage - make the alert that is triggered run a script to unmanage the node via its nodeID that will be returned by the SQL query above.  the script has been written and does work and is powershell based


      Any help would be great, I rellly just need to  know if i can use a loop as when ESX nodes from a cluster are put into standby the traps all usually come through at once