Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Use IOS POE code for IOSXE #8853

Merged
merged 1 commit into from Jul 1, 2018

Conversation

Projects
None yet
3 participants
@PipoCanaja
Copy link
Contributor

PipoCanaja commented Jun 29, 2018

We match "iosxe" OS as well for POE polling on cisco devices, as they are using the same MIBs.
This will add support for Catalyst 3850, as well as probably Cat4500 family as well.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

We match iosxe OS as well for POE polling on cisco devices, as they a…
…re using the same MIBs. This will add support for Catalyst 3850, as well as probably Cat4500 family as well.

@PipoCanaja PipoCanaja changed the title We match iosxe OS as well for POE polling on cisco devices, as they… Feature : Use IOS POE code for IOSXE Jun 29, 2018

@laf

This comment has been minimized.

Copy link
Member

laf commented Jun 29, 2018

You should also submit some test data for a IOSXE based device if you can please.

@laf laf added this to the 1.42 milestone Jun 29, 2018

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

PipoCanaja commented Jul 1, 2018

Hello,

I don't have the necessary device unfortunately. I saw @boudreau comment on the previous PR #8705, which says that the Cisco code is not triggered with his 3850. As the MIBs is exactly the same for both families, I changed the condition to at least get in the Cisco part of the POE code (the generic code does not provide any useful value on Cisco devices anyway so it can't be worse than it is now).

Bye

@laf laf removed the Needs Tests 🦄 label Jul 1, 2018

@laf

laf approved these changes Jul 1, 2018

Copy link
Member

laf left a comment

LGTM

@laf laf merged commit e66b5ec into librenms:master Jul 1, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@boudreau

This comment has been minimized.

Copy link
Contributor

boudreau commented Jul 3, 2018

Hi,

with this last update, the Cisco3850 ports don't get tagged as POE anymore. Not even POE(generic)

@PipoCanaja PipoCanaja deleted the PipoCanaja:POE_on_iosXE_devices_as_well branch Jul 9, 2018

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

PipoCanaja commented Jul 9, 2018

Hi,

I managed to get hands on a 3850 with POE enabled. And it does not answer to a required MIB :
$port_ent_to_if = snmpwalk_cache_oid($device, 'portIfIndex', array(), 'CISCO-STACK-MIB');

Without this, there is no way to bind a "POE entry" from snmpwalk_cache_oid($device, 'cpeExtPsePortEntry', array(), 'CISCO-POWER-ETHERNET-EXT-MIB'); to the ifIndex of the interface.

Basically, the POE data is there but is not bound to the interface.

So unless Cisco corrects this, the 3850 will never have POE data displayed. The IOSXE code may still be usable by other IOSXE devices which would properly answer portIfIndex oid.

Bye

@boudreau

This comment has been minimized.

Copy link
Contributor

boudreau commented Jul 9, 2018

Hi, thanks for the response.

On the Cisco3850, in look like the cpeExtPsePortEntPhyIndex uses the same index as the entPhysicalDescr.
Could that be used to map the interfaces to the index and then use that index to poll the POE:

ENTITY-MIB::entPhysicalDescr.4022 = STRING: GigabitEthernet4/0/1
                             ^^^^
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortEntPhyIndex.4.1 = INTEGER: 4022
                                                                      ^^^^
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortEnable.4.1 = INTEGER: auto(1)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortDiscoverMode.4.1 = INTEGER: ieeeAndCisco(5)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortDeviceDetected.4.1 = INTEGER: false(2)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortIeeePd.4.1 = INTEGER: false(2)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortAdditionalStatus.4.1 = BITS: 00
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrMax.4.1 = Gauge32: 30000 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAllocated.4.1 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrAvailable.4.1 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrConsumption.4.1 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortMaxPwrDrawn.4.1 = Gauge32: 0 milliwatts
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortEntPhyIndex.4.1 = INTEGER: 4022
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPolicingCapable.4.1 = INTEGER: true(1)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPolicingEnable.4.1 = INTEGER: off(2)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPolicingAction.4.1 = INTEGER: deny(1)
CISCO-POWER-ETHERNET-EXT-MIB::cpeExtPsePortPwrManAlloc.4.1 = Gauge32: 15400 milliwatts

Thanks for the efforts.

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

PipoCanaja commented Jul 11, 2018

gs-kamnas pushed a commit to gs-kamnas/librenms that referenced this pull request Aug 1, 2018

Enable support for POE on IOSXE (librenms#8853)
We match "iosxe" OS as well for POE polling on cisco devices, as they are using the same MIBs.
This will add support for Catalyst 3850, as well as probably Cat4500 family as well.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`

@lock lock bot locked as resolved and limited conversation to collaborators Sep 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.