Commit Graph

222 Commits

Author SHA1 Message Date
Janno Schouwenburg
7b3a6250f0 Bats support (#14108)
* BATS support

* Removed disabled discovery modules

* Style change, more test data, removed unused rows

* Style correction LibreNMS/OS/Bats.php

* Removed old reference

* Another style correction add LibreNMS/OS/Bats.php

* Changed location info and temperature

* Style, again

* Style, again

* New testdata needed

* Fix wrong state color in discovery/bats.yaml

* New test data

* Update bats_bats.json

* Saved the test data in a different way

* More test data

* Manually changed test data

* New test data

* New test data

* Update bats_bats.json

* Saved the test data in a different way

* More test data

* Manually changed test data

* New test data

* New test data

* Delete bats_bats.snmprec

* Update bats.json

* Update bats.json

Co-authored-by: Maikel de Boer <mdb@tampnet.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-10 09:07:31 -05:00
Peca Nesovanovic
e8bcbfd944 Mikrotik wifi station mode sensors (#14193)
* add WlStat wifi sensors

* test data
2022-08-10 14:12:17 +02:00
Mar974
066e4c4e15 Missing "s" in NsBsd.php (#14067)
Missing "s" in MIB "snsSystemName" see : https://www.stormshield.com/wp-content/uploads/STORMSHIELD-PROPERTY-MIB-1.txt
2022-07-15 22:13:29 -05:00
Tony Murray
9f749ae778 Update Larastan (#14031)
* Update Larastan

* fix as many as I can

* update baseline for the remaining

* fix style

* Update Log::event phpdoc
2022-06-13 08:57:21 +02:00
Tony Murray
b8f2002150 Procurve hardware description cleanup (#14007)
* Procurve hardware description cleanup
Include part number and other details where available
Covers 100% of known sysDescr
Adds Aruba Instant On parsing
adds string replacements for OS fields

Could use hardware: ENTITY-MIB::entPhysicalDescr.1, but strings contain a lot of fluff and some are just "HP", I leave that for another PR

* restore .gitignore.........

* less specific

* Change regex cosmetically
2022-06-07 09:27:32 +02:00
Kevin Wallace
1b1859051f Add additional OpenBSD PF graphs (#13963)
* Add additional OpenBSD PF graphs

Some of these were already present for PFSense (matches, badoffset,
fragmented, short, normalized, memdropped) and reuse existing graph
types; the others are are added as new types.

* collect-snmp-data.php: support IPv6 hosts

* Add SNMP data for new OpenBSD OIDs

* Stack all OpenBSD PF drops into a single graph/rrdfile

* Pull additional drops in to pf_drops

The MIB descriptions don't say "drop", but reading the OpenBSD source:

c471a73b65/sys/net/pfvar.h (L1196)

it's clear that badoff, frag, short, and norm are all drop reasons.
Pull them in into the stacked drop graph, too.

* ./scripts/save-test-data.php -o openbsd -v pf

* Include device_graphs in saved os module test data

* Revert "Include device_graphs in saved os module test data"

This reverts commit a85c902fe9.

* Update to use SnmpQuery

Co-authored-by: Kevin Wallace <kevinwallace@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-06 23:49:42 -05:00
Tony Murray
6410775bd5 Fix STP polling bug (#13924)
Column 'topChanges' cannot be null (SQL: update `stp` set `topChanges` ...
2022-04-15 19:33:49 -05:00
William Irvine
5672d10a79 Add ISIS discovery and polling for iosxe devices (#13880)
* Add ISIS discovery and polling for iosxe devices

* remove ModuleModelObserver

* add php stan exclusions as they are already present for the base module

* change port_id to cached lookup

* Create model object instead of using arrays and set properties directly

* remove unneeded space...

* remove null from non nullable field

* revert to extending from ciscowlc rather than os

* remove OS module

* remove phpstan exclusions and fix errors

* add spacing...

* add spacing....

* add spacing

* again...

* Add tests

* Update Iosxe.php

* Update IsisAdjacency.php

* Create 2022_04_08_085504_isis_adjacencies_table_add_index.php

* Update db_schema.yaml

* Update iosxe_asr920.json

* Update Iosxe.php

* Update Iosxe.php

* Update junos_mx5t_isis.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-04-08 16:33:41 -05:00
Mark Jeffery
ac11177beb Fix for PFSense state table removals field (#13863) 2022-03-31 15:50:14 +02:00
Tony Murray
b9f3646a2e STP fix, only try contexts on Cisco (#13767)
* STP fix, only try contexts on Cisco
Only Cisco is known to support this type of polling

* merge, not push.

* Fix collection construction

* Fixed the function signature in Interface def

* fixed signature here as well

* Lighter code to return a collection of Stp instances

* Type enforced in signatures

* missing implement for Cisco Class

* style

* Collection methods are immutable indeed 😠

* nullable vlan

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-02-11 08:37:19 -06:00
Peca Nesovanovic
ee00f59ce6 [terra] support for sdi410c / sdi480 (#13759)
* [terra] support for sdi410c / sdi480

* remove debug
2022-02-08 23:27:40 +01:00
Tony Murray
29bd6789cb Stp module rewrite (#13570)
* STP module rewrite WIP

* Finish rewrite

* Ignore disabled and log root/topology changes

* Remove interfaces for now

* fix style

* Lint fixes

* Document ResolvesPortIds and hide map functions

* whitespace fixes

* Revert to stpInstances in case someone writes mstp support

* missed one

* phpstan fixes

* Handle table and oids separately

* forgot to register observer

* Test data and correct non-table handling in SnmpResponse->table()

* update test

* test data

* revert aos7 silly things

* minimal polling

* Update test data

* order ports_ntp and rename new field to port_index

* forgot the db_schema

* revert ciena-sds port things

* MSTP support, maybe

* Adding test data

* Filter bad lines instead of discarding the entire snmp response
and capture fixes and test data

* fresh data

* add os data

* update data, ignore unfound ports, obviously bad device implementation.

* fixes

* Ignore context files in os detection test

* Remove empty table data

* add ciena-sds vlan

* designatedCost column is too small

* Update stp webui

* Refactor code to interfaces, to allow vendor mibs

* update schema

* fix issues added by abstraction

* STP fixes

* Default to no context for vlan 1

* never store vlan 1

* Update test data

* remove eltex brokenness

* fix style

* fix stan

* Fix Rewrite MAC to Hex padding with floats

* fix sqlite migration
2022-01-30 16:28:18 -06:00
Wheel
2dbfdda717 Ubiquiti Airfiber60 (#13680)
* Add ubiquiti Airfiber 60

* New AF60 data and MIB

* Stylci fix and small additions

* Update test data

* Stylefix

* Remove the weird ubiquity oids containing encoded mac addresses

* Updated test data

* Remove more complex sensors for now to be added after the conflict airos airos-af60 is solved

* Fix hardware and OS

* To be verified is this is the most practical / clean way of doing it

* Advanced wireless and MCS state sensor

* Fix link capacity multiplier and active link

* Test data update fix lint

* Maybe better
2022-01-29 21:10:45 -06:00
Neil Lathwood
113cd1d98e Check for empty SLA tags so we skip bad entries (#13679)
* Check for empty SLA tags so we skip bad entries

* getSlaTag always return string

* accidentally left line

* Update phpstan-baseline.neon

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-01-26 08:32:29 -06:00
bonzo81
107736697c Add Sla jitter packet loss percent graph (#13600)
* Add sla packet loss percent rrd graph

* Add packet loss percent div

* Add OID for NumPackets

* Fixed CDEF typo

* Rename graph file to include .inc

* Flipped axis for Src and Dst to match key

* Create new rrd file for loss percent

* Remove duplicate rrd data and rename rrd to reflect

* Amend to use second rrd file for NumPackets

* Removed spaces

* dbFetchRow be gone

* insert if statement check

* white space cleanup

* New line at end of file

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-01-09 18:57:16 -06:00
Maikel de Boer
fa3367f5c6 Timos sap dot1q graphing fix (#13654)
* Added wireless MSE

* dot1q sap graph fix

* Fix removed files

* fix

* Fixed style

* Fixed style

* Fixed style

* Removed vscode workspace file

* Clarification
2022-01-09 10:33:32 +01:00
johnstruse
b84e471587 Fix EdgeOS hardware detection (#13629)
* Fix EdgeOS hardware detection

* Add EdgeRouter Lite test data
2021-12-20 09:19:07 +01:00
johnstruse
bb9abd67d6 Add additional ICX 7150 devices (#13627)
* Update Brocade root MIB

* Add additional ICX 7150 devices
2021-12-19 16:58:02 +01:00
Tony Murray
a0de9083b5 Fix Cisco WLC AP cleanup (#13615)
* Fix Cisco WLC AP cleanup

* missing space
2021-12-12 22:33:54 -06:00
TheGreatDoc
82d008ca95 Added support for Himoinsa gensets status state sensors (#13456)
* Fix missing mib_dir in definition

* Added state sensors

* snmprec data

* json data

* delete unused snmprec

* License and Author

* remove unused json data

* Fix style issues

* Fix more style issues coz im blind

* Fix more style issues coz im blind last

* Refactored

* Why do we loop?

* Fix style issues

* Update polling

* Refactor to use methods

* Fix a pair of style issues

* Updated test files

* Convert to yaml

* Wrong description on Mode

* Added another state + fixed some indexes

* Dunno what happened

* Fix for phpstan level 6

* Fix forstyleci

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-26 01:18:49 -06:00
Martin22
382ef6219b Fix discovery and pooling Racom Ray2 (#13553)
* Fix discovery and pooling

* Added test data

* Removed author

* Fix

* Discovery transcribed into json

* Fix

* Fix2

* Fix3
2021-11-24 18:18:12 +01:00
Tony Murray
e32685b54e Workaround don't poll WLC on IOSXE (#13563) 2021-11-24 18:13:27 +01:00
ottorei
214f92359c Fix Cisco APs polling (#13560) 2021-11-24 10:40:32 +01:00
wkamlun
d7d880b72d Add ICX 7150 description (#13550)
Add ICX 7150 description
2021-11-22 09:27:29 +01:00
Tony Murray
7e98e03338 Polling cleanup, fix PHP warnings (#13460)
* Fix warnings up to Arbos

* fixes a-c

* a-r

* a-vrp

* There and back again

* Update test data, couple fixes

* PHPSStan fixes

* style fixes, and fix Asyncos, whoops

* flip serial back.......

* less bogus data

* Poweralert sysName during polling too

* make sure things are calculated in the correct order

* fix style and bad nullables

* update test data

* A comple more conversions

* cambium ptp, misc, and hardware_mib

* remaining except vmware-esxi

* Fixes

* Update baseline

* fixes and fix up baseline

* adjust SnmpQueryMock to upstream options change

* data corrections

* restore slashes

* correctly handle all options input in SnmpQueryMock

* undo ftos changes

* restore vccodec sysDescr
2021-11-14 14:58:13 -06:00
Maikel de Boer
f1e768a4ae Nokia SAR HMC (#13503)
* Added wireless MSE

* Add SAR HMC support

* add test data

* cleanup

* fixed style
2021-11-12 07:18:56 -06:00
Russell Morris
eb01d7a5c3 Update Windows version information (#13474)
Based on,
https://docs.microsoft.com/en-us/windows-insider/flight-hub
2021-11-04 01:01:43 +01:00
Jamie Baker
aa5205b95e airos: fix latitude having an extra - in the middle after the decimal point (#13454)
* fix latitude having an extra - in the middle after the decimal point

fix latitude having an extra - in the middle after the decimal point

* consolidate

* style

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-01 23:18:21 -05:00
Tony Murray
2c77edf4d2 Better handling of some alerting errors (#13446)
* Better handling of some alerting errors

* Better error output

* Consolidate simple template parsing

* Fixes reported by phpstan (one was a bug, yay!)

* add back forgotten trim

* don't remove the template if there is no match

* Match previous behavior, which was inconsistent.

* use anonymous class for tests instead

* Oopsie, Stringable is PHP8+

* fix style
2021-10-29 22:12:20 -05:00
David Girón
9f8bb8caae Add more discovery components for Dell PowerConnect 28xx (#13420)
* Add Processor discovery for Dell PowerConnect 28xx

* Add Temperature discovery and cleanup code

* Add test data for PowerConnect 2824

* Add Serial Number

* Don't add VLANs as Ports

* Revert "Don't add VLANs as Ports"

* Remove invalid mempool from tests
2021-10-29 10:09:05 +02:00
hjcday
5536c8bdcb Added Wireless Sensors for Teltonika RUTX Routers (#13419)
* Correctly implement Wireless Sensors for Teltonila RUTX series routers allowing for hardware with multiple modems
Fix sensor warning limits based on hardware specs.

* Re-capture test data for new sensors

* Tidy style

* no message

* no message

* Update RutosRutx.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-10-24 14:12:22 +02:00
Stuart Henderson
48a12be4be Don't hardcode index for Mikrotik LTE wireless statistics (#12976)
* don't hardcode index for Mikrotik LTE wireless statistics

* sync test data now that Mikrotik LTE index is no longer hardcoded

* sync tests data now that Mikrotik LTE index is no longer hardcoded

* fix whitespace

* sync test data now that Mikrotik LTE index is no longer hardcoded

* add test data for Mikrotik LtAP mini (aka RB912R-2nD)

* Re-write Routeros wireless code
It now works like most other devices

* fix style

* update baseline

* Remove station 60G rate

* use base unit of m, not km

* move interface stats name inside loop to avoid a walk when it does exist

* notification

* fix typo

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 20:50:59 -05:00
Tony Murray
fdfea6e93b Rewrite netstats polling (#13368)
* Rewrite netstats polling
As modern module
Don't use snmpgetnext as it can result in extra data returned

* remove copyrights on interfaces

* typehints

* fix silly backslashes
2021-10-19 19:32:28 -05:00
Hans Erasmus
51e6701c4a Extend support for Endrun Sonoma Meridian II devices. (#13069)
* endrun_updated_support

* Added requested changes

* Converted to yaml

* Fixed Tempus Features

* fixed test data (again)

* Update endrun_sonoma.json

* fix gitignore

* fix last gitignore

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-18 20:42:28 -05:00
Maikel de Boer
f28802bb2b Ericsson TN - Wireless MSE (#13328)
* Initial commit

* Removed unused function

* fixed style

* fixed style

* fixed test data

* Initial commit

* end of the day commit

* finish + test data

* Delete ericsson-tn_ericsson-tn.snmprec

* Added wireless MSE

* Delete ciena-saos.yaml

* Delete NORTEL-MIB

* Delete ciena-saos.yaml

* Delete NORTEL-OPTICAL-GENERIC-MIB

* Delete ciena-saos_saos.snmprec

* Delete ciena-saos_saos.json

* Delete NORTEL-OPTICAL-PM-MIB

* fixed style

* fixe
2021-10-06 23:37:10 +02:00
Maikel de Boer
b3c1d036b4 Ericsson Traffic Node support (#13299)
* Initial commit

* Removed unused function

* fixed style

* fixed style

* fixed test data

* Delete ericsson-tn_ericsson-tn.snmprec

* Update ericsson-tn.yaml
2021-09-30 08:29:31 -05:00
Cupid@zul
9eecca51c7 Teldat: Wireless and GSM Basic Monitoring (#13255)
* Teldat: Wireless and GSM Basic Monitoring

* Teldat: Wireless IfIndex fix

* Teldat: Wireless and GSM tests

* minor comment correction

* Teldat: Wireless and GSM add json test data

* linter.warn: bugfix access_point_id = null, generally used for controllers, TELDATs are never controllers

* Teldat: Wireless and GSM tests replay results.

* linter.warn: fix #17 $entPhysicalMeasured expects float|int|null set to: null

* Teldat: Wireless and GSM some updates, bugfixes and lint updates as requested.

* linter : some more fixes...

* Teldat: Wireless and GSM, apply recommendations.

* minor styleCI fix.

* linter: fix

* linter: fix.

* Delete WirelessLteCellPolling.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-09-23 11:55:14 -05:00
Tony Murray
8a883140cb Infer character encoding for ifAlias and sysLocation (#13248)
* Infer character encoding for ifAlias and sysLocation
Tries to convert character encoding for non-UTF-8 encoded strings.
This will only work for snmp strings that are type-hinted, not ones forced to ASCII with -Oa or similar
Only works for your default charset or Windows-1251 or LATIN1.
You can set your character encoding in .env with CHARSET

Please save us all and just use UTF-8

* style fixes

* less Yoda

* ensure return type

* fall back to passed string

* don't convert strings with any unprintable characters (such as line return)

* Update LibreNMS/Util/StringHelpers.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Fix CP850

* fix space

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-09-21 08:47:44 -05:00
Noah Roufus
eff9c134cd Added SAF Integra-X OS Support (#13236)
* Added SAF Integra-X support.

* Fixed discovery confusion between Integra-B and Integra-X.

* Removed a missed unusued use statement.

* Fixed CPU sensor issues related to MIB display hints throwing off math.

* Fix to Integra-X snmprec and test data.
2021-09-17 09:13:10 -05:00
Tony Murray
117036bf29 Fix Dell server sensors (#13247)
missing mib directory
2021-09-16 21:05:31 +02:00
Jellyfrog
258505ed44 Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Jellyfrog
26b95c0ccc Apply fixes from StyleCI (#13208) 2021-09-08 23:35:56 +02:00
Noah Roufus
ebb582f0f2 Updated OS Support: Dragonwave Horizon (#13193)
* Removed older Horizon definitions

* Added Horizon Compact definitions via YAML.

* Added Horizon Duo definitions via YAML.

* Added Horizon Compact Plus definitions via YAML.

* Fixed issue with OID name casing for Horizon Duo EnetPort2CRC sensor

* Moved SNR/RSL/Tx Power to wireless sensor definitions.

* Reordered use statements to make StyleCI happy.
2021-09-08 08:40:23 -05:00
tcwarn
dedae6a0d4 Added OID for Extreme switch X350-48t to OS/Shared/Extreme.php (#13096) 2021-08-03 22:36:02 +02:00
Tony Murray
ae2b761e94 Fix Cisco SLAs garbage entries (#13068)
* Fix Cisco SLAs garbage entries
Resulting from extra data returned by device not in the exisitng MIB... Updated the MIB too.
Thanks https://community.librenms.org/t/cisco-ip-sla-issues/16429

* Add test data
2021-07-25 11:23:04 +02:00
wkamlun
dcb9f3c1d5 Update #13037 to add wireless sensor for FortiAP (#13063)
* Update #13037 to add wireless sensor for FortiAP

Update #13037 to add wireless sensor for FortiAP

* Add files via upload

* Update Fortigate.php

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2021-07-23 19:45:46 +02:00
wkamlun
1d55265690 Update with FortiAP (#13037)
* Update with FortiAP

Add number of connected wireless client and number of connected FortiAP

* Add fortiAP support

* Update Fortigate.php

* tests

* style

* Update fortigate_500d.json

Test cannot run properly because of dependency between interfaces and OSPF ports.

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2021-07-21 20:26:29 +02:00
Maikel de Boer
e8b11635a6 Ericsson 6600 series (#12931)
* start

* added test data + mibs

* fxied minor

* Update CIENA-6500-AMPS-MIB

* Update CIENA-6500-ENUMS-MIB

* removed unused mibs

* added test data

* Delete ciena-saos_saos.snmprec

* Rename ciena_saos.json to ciena-saos.json

* Rename ciena_saos.snmprec to ciena-saos.snmprec

* Rename ciena-saos.snmprec to ciena-saos_ 6500.snmprec

* Delete ciena-saos.json

* Delete ciena-saos_ 6500.snmprec

* new attempt for the test data

* test data again

* small start

* Start

* added values

* added counters

* small style

* add test data

* Delete ciena-saos.yaml

* Delete ericsson-ml.yaml

* Delete ciena-saos_6500.json

* Delete ciena-saos_saos.json

* Delete ciena-saos_saos.snmprec

* Delete ericsson-6600_6600.json

* Update Ericsson6600.php

* added test data

* re-adding removed files

* Update Ericsson6600.php

* Update ericsson-6600.yaml

* Update XF-RADIOLINK-PTP-TERMINAL-MIB

* Update XF-TOP-MIB

* Restored renamed file

* Update ericsson-6600.yaml

* optized wireless discovery

* Update Ericsson6600.php

* Update Ericsson6600.php

* Update Ericsson6600.php

* Update Ericsson6600.php

* Update Ericsson6600.php

* feedback

* Update Ericsson6600.php

* Update Ericsson6600.php

* fixed discovery problem for future 6300 series

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2021-07-21 08:07:56 -05:00
Tony Murray
ca621fb98d Fix possible null error in SLA modules (#13046) 2021-07-15 22:11:17 -05:00
rhinoau
2e9377dfd6 Add OS Support for Siemens Scalance X Switching (#12938)
* Initial Siemens Scalance X switch support

* updated mempool definitions to pass unit tests

* sysDescr parsing changes and MIB rename

* further sysDescr parsing cleanup

* test data updated after sysDescr parsing changes

* discovery yaml formatting

* processor and mempool discovery yaml redone in PHP to overcome snmptable issues

* StyleCI fixes to PHP

* StyleCI fixes to PHP

* StyleCI fixes to PHP

* incorrect file location after StyleCI fixes

* removed redundant processor discovery code
2021-07-14 22:29:52 +02:00