POE - Cisco

Hello,

I would like to do POE statistic.
I set this parametre in config.php :
$config[‘enable_ports_poe’] = 1;
When i do :

php poller.php -h sw-bonnegarde1-1.reseau.nantes.net -d -v -m ports

I see snmpwalk for MIB for poe:
exemple

SNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m CISCO-POWER-ETHERNET-EXT-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-bonnegarde1-1.reseau.nantes.net:161 cpeExtPsePortEntry]

[1.2] => Array
(
[pethPsePortAdminEnable] => true
[pethPsePortPowerPairsControlAbility] => false
[pethPsePortPowerPairs] => signal
[pethPsePortDetectionStatus] => deliveringPower
[pethPsePortPowerPriority] => low
[pethPsePortMPSAbsentCounter] => 0
[pethPsePortType] => Ieee PD
[pethPsePortPowerClassifications] => class2
[pethPsePortInvalidSignatureCounter] => 0
[pethPsePortPowerDeniedCounter] => 0
[pethPsePortOverLoadCounter] => 0
[pethPsePortShortCounter] => 0
[cpeExtPsePortEnable] => auto
[cpeExtPsePortDiscoverMode] => unknown
[cpeExtPsePortDeviceDetected] => false
[cpeExtPsePortIeeePd] => true
[cpeExtPsePortAdditionalStatus] => 00
[cpeExtPsePortPwrMax] => 15400
[cpeExtPsePortPwrAllocated] => 4100
[cpeExtPsePortPwrAvailable] => 4100
[cpeExtPsePortPwrConsumption] => 2889
[cpeExtPsePortMaxPwrDrawn] => 3682
[cpeExtPsePortEntPhyIndex] => 1006
[cpeExtPsePortPolicingCapable] => true
[cpeExtPsePortPolicingEnable] => off
[cpeExtPsePortPolicingAction] => deny
[cpeExtPsePortPwrManAlloc] => 0
)

RRD update :

