Commit Graph

252 Commits

Author SHA1 Message Date
Ming-Han Yang
27971b34a8 Fix EdgeCore ifOperStatus does not follow the Cisco convention
* Since EdgeCore use "lowerLayerDown" in ifOperStatus when port is unplugged
* On the other way, Cisco use briefly "down".
* So change "lowerLayerDown" to "down" to workaround the bug that will make port always show as up/up
2019-08-20 11:21:42 +08:00
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
PipoCanaja
ccb6e2e614 Removed broken POE graphing code (#10188)
* remove broken POE graphing code

* remove broken POE graphing code

* add missing iosxe condition
2019-05-29 13:37:00 -05:00
PipoCanaja
36e709ebab Improved Linksys support, including POE (#10075)
Fixes #9718 

This PR adds POE graphs, even if not all the values that are polled on other OSes are available on this one.  

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 10075`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2019-04-09 20:32:57 +01:00
Ruslan
019c57beaa Add Junos VirtuallChassis ports polling (#9879)
* Update ports.inc.php

* Create junos-vcp.inc.php

* Fix some formatting errors in junos-vcp.inc.php

* Update junos_ex.snmprec

* Update junos_ex.json

* Update tests/data/junos_ex.jso

* Rollback junos_ex data set

* Update ports.inc.php

* Update junos-vcp.inc.php~

* Update tests/snmpsim/junos.snmprec

* Generate new .json files

* Update includes/polling/ports.inc.php

* Rollback tests/data/junos_ex.json

* Update junos.snmprec

* Update junos.snmprec

* Use str_pad in junos-vcp.inc.php
2019-03-12 09:01:35 -05:00
Nick Hilliard
09caced7ef Add support for Infinera-Coriant Groove (#9843)
* Add support for Infinera Groove
2019-03-04 17:31:53 +01:00
Vitali Kari
d60a0da7de Add support for Nokia ISAM (#9793)
* add mibs,first commit

* adds support for Nokia ISAM Plattform

* remove some comments

* change os polling to multi oid

* Restore file headers

* Fix discovery by sysObjectID

* first deactivate checks against IHUB (timos), It not necessary so long we can not provide more thatn one snmp community per device

* move snmp state and temperature from pre-cache

* Update os_schema.json
2019-02-12 20:23:02 -06:00
Erik
a6451860fc Fix if discover (#9643)
* fix_if_discover

* Update ports.inc.php

* Fixed overwriting IfDescr and IfAlias overwriting

* removed whitespace

* added ifname, ifalias and ifdescr copy if it is emtpy or null

* removed ifAlias from update to prevent overwrite

* removed ifName and ifDescr from update to prevent overwrite

* added is_port_valid before doing copy actions between ifDescr,ifAlias&ifName also added back ifDescr&ifName update

* Update ports.inc.php

* Update functions.php

* Update ports.inc.php

* Update exa_e7-2.json

* Update fortigate.json
2019-01-19 11:48:30 -06:00
Vitali Kari
272e511964 Nokia vrf (#9509)
* update some mibs

* add virtual router ports

* coding style

* refactor

* some refactoring

* some typos

* add snmprec

* Fix capturing VRF entries with no ports

* updated test data

* manually fix test data

Not going to try to fix the data capture for backslashes at this time.

* Revert "manually fix test data"

This reverts commit 2c98450706.

* timos data for net-snmp 5.7.3 ?????
2018-12-20 16:04:24 -06:00
evheros
d7a04f8cb7 Added Fortigate state sensors (#9520)
* Added Fortigate state sensors

* Added snmprec file

* Update fortigate.json

* Fix "awesome" ifHighSpeed implementation...

* Update fortigate.json

* better MAX_INT ifHighSpeed fix

* update for new ifType changes

* ifDescr is not used correctly like most fortinets
2018-12-11 22:18:46 -06:00
PipoCanaja
b67634bc5a Fixed ifType being removed when a port is down (#9493)
* Adding ifType to base_oids

* Improve discovery (update ifType) and polling (save ifType)

* Updated test data

* Updated json test data

* vlan isn't filtered by default :P

* With default ignored ports

* Update newer test data
2018-12-11 21:07:56 -06:00
Tony Murray
533c9022c9 Fixed Procera ports ifIndex and ports added by the poller (#9384)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-11-28 21:08:42 +00:00
Neil Lathwood
a10503b927 Ensure the checks for ASA context devices are strict (#9441) 2018-11-10 21:05:25 +00:00
PipoCanaja
e367f46fee device: Initial support for CXR-Networks Terminal Server (#9169)
* device: Initial support for CXR-Networks Terminal Server

* device: Support for CXR-Networks Terminal Server - CodeClimate + cleaning

* device: renamed cxr-networks-ts and code improvement

* device: cxr-networks-ts test data

* device: renamed os as cxr-ts

* device: renamed os as cxr-ts, test data
2018-09-10 21:32:06 -05:00
Neil Lathwood
23b46c7681 Improved port polling in certain scenarios (#9082)
* Improved port polling in certain scenarios

* Update ports.inc.php

* Update ports.inc.php

* Remove temporary variables
2018-08-28 10:29:28 -05:00
Tony Murray
e5fb7c9f16 Selective Port polling improvements (#8650)
Don't delete skipped ports when using selected polling
Improve output of port polling module.
Update ifOperStatus and ifAdminStatus even when skipping.

Warning! causes a semantic change where ifAdminStatus_prev and ifOperStatus_prev are updated every poll, so they will only be mismatched for one poll.  This could cause alerts to behave differently.

Add an optimization if less than 10% of the ports are disabled (or less than 5), walk the base oids.
Time improvement on test device Full: 12s, Selective: 8s, Optimized 4s. (no disabled ports on device, many down)

Another test device.

![image](https://user-images.githubusercontent.com/39462/40066671-46cdc956-582a-11e8-928a-80bbd81dd423.png)


DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-04 22:10:57 +01:00
Tony Murray
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-07-13 23:08:00 +01:00
Paul Heinrichs
f22e1a6ba6 Improved support for cambium cmm and added cmm4 (#8737)
- Added port discovery for cmm3 (not available for cmm4, not that i could find)
- Added discovery for cmm4
- Added Power port cmm4
- Removed Processor bug by disabling processor on device.

I am unable to test CMM4 and may need someone to do so or review for possible errors.

Fixes Issues #8732, #8731

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-07-07 13:56:54 +01:00
RobJE
82d01eb1a1 feature: Include adsl stats for vdsl ports (#8670)
* also include adsl stats for vdsl ports

* Update ports.inc.php
2018-05-21 19:33:57 +01:00
PipoCanaja
33589b7478 Optimisation - VRP - Only fetch the necessary OIDs for POE polling (#8744)
Hello

For VRP devices supporting POE, the goal is to fetch only the strict necessary values instead of all the table to improve the polling time (devices tested, 5720, are quite slow to return SNMP values).

Test Data is unchanged. 

Bye
PipoCanaja

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-05-20 14:45:29 +01:00
PipoCanaja
a1a13de0f6 feature: Added PoE graphs and improved PoE polling code (#8705)
* Poe Polling Code, Poe Graphs, and Huawei MIB

* Reverting the reindent done after pre-commit script

* Cleaning of code not used for Cisco IOS, removal of untested Procurve code, and restore of legacy generic code (tested with Cisco+huawei)

* Rename MIB file

* Rearranged duplicated code

* Cleaning of variable not used

* Cleaning of commented code after night validation in test environnement

* Cleaning after pre-commit.php comments

* test data with PoE oids for huawei 5720

* test data with PoE oids for cisco 2960X
2018-05-15 21:39:36 +01:00
cchance27
09d6b2fd54 feature: Added Prometheus PushGateway metric support (#8437)
* Added Prometheus PushGateway support

* fixed formatting

* fix set_curl_proxy to correct variable

* add documentation

* Update Metric-Storage.md

* Update mkdocs.yml
2018-04-13 15:46:19 +01:00
papatango71
7ed7885ca7 Add ifAlias to tag influxdb port data (#8461)
* Update ports.inc.php

Adding ifAlias to the $tags that are sent into influxdb

* Remove space
2018-03-23 12:43:50 -05:00
Neil Lathwood
faf48311b2 refactor: Small improvement to per port polling (#8431) 2018-03-22 13:40:11 -05:00
Michael Renner
b5273969a0 feature: Fetch ifAlias data for devices on the bad_ifXEntry list (#8275)
* fetch ifAlias data for devices on the bad_ifXEntry list

* add test data for SG350-10
2018-02-27 16:57:24 +00:00
Neil Lathwood
92f83c2567 fix: Validate ifHighSpeed is > 0 in selected port polling (#7885) 2017-12-11 15:51:29 -06:00
Zmegolaz
e31b884cc9 Feature: selected_ports per OS. Fixed layout of example MySQL table. (#7674)
* selected_ports per OS. Fixed layout of example MySQL table.

* Better table markdown.
2017-11-09 12:57:00 +00:00
Daniel Preussker
0cf8c2615f fix: Update ifIndex update on polling when ifIndex is not the port association mode (#7574) (#7575) 2017-10-30 19:44:01 +00:00
Paul Heinrichs
f038bcb6a1 device: Add more Procera interfaces (#7422)
* Add procera MIBS

* Add Channel ports to procera

* Fix whitespace

* CI Fix

* Remove unnecessary procera mib_dir

* Use snmpwalk_group

* CI fix

* Add more fields and change depth to snmpgroup_walk

* Minor style updates

* Add interface regex to procera.yaml
2017-10-19 08:09:45 -05:00
Lorenzo Zafra
f66d73de89 refactor: Use ifName if ifDescr is blank
* Add if statement for ROS os when querying remote port id for LLDP map

* Apply ifDescr fix in ports polling instead.
2017-07-29 12:09:15 +01:00
Yacine Benamsili
294ec4d73d feature: Added support for sending metrics to OpenTSDB (#7022)
* Create OpenTSDB.md

* Send collected data to OpenTSDB

* Send collected data to OpenTSDB

* Update build.sql

* Send collected data to OpenTSDB

* Delete 200.sql

* Update db_schema.yaml

* Update datastore.inc.php

* Update OpenTSDB.md

* Added OpenTSDB to mkdocs.yaml
2017-07-15 10:28:27 +01:00
Tony Murray
f5931535b4 fix: Check HC counters individually (#6828)
* fix: Check HC counters individually
Vendors are very inconsistent returning ifXTable values.
Some only implement some of them (seemingly randomly).
Others return them, but they are always 0.

This attempts to fix that by checking each value individually.

* A couple of small cleanups

* Change the logic, The (if < hc) logic will be messed up when the counters roll.
Just make sure it is not 0 or an empty string.
2017-06-15 08:11:10 +01:00
Neil Lathwood
3bf7e207a7 fix: Check for ifHCInOctets and ifHighSpeed before falling back to if… (#6777)
* fix: Check for ifHCInOctets and ifHighSpeed before falling back to ifEntry

* switched && to ||
2017-06-10 06:50:40 -05:00
Neil Lathwood
da68e50c00 refactor: Update some snmpwalks for ports polling to improve speed (#6341) 2017-04-05 16:13:57 +01:00
David Bell
a1b62cea73 Update ports.inc.php (#6253) 2017-03-23 14:11:18 +00:00
Falk Stern
affe5090f4 feature: Send collected data to graphite server (#6201)
* Initial support for graphite

* Enable graphite include

* fixed typos.

* Fixed port naming to graphite metric names

* Added documentation for Graphite

* added documentation for graphite

* fixed style

* replace / with _ in interface names for graphite

* sets default graphite port

* adds rrd-name tags to the metric, otherwise metrics get lost

* add suggested storage schema for graphite

* add whitespace

* Updated to show some output

* bad english
2017-03-22 10:35:44 -05:00
Søren Rosiak
5cf779c60b refactor: Cisco ASA Polling Performance Improvements (#6139) 2017-03-22 00:22:48 -05:00
David Bell
31ae41beed Use HC counters even if one direction is reporting as 0 (#6106)
* Use HC counters even if one direction is reporting as 0

* Change to >=

* Change this to a for loop

Treats each item individually.  I left it as >, because if the HC value is 0, then the normal value is 0. And it no longer affects other values as we treat each one individually.

* Change check again...

* Update test for HC being used

* Last time?

* Typo
2017-03-22 00:20:58 -05:00
Neil Lathwood
58442e0a75 refactor: Further speed improvements to port poller (#6037) 2017-03-07 21:14:24 -06:00
Neil Lathwood
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 Lathwood
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
Richard Mayhew
e4f48e661e Add additional eventlog severity levels (#5879) 2017-02-13 22:32:02 +00:00
Richard Mayhew
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
Neil Lathwood
21898a3c29 Disco / Poller tidy up + Added display of module mem usage (#5778)
* tidyup + added mem usage for poller modules

* tidied up discovery modules

* fix sensors
2017-02-07 22:54:30 -06:00
Neil Lathwood
df3e9af3f9 Use ifDescr for ifName if it is empty #5392 (#5447) 2017-01-19 22:57:10 +00:00
Neil Lathwood
bfe6ce610c remove set numeric from ports (#5442) 2017-01-15 15:46:00 +00:00
Neil Lathwood
d5296319fb refactor: MySQL strict and query fixes (#5338)
* refactor: MySQL strict and query fixes

* moved sql file
2017-01-13 06:47:16 -06:00
Neil Lathwood
f62cff8974 fix: Updated bad_ifXEntry to be case insensitive and added cisco2811 to ios.yaml #5283 (#5285) 2017-01-03 09:29:52 -06:00
Tony Murray
5c156e7e01 fix: Remove usage of -CI, it is not allowed for snmpbulkwalk #5164 2016-12-20 16:58:20 +00:00
Søren Rosiak
e56d26327a refactor: More Cisco ASA Polling Performance Improvements (#5104) 2016-12-12 14:25:20 +00:00