175 Commits

Author SHA1 Message Date
f0o
4d0d78c48c Merge branch 'issue-386-v3' of git://github.com/BarbarossaTM/librenms
Conflicts:
	sql-schema/099.sql
2016-02-07 15:23:52 +00:00
76a29f41e3 Fix detection of deleted interfaces for ifName/ifDescr port association mode.
The previous ifIndex based port mapping schema did detect deleted ports
  by checking ports in the DB against the ports currently polled via SNMP
  which breaks when using another port mapping schema. This commit fixes
  problem by checking known and found ports by their port_id.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-02-03 22:48:18 +01:00
5521002b37 Fix port association for adsl, etherlike and poe port information.
In 2c9df26bbf22af94c354bcf445b55a56eaece81a I broke the association of
  ports in the DB and ports just polled via SNMP for the adsl, etherlike
  and poe submodules and no one noticed. This fixes this issue. Sorry.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-02-03 21:14:25 +01:00
79eab54fd9 Allow ignoring unmapable interfaces in poller.
When using the ifName or ifDescr as means to map discovered ports to
  known ports in the DB (think of port association mode) it's possible
  that we're facing the problem that the ifName or ifDescr polled from
  the device is unset or an empty string (like when querying some ubnt
  devices...). If this happends we have no way to map this port to any
  port found in the database. As reported this situation may occur for
  the time of one poll and might resolve automagically before the next
  poller run happens. Without this special case this would lead to new
  ports added to the database each time this situation occurs. To give
  the user the choice between »a lot of new ports« and »some poll runs
  are missed but ports stay stable« the 'ignore_unmapable_port' option
  has been added to configure this behaviour. To skip the port in this
  loop is sufficient as the next loop is looping only over ports found
  in the database and "maps back". As we did not add a new port to the
  DB here, there's no port to be mapped to.

  I'm using the in_array() check here, as I'm not sure if an "ifIndex"
  can be legally set to 0, which would yield True when checking if the
  value is empty().

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-02-03 21:14:24 +01:00
laf
dc5f286b9a Added ifOperStatus and ifAdminStatus _prev values to db. 2016-02-02 13:47:13 +00:00
2c9df26bbf Update discovery and poller to allow stable interface mapping by ifName/ifDescr based port mapping.
By default libreNMS used the ifIndex to associate ports just found via SNMP
  with ports discoverd/polled before and stored in the database. On Linux boxes
  this is a problem as ifIndexes are rather likely to be unstable between reboots
  or (re)configuration of tunnel interfaces (think: GRE/OpenVPN/Tinc/...), bridges,
  Vlan interfaces, Bonding interfaces, etc.

  This patch adds a »port association mode« configuration option per device which
  allows to map discovered and known ports by their ifIndex, ifName, ifDescr, or
  maybe other means in the future.
  The default port association mode still is ifIndex for compatibility reasons.

  As port RRD files were stored by their ifIndex before, they are now identified
  by their unique and stable port_id to ensure a stable and unique mapping and
  allow future port association modes to be added without requireing any further
  internal changes. Existing RRD files are renamend accordingly in discovery and
  poller tools to ensure stability of port associations in both modules as we
  don't know which might run first after an update.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:49:30 +01:00