Port Fa0/2: FastEthernet0/2 (10002 / #13768) HC HC HighSpeed dot3Duplex VLAN == 3080Using ifDescr as ifAliasFastEthernet0/2
ifInOctets (8839 B) 6.6061285500747 Bps 1338 secs

ifOutOctets (2242647 B) 1676.1188340807 Bps 1338 secs

ifInErrors (0 B) 0 Bps 1338 secs

ifOutErrors (0 B) 0 Bps 1338 secs

ifInUcastPkts (90 B) 0.067264573991031 Bps 1338 secs

ifOutUcastPkts (234 B) 0.17488789237668 Bps 1338 secs

ifInNUcastPkts (0 B) 0 Bps 1338 secs

ifOutNUcastPkts (0 B) 0 Bps 1338 secs

ifInDiscards (0 B) 0 Bps 1338 secs

ifOutDiscards (0 B) 0 Bps 1338 secs

ifInUnknownProtos (0 B) 0 Bps 1338 secs

ifInBroadcastPkts (1 B) 0.0007473841554559 Bps 1338 secs

ifOutBroadcastPkts (9941 B) 7.4297458893871 Bps 1338 secs

ifInMulticastPkts (11 B) 0.0082212257100149 Bps 1338 secs

ifOutMulticastPkts (3237 B) 2.4192825112108 Bps 1338 secs
bps(53.000bps/13.410kbps)bytes(8.630kB/2.140MB)pkts(67.260mpps/0.170pps)RRD[update /opt/librenms/rrd/sw-bonnegarde1-1.reseau.nantes.net/port-id13768.rrd N:8595131995:53767671013:0:0:27727508:35954042:U:U:0:6945:U:68335:69656619:175872:65590728]
RRDtool Output: OK u:0,00 s:0,00 r:3,24
RRD[update /opt/librenms/rrd/sw-bonnegarde1-1.reseau.nantes.net/port-id13768-poe.rrd N:U:U:U:U]
RRDtool Output: PoE SQL[UPDATE ports set poll_time =‘1500882717’,poll_prev =‘1500881379’,poll_period =‘1338’,ifLastChange =‘289994540’,ifInOctets =‘8595131995’,ifInOctets_prev =‘8595123156’,ifInOctets_rate =‘6.6061285500747’,ifInOctets_delta =‘8839’,ifOutOctets =‘53767671013’,ifOutOctets_prev =‘53765428366’,ifOutOctets_rate =‘1676.1188340807’,ifOutOctets_delta =‘2242647’,ifInErrors =‘0’,ifInErrors_prev =‘0’,ifInErrors_rate =‘0’,ifInErrors_delta =‘0’,ifOutErrors =‘0’,ifOutErrors_prev =‘0’,ifOutErrors_rate =‘0’,ifOutErrors_delta =‘0’,ifInUcastPkts =‘27727508’,ifInUcastPkts_prev =‘27727418’,ifInUcastPkts_rate =‘0.067264573991031’,ifInUcastPkts_delta =‘90’,ifOutUcastPkts =‘35954042’,ifOutUcastPkts_prev =‘35953808’,ifOutUcastPkts_rate =‘0.17488789237668’,ifOutUcastPkts_delta =‘234’ WHERE port_id = ‘13768’]
SQL[UPDATE ports_statistics set ifInNUcastPkts =‘0’,ifInNUcastPkts_prev =‘0’,ifInNUcastPkts_rate =‘0’,ifInNUcastPkts_delta =‘0’,ifOutNUcastPkts =‘0’,ifOutNUcastPkts_prev =‘0’,ifOutNUcastPkts_rate =‘0’,ifOutNUcastPkts_delta =‘0’,ifInDiscards =‘0’,ifInDiscards_prev =‘0’,ifInDiscards_rate =‘0’,ifInDiscards_delta =‘0’,ifOutDiscards =‘6945’,ifOutDiscards_prev =‘6945’,ifOutDiscards_rate =‘0’,ifOutDiscards_delta =‘0’,ifInUnknownProtos =‘0’,ifInUnknownProtos_prev =‘0’,ifInUnknownProtos_rate =‘0’,ifInUnknownProtos_delta =‘0’,ifInBroadcastPkts =‘68335’,ifInBroadcastPkts_prev =‘68334’,ifInBroadcastPkts_rate =‘0.0007473841554559’,ifInBroadcastPkts_delta =‘1’,ifOutBroadcastPkts =‘69656619’,ifOutBroadcastPkts_prev =‘69646678’,ifOutBroadcastPkts_rate =‘7.4297458893871’,ifOutBroadcastPkts_delta =‘9941’,ifInMulticastPkts =‘175872’,ifInMulticastPkts_prev =‘175861’,ifInMulticastPkts_rate =‘0.0082212257100149’,ifInMulticastPkts_delta =‘11’,ifOutMulticastPkts =‘65590728’,ifOutMulticastPkts_prev =‘65587491’,ifOutMulticastPkts_rate =‘2.4192825112108’,ifOutMulticastPkts_delta =‘3237’ WHERE port_id = ‘13768’]
2 updated

Whan I open Web GUI, I don’'t see statistique of this swith on Overview .
Cdlt,

Please validate your install
to validate your install run ./validate.php and then pastebin your results

Hi @Kevin_Krumm,

My version of librenms is patched with FDB table.
And, now, I don’t upgrate my librenms.

==========================================================

Component Version
LibreNMS 483e9b32176cd33d58f5d3d1630d58d541169fa9
DB Schema 193
PHP 5.4.45-0+deb7u9
MySQL 5.5.55-0+deb7u1-log
RRDTool 1.4.7
SNMP NET-SNMP 5.4.3

==========================================================

[WARN] Your install is out of date, last update: Tue, 30 May 2017 08:40:46 +0000
[OK] Database connection successful
[FAIL] MySQL Database collation is wrong: latin1 latin1_swedish_ci [FIX] https://t.libren.ms/-zdwk
[FAIL] MySQL tables collation is wrong: [FIX] http://bit.ly/2lAG9H8
port_in_measurements utf8 utf8_general_ci
port_out_measurements utf8 utf8_general_ci
[FAIL] Database: incorrect column (ports_fdb/device_id)
[FAIL] Database: incorrect column (ports_fdb/port_id)
[FAIL] Database: incorrect column (ports_fdb/vlan_id)
[FAIL] Database: extra index (ports_fdb/mac_address_2)
[FAIL] Database: extra table (port_in_measurements)
[FAIL] Database: extra table (port_out_measurements)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
ALTER TABLE ports_fdb CHANGE device_id device_id int(11) unsigned NOT NULL;
ALTER TABLE ports_fdb CHANGE port_id port_id int(11) unsigned NOT NULL;
ALTER TABLE ports_fdb CHANGE vlan_id vlan_id int(11) unsigned NOT NULL;
ALTER TABLE ports_fdb DROP INDEX mac_address_2;
DROP TABLE port_in_measurements;
DROP TABLE port_out_measurements;
[FAIL] You have no timezone set for php. [FIX] http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
[WARN] Your RRD directory is owned by root, please consider changing over to user a non-root user
[WARN] Disk space where /opt/librenms is located is less than 512Mb
[FAIL] Discovery has not completed in the last 24 hours, check the cron job

[WARN] Your local git contains modified files, this could prevent automatic updates.
Modified files:
AUTHORS.md
CHANGELOG
CONTRIBUTING.md
LICENSE.txt
Makefile
README.md
build.sql
composer.json
config.php.default
daily.php
and 8 more…
ldap_free_connection 1 1
ldap_send_unbind
ldap_free_connection: actually freed
root@test-observium:/opt/librenms#

FDB was pushed to master while back ago - you pbly could do update now.
Also, you really need to fix all those database issues… that’s why POE is pbly not working for you.
POE on Cisco is well supported on librenms.
run those queries in the database. Then run a validate again. If all is good do a daily.sh

See here FDB: https://github.com/librenms/librenms/pull/6616

You’ll need to post the entire output via pastebin of ./poller.php -h HOSTNAME -d -m ports

Hello @Kevin_Krumm,

For upgrade.
I run a validate again, I haven’t database error.
But I do .daily.sh

root@test-observium:/opt/librenms# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
ldap_create
ldap_url_parse_ext(ldap://ad.nantes.net)
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP ad.nantes.net:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 1.1.75.2:389
ldap_pvt_connect: fd: 4 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ldap_result ld 0x1c228e0 msgid 1
wait4msg ld 0x1c228e0 msgid 1 (infinite timeout)
wait4msg continue ld 0x1c228e0 msgid 1 all 1
** ld 0x1c228e0 Connections:
* host: ad.nantes.net  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue Jul 25 09:48:57 2017


** ld 0x1c228e0 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x1c228e0 request count 1 (abandoned 0)
** ld 0x1c228e0 Response Queue:
   Empty
  ld 0x1c228e0 response count 0
ldap_chkResponseList ld 0x1c228e0 msgid 1 all 1
ldap_chkResponseList returns ld 0x1c228e0 NULL
ldap_int_select
read1msg: ld 0x1c228e0 msgid 1 all 1
read1msg: ld 0x1c228e0 msgid 1 message type bind
read1msg: ld 0x1c228e0 0 new referrals
read1msg:  mark request completed, ld 0x1c228e0 msgid 1
request done: ld 0x1c228e0 msgid 1
res_errno: 49, res_error: <80090308: LdapErr: DSID-0C0903A8, comment: AcceptSecurityContext error, data 52e, v1db1>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ldap_msgfree
ldap_err2string
ldap_err2string
ldap_free_connection 1 1
ldap_send_unbind
ldap_free_connection: actually freed
Updating SQL-Schema                                OK
Cleaning up DB                                     OK
root@test-observium:/opt/librenms#

root@test-observium:/opt/librenms# ./validate.php
ldap_create
ldap_url_parse_ext(ldap://ad.nantes.net)
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP ad.nantes.net:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 1.1.75.2:389
ldap_pvt_connect: fd: 4 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ldap_result ld 0x1e429c0 msgid 1
wait4msg ld 0x1e429c0 msgid 1 (infinite timeout)
wait4msg continue ld 0x1e429c0 msgid 1 all 1
** ld 0x1e429c0 Connections:
* host: ad.nantes.net  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue Jul 25 09:47:27 2017


** ld 0x1e429c0 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x1e429c0 request count 1 (abandoned 0)
** ld 0x1e429c0 Response Queue:
   Empty
  ld 0x1e429c0 response count 0
ldap_chkResponseList ld 0x1e429c0 msgid 1 all 1
ldap_chkResponseList returns ld 0x1e429c0 NULL
ldap_int_select
read1msg: ld 0x1e429c0 msgid 1 all 1
read1msg: ld 0x1e429c0 msgid 1 message type bind
read1msg: ld 0x1e429c0 0 new referrals
read1msg:  mark request completed, ld 0x1e429c0 msgid 1
request done: ld 0x1e429c0 msgid 1
res_errno: 49, res_error: <80090308: LdapErr: DSID-0C0903A8, comment: AcceptSecurityContext error, data 52e, v1db1>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ldap_msgfree
ldap_err2string
ldap_err2string
==========================================================
Component | Version
--------- | -------
LibreNMS  | 483e9b32176cd33d58f5d3d1630d58d541169fa9
DB Schema | 193
PHP       | 5.4.45-0+deb7u9
MySQL     | 5.5.55-0+deb7u1-log
RRDTool   | 1.4.7
SNMP      | NET-SNMP 5.4.3
==========================================================

[WARN]  Your install is out of date, last update: Tue, 30 May 2017 08:40:46 +0000
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
Modified files:
     AUTHORS.md
     CHANGELOG
     CONTRIBUTING.md
     LICENSE.txt
     Makefile
     README.md
     build.sql
     composer.json
     config.php.default
     daily.php
      and 8 more...
ldap_free_connection 1 1
ldap_send_unbind
ldap_free_connection: actually freed
root@test-observium:/opt/librenms#

@Kevin_Krumm,

I backuped the config.php and I had reinstalled my librenms.
now, it’s ok for update

@laf
I try later for POE, my Librenms had been reinstalled

1 Like

Hello, @laf

I have always my issue for POE.
Here, the debug php poller.php -h sw-bonnegarde1-1.reseau.nantes.net -d -v -p ports
https://paste.ubuntu.com/25183400/

Cdlt,

That looks fine to me. I did however re-read your original message. This data isn’t in the overview page, it’s under ports.

@Laf,

I don’t understand very well.
Here https://forum.netonix.com/viewtopic.php?f=6&t=2156
I can see Poe stat in Overview page.

For exemple, a phone is connected on interface Fast 0/2 on my switch

In paste.ubuntu https://paste.ubuntu.com/25183400/
On line :

  • 2542
  • 2830

I can see that SNMP is ok.

On line 5554 , a array seems OK

But in line 7156, it seems that not data in rrd.
Cdlt,

That screenshot in the link is for sensor support not specific POE support as per what we provide in ports.

@laf Do you have an example screenshot of what the port page is supposed to look like with PoE enabled? We have it enabled in our config and I don’t think there is any PoE info showed.

I don’t have any PoE devices :frowning: