Commit Graph
153 Commits
Author SHA1 Message Date
Tony MurrayandNeil Lathwood b56c6b6adf fix: fdb tables multiple IPs and IPs from other devices adding extra rows (#6930)
Fix missing IPs because the ARP entries are on different port_id
Update arp discovery to use snmpwalk_group() additional fix in that function
Fix removal of arp entries
Fix a debug output type in fdb discovery
2017-07-04 22:27:43 +01:00
Tony MurrayandNeil Lathwood e8dd72e8db feature: Support fdb table on generic devices (#6902)
* feature: support fdb table on generic devices
refactored code to use snmpwalk_group
refactored ajax table code to use joins and reduce extra queries
add indexes for device_id and port_id, drop primary index
Make all columns sortable
Fix a few other small issues

* Add index for vlan_id since that field can be searched by the user

* fix whitespace

* Rename 197.sql to 198.sql

* set row count for table
2017-06-29 21:03:56 +01:00
Neil LathwoodandGitHub 54365985a6 Revert "feature: fdb tables (#6616)" (#6886)
This reverts commit 81ddab86af.
2017-06-25 07:04:04 +01:00
Lorenzo ZafraandTony Murray 81ddab86af feature: fdb tables (#6616)
* feature: FDB TABLES for ios and timos

* Fixed coding style issues

* renamed fdb.sql to 191.sql

* fixed travisCI issue

* FDB table discovery working on IOS

* Fixed bug: failing to insert fdb entries into database

* Fix phpcbf issue

* moved sql schema

* rename sql schema

* Add (tentative) FDB support for HP Comware switches

* build schema

* schema changes

* run build schema.......

* FBD Table discovery working on HP ComWare

* FBD Table discovery working on HP ComWare

* Add FDB support for HP Comware

* Discovery regex fix, tested and works for cisco 3750, 2960, 6509

* Use vlan_id instead of raw vlan. Remove Nokia implementation as vlans are not being discovered for it at the moment.

* Use vlan_id instead of vlan.

* Add debug messages, comware support

* Sorry.. phpunit isnt working for me

* Use a file structure instead of if statement per OS

* Make inserts to vlan table if entry does not exist.

* Rename sql schema file

* Use existing context name

Improve output and database synchronization

Remove chromephp and if ios

rename sqlfile

add comware back

update schema

* Delete TIMETRA-CHASSIS-MIB

* Delete TIMETRA-FILTER-MIB

* change index to bigint to be safe
2017-06-24 22:07:31 -05:00
Tony MurrayandNeil Lathwood 1c43fecfa7 feature: New snmpwalk_group() function (#6865)
* feature: New snmpwalk_group() function
Intended to replace several other snmp functions, but may not behave exactly as they did.
Properly handles multi-line values.
Adds additional index data after the grouping so it isn't lost. Perhaps might make optional.
Might add $skip variable to support fully numeric oid indexes. Thoughts?

* Add e and t options.  If we want to specify, options, we can add that later.
2017-06-23 22:13:50 +01:00
Neil LathwoodandGitHub 92433f3511 feature: Added snmp_check() to decide if a device is up/down for snmp #5946 (#5948)
* feature: Added snmp_check() to decide if a device is up/down for snmp #5946

* added missing line

* Update snmp.inc.php
2017-02-23 22:47:18 +00:00
Neil LathwoodandGitHub fad5aca1b7 feature: Allow customisation of rrd step/heartbeat when creating new rrd files (#5947)
* feature: Allow customisation of rrd step/heartbeat when creating new rrd files

* revert defaults

* added docs + webui config option

* Move RrdDefinition to an Object to make them easier to create and remove the possibility of typos.

* Fix style/lint issues and missing use statements

* 3 more missing use statements

* updated doc + moved schema file
2017-02-23 22:45:50 +00:00
Neil LathwoodandGitHub ced759105e fix: Updated qnap sensor code to be more generic #5910 (#5925)
* fix: Updated qnap sensor code to be more generic #5910

* small change to check for valid data

* small code change
2017-02-17 14:43:30 +00:00
Neil LathwoodandTony Murray cc51a68f85 feature: Optional partial port polling (#5805)
* feature: Added ability to switch port polling mode

* update, speed things up slightly by walking certain tables

* more fixes

* updates

* updates

* update to exclude ports that are down

* wrong variable used

* update to set previous port status when null

* small update to port disco
2017-02-14 17:26:07 -06:00
Neil LathwoodandGitHub 01e4ac3d58 newdevice: Added additional sensor support for Huawei VRP #4279 2017-01-19 16:42:57 +00:00
Neil LathwoodandTony Murray 7215059fd0 fix: Re-order snmp mib dirs to load mibs correctly #5405 (#5415)
* fix: Re-order snmp mib dirs to load mibs correctly #5405

* Remove unneeded code
2017-01-12 23:46:09 -06:00
Tony MurrayandNeil Lathwood 5c156e7e01 fix: Remove usage of -CI, it is not allowed for snmpbulkwalk #5164 2016-12-20 16:58:20 +00:00
Tony MurrayandNeil Lathwood db240cb4eb refactor: Collection and output of db and snmp stats (#5049) 2016-11-23 06:57:19 +00:00
Tony MurrayandNeil Lathwood 9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Neil LathwoodandTony Murray d389069e2e refactor: Tidy up mibs V-Z (#4979) 2016-11-17 15:43:31 -06:00
Neil LathwoodandTony Murray d9f4096821 Start of cleaning up mibs (#4806)
refactor: Start of cleaning up mibs
2016-11-09 18:23:27 -06:00
Neil LathwoodandDaniel Preussker b89ebabecc Feature: Added support for global max repeaters for snmp (#4880)
* Feature: Added support for global max repeaters for snmp

* added phpdoc
2016-10-28 06:02:09 +00:00
Neil LathwoodandSøren Rosiak 6c324cd03e refactor: Improve sensors polling for performance increase (#4725)
refactor: Improve sensors polling for performance increase
2016-10-11 19:34:09 +03:00
Neil LathwoodandGitHub c0d7ad44b0 Revert "refactor: snmp cleanup" (#4746) 2016-10-07 09:26:10 +01:00
Tony MurrayandNeil Lathwood 07e8e9f2be refactor: snmp cleanup (#4683) 2016-10-06 21:20:11 +01:00
Neil Lathwood 59da343f7d changed from isset to !empty 2016-10-03 18:23:59 +01:00
Johan 032bfe0745 Fixes issue-4677 2016-09-30 15:08:11 +02:00
Tony MurrayandNeil Lathwood edbb6ae0e3 refactor: Centralize MIB include directory specification (#4603)
* refactor: Centralize MIB include directory specification
The default is now:
```
$config['mib_dir'].'/mibdirname:'.$config['mib_dir']
```
This means we exclude OS mibs and only use ours  (we could prepend `+` if we want to include os mibs.
All snmp calls should only include the name of the subdirectory under the mibs directory.

* Remove d_echo from Proc
Fix snmpsim tests.
2016-09-28 14:19:28 +01:00
Tony Murray c31b3c0301 feature: use snmpsim for testing
fallback feature so we don't have to run snmpsim on devel computers, should be adequate for now
./scripts/pre-commit.php -u -snmpsim will start an snmpsimd.py process automatically
2016-09-23 14:57:31 -05:00
Tony Murray 7371c6e1b8 feature: improved readability for snmp debug output
It now matches RRD and SQL output format, the color is cyan
Slightly better ip removal from debug output, only removes valid IPs now.
2016-09-21 17:15:28 -05:00
Tony Murray bb318fdcad refactor: consolidate snmpcmd generation
I needed to generate an snmpcmd for an upcoming PR, so I figured I'd save a little code duplication.
2016-09-18 00:08:14 -05:00
Tony MurrayandNeil Lathwood 0351b54fb8 webui: make d_echo work in webui (#4432)
* webui: make d_echo work in webui
Remove d_print_r(), it is redundant to d_echo()
Remove d_echo calls in services.inc.php

* Switched debug check to work with nginx
2016-09-14 10:05:49 +01:00
Tony MurrayandNeil Lathwood 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
laf d56ff8b87f More updates for junos bgp polling 2016-08-03 16:49:41 +01:00
laf f02ffce87c Merge branch 'master' of github.com:laf/librenms into issue-3877 2016-08-02 22:52:15 +01:00
laf e54881df14 Improved junos BGP code + WebUI 2016-08-02 22:28:57 +01:00
laf 2d60ca9197 Updated multi_oid cache function 2016-08-01 15:01:52 +01:00
laf d722bb6943 Update use of max repeaters to save mysql queries 2016-07-30 15:11:29 +01:00
laf 8239109f78 Added support for setting max-repeaters per device 2016-07-06 14:45:23 +01:00
Paul Gear 4fa4dc2723 Use debug echo on register_mib to prevent interfering with API 2016-06-29 07:57:54 +10:00
Neil LathwoodandGitHub 692c29cbd8 Merge pull request #3576 from Exa-Omicron/master
Enabling "Random access" lookups fixes "MIB: Could not find all::enterprises.xxx" error
2016-06-27 11:04:03 +01:00
Ruairi CarrollandGitHub 64c55acecd Update snmp.inc.php
Catching BSD 'End of MIB' messages and stripping it out.
2016-06-23 13:19:12 +02:00
Robert Verspuy b6e76f911e Enabling "Random access" lookups for snmp_translate fixes the "MIB: Could not find all::enterprises.xxxx" error 2016-05-31 20:02:09 +02:00
HenocKA 7a00d913a1 update branch 2016-02-06 06:52:21 +01:00
Aaron Daniels 4ff92481e4 - Quote the SNMP v2c community, v3 is already quoted.
- Change the snmpver to double quotes for consistency.
2016-02-04 16:38:07 +10:00
HenocKA 6de58f55df merging 2016-02-02 12:58:05 +01:00
Neil Lathwood 7c79d62baf Merge pull request #2840 from adaniels21487/issue-1851
Cisco CBQOS
2016-01-29 10:21:34 +00:00
HenocKA 0ac8f584b2 discoverying and polling VRF 2016-01-26 15:22:49 +01:00
Aaron Daniels e54e22b56e - Changed upper case variables to lower case. 2016-01-26 23:31:07 +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
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
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
Neil Lathwood 5cfc5fb328 Merge pull request #2785 from paulgear/mib-based-polling-fix-shortname
MIB-based-polling: Fix short name generation
2016-01-17 14:49:04 +00:00
laf 0558275414 Added verbose debugging, normal debugging will now try and mask certain information 2016-01-17 14:39:17 +00:00
Paul Gear fc6a4b7076 Include shortname in all cases 2016-01-17 14:05:37 +10:00