Yes, there has been a suggestion to add the date for last discovery in the github thread. I will start working on that as soon as the current patch is done and accepted. We are trying not to add anything new to avoid further delays
Hi @EnzoZafra,
Ok.
On my network, there are around 60000 @mac in database.
The script donβt work on certain switch, for example 4500x.
The oid isnβt not implemented.
root@test-observium:/opt/librenms# php poller.php -h sw-4500* -vv -m fdb-table
LibreNMS Poller
Version info:
Commit SHA: 483e9b32176cd33d58f5d3d1630d58d541169fa9
Commit Date: 1496133646
DB Schema: 193
PHP: 5.4.45-0+deb7u8
MySQL: 5.5.55-0+deb7u1
RRDTool: 1.4.7
SNMP: NET-SNMP 5.4.3
==================================DEBUG!
Starting polling run:
SQL[SELECT * FROM devices
WHERE disabled
= 0 AND hostname
LIKE βsw-4500%β ORDER BY device_id
ASC]
SQL[SELECT * FROM devices_attribs WHERE device_id
= β73β]
Hostname: sw-4500x-vss-vlan11.reseau.nantes.net
Device ID: 73
OS: iosxe (cisco)
SQL[INSERT INTO device_perf
(xmt
,rcv
,loss
,min
,max
,avg
,device_id
,timestamp
) VALUES (β3β,β3β,β0β,β1.16β,β3.75β,β2.32β,β73β,NOW())]
SNMP Check response code: 0
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OQnUst -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss-vlan11.reseau.nantes.net:161 sysUpTime.0 sysLocation.0 sysContact.0 sysName.0 sysObjectID.0]
sysUpTime.0 = 2464899425
sysLocation.0 = Tour Bretagne, Place Bretagne, Nantes
sysContact.0 = DRN-r&t
sysName.0 = sw-4500x-vss.reseau.nantes.net
sysObjectID.0 = enterprises.9.1.1732
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OvQ -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss-vlan11.reseau.nantes.net:161 sysDescr.0]
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), Version 03.08.01.E RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright Β© 1986-2016 by Cisco Systems, Inc.
Compiled Thu 2
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OQnUst -m HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss-vlan11.reseau.nantes.net:161 snmpEngineTime.0 hrSystemUptime.0]
snmpEngineTime.0 = 24648874
hrSystemUptime.0 = No Such Object available on this agent at this OID
Using SNMP Agent Uptime (24648994s)
RRD[update /opt/librenms/rrd/sw-4500x-vss-vlan11.reseau.nantes.net/uptime.rrd N:24648994]
RRDtool Output: Uptime: 285 days, 6h 56m 34s
SQL[SELECT lat
,lng
FROM locations
WHERE location
=βTour Bretagne, Place Bretagne, Nantesβ LIMIT 1]
Using cached lat/lng from other device
Start Device Groups
SQL[SELECT * FROM device_groups ORDER BY name]
SQL[SELECT DISTINCT(devices.device_id) FROM devices WHERE devices.device_id=β73β AND (devices.sysName REGEXP βsw-manu*β && devices.sysName NOT REGEXP βloop-pn-manu*β ) LIMIT 1]
SQL[SELECT DISTINCT(devices.device_id) FROM devices WHERE devices.device_id=β73β AND (devices.ip REGEXP β10.159.8.*β) LIMIT 1]
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β73β]
Groups Added:
Groups Removed:
End Device Groups
RRD[update /opt/librenms/rrd/sw-4500x-vss-vlan11.reseau.nantes.net/poller-perf.rrd N:0.499]
RRDtool Output: RRD[update /opt/librenms/rrd/sw-4500x-vss-vlan11.reseau.nantes.net/ping-perf.rrd N:2.32]
RRDtool Output: Polled in 0.499 seconds
Updating sw-4500x-vss-vlan11.reseau.nantes.net
SQL[UPDATE devices
set uptime
=β24648994β,last_ping
=NOW(),last_ping_timetaken
=β2.32β,last_polled
=NOW(),last_polled_timetaken
=β0.499β WHERE device_id
= β73β]
UPDATED!
Start Alerts
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β73β]
SQL[SELECT alert_schedule.schedule_id FROM alert_schedule LEFT JOIN alert_schedule_items ON alert_schedule.schedule_id=alert_schedule_items.schedule_id WHERE ( alert_schedule_items.target = β73β ) && ((alert_schedule.recurring = 0 AND (NOW() BETWEEN alert_schedule.start AND alert_schedule.end)) OR (alert_schedule.recurring = 1 AND (alert_schedule.start_recurring_dt <= date_format(NOW(), ββ%dβ) AND (end_recurring_dt >= date_format(NOW(), ββ%dβ) OR end_recurring_dt is NULL OR end_recurring_dt = β0000-00-00β OR end_recurring_dt = ββ)) AND (date_format(now(), β%H:%i:%sβ) BETWEEN start_recurring_hr
AND end_recurring_hr) AND (recurring_day LIKE CONCAT(β%β,date_format(now(), ββ),β%β) OR recurring_day is null or recurring_day = ββ))) LIMIT 1]
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β73β]
SQL[SELECT alert_rules.* FROM alert_rules LEFT JOIN alert_map ON alert_rules.id=alert_map.rule WHERE alert_rules.disabled = 0 && ( (alert_rules.device_id = -1 || alert_rules.device_id = β73β ) || alert_map.target = β73β )]
End Alerts
SQL[SELECT * FROM devices_attribs WHERE device_id
= β75β]
Hostname: sw-4500x-vss.reseau.nantes.net
Device ID: 75
OS: iosxe (cisco)
SQL[INSERT INTO device_perf
(xmt
,rcv
,loss
,min
,max
,avg
,device_id
,timestamp
) VALUES (β3β,β3β,β0β,β2.10β,β4.89β,β3.09β,β75β,NOW())]
SNMP Check response code: 0
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OQnUst -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss.reseau.nantes.net:161 sysUpTime.0 sysLocation.0 sysContact.0 sysName.0 sysObjectID.0]
sysUpTime.0 = 2464899478
sysLocation.0 = Tour Bretagne, Place Bretagne, Nantes
sysContact.0 = DRN-r&t
sysName.0 = sw-4500x-vss.reseau.nantes.net
sysObjectID.0 = enterprises.9.1.1732
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OvQ -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss.reseau.nantes.net:161 sysDescr.0]
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), Version 03.08.01.E RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright Β© 1986-2016 by Cisco Systems, Inc.
Compiled Thu 2
SNMP[/usr/bin/snmpget -v2c -c βpublicβ -OQnUst -m HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:sw-4500x-vss.reseau.nantes.net:161 snmpEngineTime.0 hrSystemUptime.0]
snmpEngineTime.0 = 24648874
hrSystemUptime.0 = No Such Object available on this agent at this OID
Using SNMP Agent Uptime (24648994s)
RRD[update /opt/librenms/rrd/sw-4500x-vss.reseau.nantes.net/uptime.rrd N:24648994]
RRDtool Output: OK u:0,00 s:0,00 r:0,51
OK u:0,00 s:0,00 r:0,52
OK u:0,00 s:0,00 r:0,54
Uptime: 285 days, 6h 56m 34s
SQL[SELECT lat
,lng
FROM locations
WHERE location
=βTour Bretagne, Place Bretagne, Nantesβ LIMIT 1]
Using cached lat/lng from other device
Start Device Groups
SQL[SELECT * FROM device_groups ORDER BY name]
SQL[SELECT DISTINCT(devices.device_id) FROM devices WHERE devices.device_id=β75β AND (devices.sysName REGEXP βsw-manu*β && devices.sysName NOT REGEXP βloop-pn-manu*β ) LIMIT 1]
SQL[SELECT DISTINCT(devices.device_id) FROM devices WHERE devices.device_id=β75β AND (devices.ip REGEXP β10.159.8.*β) LIMIT 1]
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β75β]
Groups Added:
Groups Removed:
End Device Groups
RRD[update /opt/librenms/rrd/sw-4500x-vss.reseau.nantes.net/poller-perf.rrd N:0.503]
RRDtool Output: RRD[update /opt/librenms/rrd/sw-4500x-vss.reseau.nantes.net/ping-perf.rrd N:3.09]
RRDtool Output: Polled in 0.503 seconds
Updating sw-4500x-vss.reseau.nantes.net
SQL[UPDATE devices
set uptime
=β24648994β,last_ping
=NOW(),last_ping_timetaken
=β3.09β,last_polled
=NOW(),last_polled_timetaken
=β0.503β WHERE device_id
= β75β]
UPDATED!
Start Alerts
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β75β]
SQL[SELECT alert_schedule.schedule_id FROM alert_schedule LEFT JOIN alert_schedule_items ON alert_schedule.schedule_id=alert_schedule_items.schedule_id WHERE ( alert_schedule_items.target = β75β ) && ((alert_schedule.recurring = 0 AND (NOW() BETWEEN alert_schedule.start AND alert_schedule.end)) OR (alert_schedule.recurring = 1 AND (alert_schedule.start_recurring_dt <= date_format(NOW(), ββ%dβ) AND (end_recurring_dt >= date_format(NOW(), ββ%dβ) OR end_recurring_dt is NULL OR end_recurring_dt = β0000-00-00β OR end_recurring_dt = ββ)) AND (date_format(now(), β%H:%i:%sβ) BETWEEN start_recurring_hr
AND end_recurring_hr) AND (recurring_day LIKE CONCAT(β%β,date_format(now(), ββ),β%β) OR recurring_day is null or recurring_day = ββ))) LIMIT 1]
SQL[SELECT device_group_id
FROM device_group_device
WHERE device_id
=β75β]
SQL[SELECT alert_rules.* FROM alert_rules LEFT JOIN alert_map ON alert_rules.id=alert_map.rule WHERE alert_rules.disabled = 0 && ( (alert_rules.device_id = -1 || alert_rules.device_id = β75β ) || alert_map.target = β75β )]
End Alerts
SQL[INSERT INTO perf_times
(type
,doing
,start
,duration
,devices
,poller
) VALUES (βpollβ,βsw-4500*β,β1496845811.2085β,β1.069β,β2β,βtest-observium\nβ)]
poller.php sw-4500* 2017-06-07 16:30:12 - 2 devices polled in 1.069 secs
SNMP: Get[8/0.15s] Walk [0/0.00s]
MySQL: Cell[8/0.01s] Row[2/0.00s] Rows[9/0.01s] Column[6/0.00s] Update[2/0.01s] Insert[3/0.01s] Delete[0/0.00s]
Best regards
Cisco 4500x runs iosxe - therefore it is not implemented yet. Only ios and comware are supported. Developers are free to create support for additional OSβ but at the moment I am not able to
Hello @EnzoZafra ,
It seems to have bug.
When I select a switch (1)
I select an interface (2)
I choice FDB table (3)
4 > In this picture, I can see all @mac of FDB, not only for this interface.
This features is very great, thank you
Best regard,