Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20518

Re: Bulk enabling Energywise Resource

$
0
0

EW Capable means, device has proper IOSImage, devices with this IOSImage can support EW feature. But I have 40 EW Capable devices and only 2 of them support EW.

To find out nodes that realy supports EW feature you should use these steps:

1. create new Universal Device poller

  • OID: 1.3.6.1.4.1.9.9.683.1.1.0
  • Name: cewDeviceId  (this name will be used later in SQL query)
  • SNMP Get Type: GET
  • Polling Type: Node

2. assign this custom poller to nodes you would like to test for EW feature

3. Let it poll for a while to be sure custom poller was polled on all nodes

4. run the query:

DECLARE @NodeId INTEGER

DECLARE EWNodes CURSOR

FOR

   SELECT NodeId

     FROM CustomPollers cp

        , CustomPollerAssignment ca

        , CustomPollerStatus cs

    WHERE cp.UniqueName = 'cewDeviceId' --here use the poller name from step 1

      AND cp.custompollerid=ca.custompollerid

      AND ca.custompollerassignmentid=cs.custompollerassignmentid

--

OPEN EWNodes

FETCH NEXT FROM EWNodes INTO @NodeId

WHILE @@FETCH_STATUS =0

  BEGIN

    IF NOT EXISTS (SELECT * FROM Pollers WHERE PollerType='N.EnergyWise.SNMP.Cisco' AND NetObjectID=@NodeId)

    INSERT INTO Pollers (PollerType, NetObject, NetObjectType, NetObjectID, [Enabled])

    VALUES ('N.EnergyWise.SNMP.Cisco', 'N:' + CAST(@NodeId AS VARCHAR), 'N', @NodeId, 1)

    FETCH NEXT FROM EWNodes INTO @NodeId

  END

CLOSE EWNodes

DEALLOCATE EWNodes

 

5. now you can remove the custom poller. All nodes that support EW should have assigned and enabled the proper poller.


Viewing all articles
Browse latest Browse all 20518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>