Getting 'children' of energywise device using API

Document created by cdnadmin on Jan 24, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: John Todd on 06-05-2011 10:03:41 AM
When I do a 'meter' query on a domain I get the meter results across everything in the domain
I have several PDUs in the domain
how do I query for the metered results on plugs on a specific PDU, the goal here is to this using the API
but if there's a CLI query that could do this that would be a good start.
for example
say I have 2 PDUs, 'MySite' and 'ePower"
I query for 'metered' results and I get
 
Plug_Outlet1 1be92ca23f8e4ec1a6f3bdcfe445048b-1 178.0
Plug_Outlet2 1be92ca23f8e4ec1a6f3bdcfe445048b-2 35.0
Plug_Outlet3 1be92ca23f8e4ec1a6f3bdcfe445048b-3 20.0
Plug_Outlet4 1be92ca23f8e4ec1a6f3bdcfe445048b-4 5.0
Outlet_1 ePower PDUv2.0.01048006F42-1 0.0
Outlet_2 ePower PDUv2.0.01048006F42-2 0.0
Outlet_3 ePower PDUv2.0.01048006F42-3 0.0
Outlet_4 ePower PDUv2.0.01048006F42-4 2.0
 
If I query for 'metered' results using the name of the PDU, I get nothing.
how do I filter the list to only return the results from plugs whose parent is a user-specified PDU?
 
so I want to say query metered for 'ePower' and have it return
Outlet_1 ePower PDUv2.0.01048006F42-1 0.0
Outlet_2 ePower PDUv2.0.01048006F42-2 0.0
Outlet_3 ePower PDUv2.0.01048006F42-3 0.0
Outlet_4 ePower PDUv2.0.01048006F42-4 2.0
 
How do I do that?
 
Thanks.
 
- JT
 

Subject: RE: Getting 'children' of energywise device using API
Replied by: Luis Suau on 06-05-2011 10:44:30 AM
JT,
 
EnergyWise is about group(domain) behavior. As you are well aware, a query will be propagated throughout the domain. You can use plug naming conventions to narrow down the responses. I do that in my lab. I name the outlets in each PDU with a prefix of Outlet, then a letter for each specific PDU, and a sequential number for each outlet within the PDU.

There are 48 Outlets in this domain but I can query outlets from a specific PDU. Example:
 
EWstack1#ene qu imp 100 name Outlet_F* coll usa met

EnergyWise query, timeout is 6 seconds:

Host              Name                        Usage       Level   Imp
----              ----                        -----       -----   ---
10.16.194.190     Outlet_F1                   92.0  (W)   10      50
10.16.194.190     Outlet_F2                   69.0  (W)   10      50
10.16.194.190     Outlet_F3                   69.0  (W)   10      50
10.16.194.190     Outlet_F4                   69.0  (W)   10      50
10.16.194.190     Outlet_F5                   81.0  (W)   10      50
10.16.194.190     Outlet_F6                   69.0  (W)   10      50
10.16.194.190     Outlet_F7                   46.0  (W)   10      50
10.16.194.190     Outlet_F8                   58.0  (W)   10      50

Queried:  8    Responded:  8      Time:  4.861 seconds

EWstack1#
 
Additionally, you can use keywords on the outlets to group responses.
 
Best Regards,
 
Luis

Attachments

    Outcomes