Commit Graph

2984 Commits

Author SHA1 Message Date
Maximilian Wilhelm
ec5d0dfd89 Remove redundant code from port-{adsl,etherlike,poe} polling submodules.
$this_port already gets defined within include/polling/ports.inc.php
  so there's no need to redefine it again in each submodule.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-02-03 21:14:25 +01:00
Maximilian Wilhelm
5521002b37 Fix port association for adsl, etherlike and poe port information.
In 2c9df26bbf 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
Maximilian Wilhelm
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
Paul Gear
a81776e77b Merge pull request #2862 from laf/issue-2859
Added ability to ignore device sensors from entity mib
2016-02-03 15:31:32 +10:00
laf
37d72e1512 Merge branch 'master' of https://github.com/librenms/librenms into issue-2770 2016-01-31 18:17:59 +00:00
Rosiak
5dd9fed3e0 Wrong array value 2016-01-31 00:18:30 +01:00
Rosiak
3139239240 Do not discover a temp sensor which is not present
#2848
2016-01-31 00:16:39 +01:00
laf
725fbd2c08 Another fix 2016-01-30 10:10:16 +00:00
laf
f4820dad90 Fixed code to run with php 5.3 2016-01-30 10:05:46 +00:00
Neil Lathwood
b72c1282d9 Merge pull request #2797 from BarbarossaTM/issue-386-v2
Ability to use ifIndex,ifName and ifDescr to create and update port rrd files
2016-01-29 13:05:03 +00:00
Neil Lathwood
7c79d62baf Merge pull request #2840 from adaniels21487/issue-1851
Cisco CBQOS
2016-01-29 10:21:34 +00:00
Rosiak
e7e035305b Eaton Basics 2016-01-28 23:11:11 +01:00
Neil Lathwood
57a7549446 Merge pull request #2764 from vitalisator/stp
Add STP port polling and device information
2016-01-28 19:08:09 +00:00
Neil Lathwood
e00a35c2ff Merge pull request #2867 from paulgear/master
Update per-module poller performance collection
2016-01-28 09:41:09 +00:00
laf
3560a39b52 Updated thisisnotbullshit variable 2016-01-28 09:38:31 +00:00
Aaron Daniels
e54e22b56e - Changed upper case variables to lower case. 2016-01-26 23:31:07 +10:00
Maximilian Wilhelm
8c704f7bdf Allow editing port association mode of a device.
Add a select box to the device SNMP edit page in the WebUI to update
  the port association mode of a device.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:50:00 +01:00
