cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
725
Views
5
Helpful
1
Replies
matthew verlis
Beginner

How to see POE status and 802.1x status from the Prime API

Hello,
Does anyone know if it is possible to retrieve (via the cisco prime API) the POE status of the port?  (if the port has POE enabled or disabled)

Also, does anyone know if there is a way to pull 802.1x switch port configuration via the prime api also?

 

Thanks.

1 REPLY 1
henrikjohan
Beginner

Hello.
I realize you want this from Cisco Prime API, but I haven't found it.

 

Sorry for wall of text, but this is how I go about it:

 

If you want to gather the data yourself, it is possible if you feel comfortable with it.

 

Let me give you some OIDs you can work with if you want to get with SNMP Walk yourself

 

1.3.6.1.2.1.105.1.3.1.1.2   -   Get available PoE from switch, if you have several chassis, each value will be the entry for that chassis.

 

1.3.6.1.4.1.9.9.402.1.2.1.7.1    - Get PoE utlization per port, e.g.:

 

snmpwalk -v 2c -c <community> <IP-adress> 1.3.6.1.4.1.9.9.40 2.1.2.1.7.1
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.1 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.2 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.3 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.4 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.5 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.6 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.7 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.8 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.9 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.10 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.11 = Gauge32: 0
iso.3.6.1.4.1.9.9.402.1.2.1.7.1.12 = Gauge32: 17900

 

The one at the end with 17900 indicates that 17.9 W is currently being used:

show power inline:

Gi0/12 auto on 17.9 AIR-AP1832I-E-K9 4 30.0

 

iso.3.6.1.4.1.9.9.402.1.2.1.7.1.12  (where iso is essentially 1), do notice the .12 after the OID, this is its "physicalindex" value.

 

You'll have to cross-reference this properly to get the real interface (to be sure)

 

What you have to do is:

 

SNMP Walk: 1.3.6.1.4.1.9.9.402.1.2.1.11.1

e.g.: 

 

iso.3.6.1.4.1.9.9.402.1.2.1.11.1.1 = INTEGER: 1005
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.2 = INTEGER: 1006
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.3 = INTEGER: 1007
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.4 = INTEGER: 1008
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.5 = INTEGER: 1009
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.6 = INTEGER: 1010
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.7 = INTEGER: 1011
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.8 = INTEGER: 1012
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.9 = INTEGER: 1013
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.10 = INTEGER: 1014
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.11 = INTEGER: 1015
iso.3.6.1.4.1.9.9.402.1.2.1.11.1.12 = INTEGER: 1016

 

Here you see that .12 is INTEGER 1016.

 

This Integer can be cross-referenced with this:

 

SNMPWALK 1.3.6.1.2.1.47.1.1.1.1.7

e.g.:

iso.3.6.1.2.1.47.1.1.1.1.7.1001 = STRING: "1"
iso.3.6.1.2.1.47.1.1.1.1.7.1002 = STRING: "WS-C3560CX-12PC-S - Fixed Module 0"
iso.3.6.1.2.1.47.1.1.1.1.7.1003 = STRING: "WS-C3560CX-12PC-S - Power Supply 0"
iso.3.6.1.2.1.47.1.1.1.1.7.1004 = STRING: "WS-C3560CX-12PC-S - Sensor 0"
iso.3.6.1.2.1.47.1.1.1.1.7.1005 = STRING: "GigabitEthernet0/1"
iso.3.6.1.2.1.47.1.1.1.1.7.1006 = STRING: "GigabitEthernet0/2"
iso.3.6.1.2.1.47.1.1.1.1.7.1007 = STRING: "GigabitEthernet0/3"
iso.3.6.1.2.1.47.1.1.1.1.7.1008 = STRING: "GigabitEthernet0/4"
iso.3.6.1.2.1.47.1.1.1.1.7.1009 = STRING: "GigabitEthernet0/5"
iso.3.6.1.2.1.47.1.1.1.1.7.1010 = STRING: "GigabitEthernet0/6"
iso.3.6.1.2.1.47.1.1.1.1.7.1011 = STRING: "GigabitEthernet0/7"
iso.3.6.1.2.1.47.1.1.1.1.7.1012 = STRING: "GigabitEthernet0/8"
iso.3.6.1.2.1.47.1.1.1.1.7.1013 = STRING: "GigabitEthernet0/9"
iso.3.6.1.2.1.47.1.1.1.1.7.1014 = STRING: "GigabitEthernet0/10"
iso.3.6.1.2.1.47.1.1.1.1.7.1015 = STRING: "GigabitEthernet0/11"
iso.3.6.1.2.1.47.1.1.1.1.7.1016 = STRING: "GigabitEthernet0/12"
iso.3.6.1.2.1.47.1.1.1.1.7.1017 = STRING: "GigabitEthernet0/13"
iso.3.6.1.2.1.47.1.1.1.1.7.1018 = STRING: "GigabitEthernet0/14"
iso.3.6.1.2.1.47.1.1.1.1.7.1019 = STRING: "GigabitEthernet0/15 Container"
iso.3.6.1.2.1.47.1.1.1.1.7.1020 = STRING: "GigabitEthernet0/16 Container"
iso.3.6.1.2.1.47.1.1.1.1.7.1021 = STRING: "GigabitEthernet0/15"
iso.3.6.1.2.1.47.1.1.1.1.7.1022 = STRING: "Gi0/15 Module Temperature Sensor"
iso.3.6.1.2.1.47.1.1.1.1.7.1023 = STRING: "Gi0/15 Supply Voltage Sensor"
iso.3.6.1.2.1.47.1.1.1.1.7.1024 = STRING: "Gi0/15 Bias Current Sensor"
iso.3.6.1.2.1.47.1.1.1.1.7.1025 = STRING: "Gi0/15 Transmit Power Sensor"
iso.3.6.1.2.1.47.1.1.1.1.7.1026 = STRING: "Gi0/15 Receive Power Sensor"

 

See bolded text, here you will find the interface.

 

With this, you can write a code to scan all devices for its PoE status for each port, and you can calculate how much PoE is left.

The devices you can easily fetch from Prime API, and just write a function / class with methods to gather this data and present / save it where you want

 

If you want some example code, I can provide you with some in python, I have a system set up to scan this data regularly and provide with total usage and available for each device.

 

Good luck!

 

Create
Recognize Your Peers
Content for Community-Ad