laf
302ecb8858 Removed unused code in port poller for non-cisco devices 2016-01-19 11:25:03 +00:00
laf
0f33f6d1fa Rebased 2016-01-04 12:09:32 +00:00
8aecf71910 Merge pull request #2552 from SaaldjorMike/bcast-mcast-ciscosb
Ignore HC Broadcast and Multicast Counters for Cisco SB as they're al…
2016-01-02 07:01:18 +10:00
laf
32f5980523 Some more tweaks 2015-12-23 15:12:42 +00:00
laf
8b63bfad30 Updated again 2015-12-23 11:40:17 +00:00
laf
0e33048339 Updated influx port data 2015-12-23 11:28:40 +00:00
laf
904a24d7ed Added some more tags for ports 2015-12-23 11:17:00 +00:00
1ced3dff98 Merge pull request #2558 from vizay/brocade-vdx-support
Added full discovery and polling support for brocade VDX devices.
2015-12-18 15:57:27 +00:00
73f09f129a Merge pull request #2542 from ekoyle/add_stats_to_db
Add stats to db
2015-12-10 21:15:20 +00:00
bd23d9e56a This isn't the operator you are looking for. Move along. 2015-12-09 15:28:13 -07:00
81d84e0f8b Always add 'extended' metrics to db and remove option 2015-12-08 09:54:31 -07:00
a2d97f4283 Merge pull request #2458 from laf/rrdtune
Fix for crazy traffic values seen in graphs
2015-12-08 16:12:22 +00:00
c39c46aa18 Removed starting parenthesis causing syntax error 2015-12-06 10:53:43 +01:00
59b4ef7712 Added discovery and polling support for brocade VDX devices. Removed an obsolete value and check for ifAlias (in definitions and ports) since VDX nowdays report correct from ifAlias. Removed printing of interface numbers for vdx devices in the interface list since VDX devices do not report the expected ifIndex value like other switches do 2015-12-04 15:35:02 +01:00
9b62235f25 Ignore HC Broadcast and Multicast Counters for Cisco SB as they're always 0 2015-12-03 22:00:39 +01:00
1ee481ff6e Rename option to extended_port_metrics 2015-12-03 09:40:30 -07:00
fcaf3d49ab Fix reference to non-existent variable
Use $port_id since $ports[$ifIndex]['port_id'] doesn't exist yet
2015-12-03 09:38:16 -07:00
3f689045d9 Remove a couple of stray OIDs 2015-12-03 09:38:16 -07:00
55c05c7866 Allow users to keep more statistics in the db
* Add $config['enable_extended_port_metrics'] to enable feature
* Add a new table to store stuff in
* Update data from the poller
2015-12-03 09:38:16 -07:00
laf
8460adc756 eth0 on AirFibre units get data from another MIB 2015-12-02 23:23:31 +00:00
laf
46b2fd7d1f Removed debug 2015-11-18 21:54:07 +00:00
laf
52e0be911b More updates 2015-11-17 05:38:45 -08:00
laf
253b27d403 More updates to tune rrdfiles 2015-11-17 05:14:41 -08:00
laf
84863586b5 rrdtune code 2015-11-17 02:20:23 -08:00
laf
7b14aada4e Rebased 2015-10-26 11:08:19 +00:00
f0o
495b4b24fa Fixes #2098 2015-10-10 13:34:51 +00:00
e2dfab4ca0 Merge pull request #2007 from QuxLabs/qux-issue-8
Added working memcached support
2015-10-01 17:08:03 +01:00
f0o
7d95e94954 Fix rrd creation parameters 2015-09-28 08:24:57 +00:00
7832868dd6 Added generic memcached support to dbFacile.*
Remove now obsolete memcached code in:
  html/ajax_rulesuggest.php

Remove all the broken memcached code in:
  html/pages/device/health/mempool.inc.php
  html/pages/device/overview/generic/sensor.inc.php
  html/pages/device/overview/mempools.inc.php
  html/pages/device/port.inc.php
  html/pages/device/ports.inc.php
  html/pages/health/sensors.inc.php
  includes/polling/functions.inc.php
  includes/polling/mempools.inc.php
  includes/polling/ports.inc.php
  includes/polling/storage.inc.php
2015-09-27 19:33:17 +00:00
ba7bf5f60b Merge pull request #1715 from laf/rrdoptions
Updated rrdtool_update() to use new array format
2015-09-22 12:15:59 +00:00
laf
e4fd45037c Final update for overwriting ifAlias 2015-08-30 14:34:37 -07:00
c25dc9ccdb Merge pull request #1750 from laf/issue-1729
Also use ifHighSpeed if ifSpeed is 0 and ifHighSpeed exists
2015-08-24 07:50:55 +10:00
laf
0baa0d81e2 Reworked if check 2015-08-23 21:39:37 +00:00
laf
a413968eb8 Also use ifHighSpeed if ifSpeed is 0 and ifHighSpeed exists 2015-08-23 20:06:28 +00:00
laf
8d929bc43c Moved the snmp query for poe outside of the loop 2015-08-23 17:04:20 +00:00
laf
1d9fc71c71 Revert change which skips over ports that are down / admin down 2015-08-23 09:40:55 +00:00
laf
d0e803340e More updates 2015-08-21 21:02:05 +00:00
55a2e0423d Remove all unneeded if($debug)-statements and replace them with d_echo 2015-08-21 16:10:00 +02:00
laf
433562d351 More updates for influx 2015-08-19 20:58:02 +00:00
laf
987634e463 Updated rrdtool_update() to use new array format 2015-08-18 16:26:55 +00:00
7817890b80 Fix parenthesis typo 2015-08-07 17:11:12 +02:00
5467756328 Generalise mapping ifDescr to ifAlias
This allows both per OS enforcing of ifDescr = ifAlias as well as populating
when ifAlias = '' or NULL
2015-08-07 17:07:26 +02:00
2dd8fe0553 Reorder ifalias_null check to prevent var flapping
This needs to run before IF-MIB data update, and needs to check and set
$this_port['ifAlias'] only as to not break the $data_oids loop.
2015-08-07 16:41:33 +02:00
5e68b2e6e1 Also update $this_port for port descr parsing 2015-08-06 17:57:53 +02:00