Maximilian Wilhelm
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
Paul Gear
99a76d4ea2 Update per-module poller performance collection
This makes the following changes:
- Record per-module performance data in the same measurement as overall poller-perf
- Add tags to distinguish modules
- Update rrd filenames
- Use stacked graph for poller modules
2016-01-26 20:20:42 +10:00
Daniel Preussker
3e97875d77 Merge pull request #2787 from laf/anonymous-data
Added verbose debugging, normal debugging will now try and mask certain information
2016-01-26 08:09:05 +00:00
Daniel Preussker
3b6fb8c4c3 Merge pull request #2854 from laf/issue-2810
Added Lexmark printer support
2016-01-26 05:39:21 +00:00
laf
a40b609bfa Removed edgeos test 2016-01-26 01:19:44 +00:00
laf
f10c42678d Added bgpPeers_cbgp delta and prev 2016-01-26 01:06:21 +00:00
laf
26d96ba718 Fixed nagios transport 2016-01-25 23:58:38 +00:00
laf
427c4f07c6 Added ability to ignore device sensors from entity mib 2016-01-25 22:37:38 +00:00
laf
9b1d2f31a1 Added Lexmark printer support 2016-01-24 23:57:24 +00:00
laf
2a2c32787a Fixed silly sql build for vminfo table 2016-01-24 23:36:38 +00:00
vitalisator
995897b75c switch to newer IEEE8021-Q-BRIDGE-MIB 2016-01-24 20:50:42 +01:00
vitalisator
40d17b4c4a resolve problem with absent VLAN's on devices with reported version 2 ieee8021QBridgeVlanVersionNumber
ieee8021QBridgeVlanVersionNumber OBJECT-TYPE
    SYNTAX      INTEGER {
                    version1(1),
                    version2(2)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The version number of IEEE 802.1Q that this device
        supports.  Reported as 1 by VLAN Bridges that support
        only SST operation, and reported as 2 by VLAN Bridges
        that support MST operation."
    REFERENCE   "12.10.1.1"
    ::= { ieee8021QBridgeEntry 2 }
2016-01-24 20:35:29 +01:00
vitalisator
b476c5bf99 add STP Ports 2016-01-24 18:45:19 +01:00
Mike Rostermund
006056a754 Store performance data for each poller module 2016-01-24 15:35:31 +01:00
Daniel Preussker
8c0c5210cf Merge pull request #2835 from BarbarossaTM/auth-ldap-authorize
Add HTTP Authentication / LDAP Authorization module
2016-01-22 08:02:58 +00:00
Paul Gear
1aad82c73c Merge pull request #2836 from laf/issue-2833
Added eventlog to show when device has been removed
2016-01-22 10:25:44 +10:00
Paul Gear
7528453941 Remove null message on rename 2016-01-22 09:39:26 +10:00
Neil Lathwood
b0f4c97d0b Merge pull request #2786 from paulgear/list-only-relevant-mib-graphs
Show only relevant MIB graphs
2016-01-21 23:31:50 +00:00
Neil Lathwood
abf2fc0ba5 Merge pull request #2740 from paulgear/unified-data-storage-rrd-influx
First cut at unified data storage for rrdtool & influxdb
2016-01-21 23:31:09 +00:00
laf
e03031e793 Added eventlog to show when device has been removed 2016-01-21 23:12:18 +00:00
Maximilian Wilhelm
64ce4f335f Add HTTP Authentication / LDAP Authorization module.
This Authentitation / Authorization module provides the ability to let
  the webserver (e.g. Apache) do the user Authentication (using Kerberos
  f.e.) and let libreNMS do the Authorization of the already known user.
  Authorization and setting of libreNMS user level is done by LDAP group
  names specified in the configuration file. The group configuration is
  basicly copied from the existing ldap Authentication module.

  To save lots of redundant queries to the LDAP server and speed up the
  libreNMS WebUI, all information is cached within the PHP $_SESSION as
  long as specified in $config['auth_ldap_cache_ttl'] (Default: 300s).

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-21 21:49:08 +01:00
Rosiak
e2775bd45f Fix 2723 2016-01-21 14:18:01 +01:00
Aaron Daniels
bf37312bdc Cisco CBQOS
Implements the CISCO-CLASS-BASED-QOS-MIB to retrieve QOS counters from Cisco devices.
Policy and Class-map details are collected and stored in the database.
Details are presented on a new "CBQoS" tab of the interface that the policy is applied to.
Includes a policy selector that allows you to select which policy-map to show graphs for.

Each class-map has its own rrd file, in which 3 metrics are stored: Bytes, QoS Drops, Buffer Drops.
This can produce a LOT of rrd files.

As an example:
A Cisco 4500 series switch, running MQC on 200 ports. Each port has a common 5 class queueing policy applied, this creates 1000 (5 x 200) RRD's.

Because of this I have currently set:
```
$config['discovery_modules']['cisco-cbqos']    = 0;
```

Includes function snmpwalk_array_num, which performs a numeric SNMPWalk and returns an array containing $count indexes
One Index:
 From: 1.3.6.1.4.1.9.9.166.1.15.1.1.27.18.655360 = 0
 To: $array['1.3.6.1.4.1.9.9.166.1.15.1.1.27.18']['655360'] = 0
Two Indexes:
 From: 1.3.6.1.4.1.9.9.166.1.15.1.1.27.18.655360 = 0
 To: $array['1.3.6.1.4.1.9.9.166.1.15.1.1.27']['18']['655360'] = 0
And so on...
2016-01-21 21:18:14 +10:00
Paul Gear
53b5f4e1c8 Fix the same bug in routeros section 2016-01-21 08:52:32 +10:00
Paul Gear
e8c64e98a4 Fix use of CISCO-AAA-SESSION-MIB
It should only be used if OS was discovered.
2016-01-21 08:50:20 +10:00
Daniel Preussker
c11cf53658 Merge pull request #2815 from laf/notifications-update
Added local rss file + tidied up locations of notifications and callback
2016-01-20 20:01:07 +00:00
Mike Rostermund
dfc32107b5 Merge pull request #2794 from laf/sensors-cleanup
Updated discovery sensors module directory structure
2016-01-19 23:28:48 +01:00
laf
aea5c3f515 Updated missing states sensor dir change 2016-01-19 22:16:48 +00:00
Mike Rostermund
e021cf8f67 Merge pull request #2801 from wiad/issue-2708
Add infoblox devices (Issue 2708)
2016-01-19 23:00:43 +01:00
Paul Gear
b5e67358a0 Merge pull request #2809 from laf/issue-2772
Removed unused code in port poller for non-cisco devices
2016-01-20 07:52:34 +10:00
Neil Lathwood
eb34c1c84e Merge pull request #2814 from paulgear/disable-global-debug-message
Disable debug message about MIB poller
2016-01-19 21:52:06 +00:00
laf
a45259377b Added local rss file + tidied up locations of notifications and callback 2016-01-19 21:50:00 +00:00
Paul Gear
8416f4af3e Disable debug message about MIB poller 2016-01-20 07:40:03 +10:00