Commit Graph

7331 Commits

Author SHA1 Message Date
wkamlun
cdd1ae0d1e Add version for ironware (#13551)
* Add version for ironware

Add version for ironware

* Update ironware.yaml

* Ironware Version test data

* Delete ironware_ironware.snmprec

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-11-23 17:33:29 +01:00
Tony Murray
4a5836f64e Catch all module errors (#13542)
* Catch all module errors
As of PHP 7.1, we can now catch errors and exceptions by catching throwable.
Also, log the errors in a consistent way with the entire stack trace

* Log event and improve messages

* call from facade because event might not exist on logger
2021-11-23 09:52:52 +01:00
RockyVod
69b49d0eff Add all Aviat WTM4k family devices (#13556)
Added all AVIAT WTM4k family devices to be discovered
2021-11-23 09:41:43 +01:00
Tony Murray
790c4b3402 Configurable device display name (#13528)
* Configurable device display name
You can just set the display name in device settings.

It also accepts simple template format with  the variables: hostname, sysName, sysName_fallback, ip

Default controlled by device_display_default, (set from old force_hostname_to_sysname and force_ip_to_sysname settings

* remove second argument to format_hostname()

* Style fixes

* Update schema

* update phpstan baseline

* Improved settings strings (and add for translation)
2021-11-18 15:46:22 -06:00
Tony Murray
f12d1f98cb Arista EOS, use sysObjectID for detection (to include vEOS) (#13534)
Also, simplify regex
2021-11-18 09:28:47 +01:00
Tony Murray
c79b187d72 Poller rewrite (Try 2) (#13525)
* core WIP

* try to finish up

* trim space too
and a couple of cleanups

* update test data

* put escapes back

* another net-snmp difference

* correct copy paste error

* WIP

* Use new code YAY

* a tiny bit more

* Kind of working

* Handle manual modules correctly

* convert core to modern module

* Only save metrics if modules is not overridden

* correct module exists check

* database error handling

* debug handling

* restore bad changes

* Introduce Actions
 RunAlertRulesAction
 UpdateDeviceGroupsAction

* tweaks to output

* Fix some issues in outside code

* Style fixes

* fixes to module status checks

* typehints!

* Use logger only and DI

* OS module not named correctly

* Work on quiet output a bit more

* generically don't change output when disabling debug if the driver is already stack

* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction

* restore legacy os module shim

* use the new poller code for tests

* PollingDevice event

* Fix some issues and enable/disable error reporting around legacy modules

* typehints

* fully update baseline

* Use Process for version commands so we don't leak debug output.

* don't detect rrdtool version in ci every time

* style fixes

* Warning fixes

* more fixes

* re-update baseline

* remove diff noise

* fix up alerts

* Catch exceptions in device ip lookup

* Revert accidental snmp.inc.php poller target change
(should have been ?: not ??)
2021-11-17 19:23:55 -06:00
Tony Murray
c05a7a57a0 Remove unused buggy arp_discovery code (#13529) 2021-11-17 22:10:54 +01:00
hjcday
6d3382b1c4 RUTX fix sensor limits (#13526)
* fix sensor limits

* test data

* test data fixes

* try fix rut360 json
2021-11-17 15:30:54 +01:00
Tony Murray
f8764ddcb5 Revert "Poller command rewrite (#13414)" (#13524)
This reverts commit 1752d1efd4.
2021-11-16 21:40:29 -06:00
Tony Murray
1752d1efd4 Poller command rewrite (#13414)
* core WIP

* try to finish up

* trim space too
and a couple of cleanups

* update test data

* put escapes back

* another net-snmp difference

* correct copy paste error

* WIP

* Use new code YAY

* a tiny bit more

* Kind of working

* Handle manual modules correctly

* convert core to modern module

* Only save metrics if modules is not overridden

* correct module exists check

* database error handling

* debug handling

* restore bad changes

* Introduce Actions
 RunAlertRulesAction
 UpdateDeviceGroupsAction

* tweaks to output

* Fix some issues in outside code

* Style fixes

* fixes to module status checks

* typehints!

* Use logger only and DI

* OS module not named correctly

* Work on quiet output a bit more

* generically don't change output when disabling debug if the driver is already stack

* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction

* restore legacy os module shim

* use the new poller code for tests

* PollingDevice event

* Fix some issues and enable/disable error reporting around legacy modules

* typehints

* fully update baseline

* Use Process for version commands so we don't leak debug output.

* don't detect rrdtool version in ci every time

* style fixes

* Warning fixes

* more fixes

* re-update baseline

* remove diff noise

* fix up alerts
2021-11-16 16:59:46 -06:00
Tony Murray
b6240254b4 Billing fix a couple divide by zero errors (#13517)
* Billing fix a couple divide by zero errors
In probably an ocean.

* add missing space
2021-11-15 10:31:52 +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
A. Manual Goldstein
4d79ffe3bb PHP8 compatibility for ntp-server polling app (#13513)
It appears that the ntp-server application script uses an undefined constant when initializing its data array. The use of undefined constants previously generated a warning, and since PHP 8.0 generates an error instead.
2021-11-13 17:20:30 +01:00
Tony Murray
0adf37b4e1 OSPF port module (#13498)
* OSPF to module

* Update mock

* lint and style fixes

* enums as strings
2021-11-12 13:49:09 -06:00
Tony Murray
666638eeaa Fix bad snmp context option (#13497)
* Fix bad snmp context option
Just port queries to SnmpQuery and remove bad code to prevent new usages

* Allow unordered

* add stub on Mock
2021-11-12 12:40:37 -06:00
martinberg
20da6eedd9 Add support for Teltonika RUT360 (#13375)
* Init work on rutos-3xx

* Add RUT360 support in rutos-rutx

* Testdata

* Removed old files

* Removed unused pre-caching

* Undo changes to mib

* Modified rutx11 test data

* Changed state_name

* Revert "Changed state_name"

This reverts commit fb61f8df67.

* Changed state_name

* Changed state_name

* Changed state_name and hopefully fixes tests

* Changed rutx11 test data

* Changed state_name back

* Revert

* Fixed state_name to avoid collision

* Updated rut360 test data

* Modified rutx11 test data

* Fixed typo

* Updated test data for rutx11
2021-11-12 10:43:06 -06:00
Jonathan Smith
5b7aff1995 Update apc.inc.php (#13506)
Fixed the OID for the non HighPrec Load, which should be 4.2.3.
2021-11-12 10:37:17 -06:00
RobJE
97340c5fd5 add missing graph definition for pf_matches (pfSense firewall) (#13507)
* add missing graph definition for pf_matches (pfSense firewall)

* update unit_text
2021-11-12 10:35:54 -06:00
Lee Keitel
19217e8dfc Fix maintenance mode button in Firefox (#13500) 2021-11-12 08:22:57 -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
Daniel Romero
ef4654d304 Support for PDUMNV30HVLX with PADM 20 (#13473)
* Test 4 for PowerAlert - TRIPPLITE PDUMNV30HVLX

* Modifying poweralert_3

* Remove test 4

* Delete duplicate sensors
2021-11-11 23:26:07 +01:00
Maikel de Boer
c37a5ad61e Ciena 2 (#13491)
* Added wireless MSE

* new test data + small tweak in the Ciena support

* removed files

* removed files

* bit more tweaking

* test data
2021-11-10 15:23:53 +01:00
Tony Murray
6b9482aa43 Only call htmlentities on port ifAlias,ifName, and ifDescr (#13489)
Allows more accurate display
2021-11-09 22:06:32 +01:00
Peca Nesovanovic
9f2de7d605 Added initial IPv6 Address discovery for TP-LINK Jetstream (#13484)
* Added initial IPv6 Address discovery for TP-LINK Jetstream

* styleci cleanup

* styleci cleanup

* styleci cleanup

* split OS specific code in separate file

* styleci cleanup
2021-11-09 20:40:48 +01:00
PipoCanaja
9eb3950546 [bug] Fix & extend MAC OUI table updates (#13479)
* get the OUIs from Wireshark CSV instead of macaddress.io which is not free anymore

* style

* optimize

* master wireshark repo

* fix Cache::get prefix ordering

* fix double cache get

Co-authored-by: Tony Murray <murraytony@gmail.com>

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-09 07:47:38 -06:00
Denny Friebe
f23c5c0e7b Raspberry Pi: Add SNMP extend to monitor IO pins or sensor modules connected to the GPIO header (#12749)
* Raspberry Pi: Add SNMP extend to monitor IO pins or sensor modules connected to the GPIO header

* Raspberry Pi: Add new test data

* Raspberry Pi: Make styleci happy

* Raspberry Pi: Fix some more style issues

* Raspberry Pi: Use d_echo for array debug

* Raspberry Pi: Prevent processing if the extension is not present

* Raspberry Pi: Make styleci happy

* Raspberry Pi: Update test data

* Raspberry Pi: Remove debugging
2021-11-04 21:38:15 -05:00
Shawn Kwang
2cb21c1bad Removed ogEmdTemperatureTable. So temperature is not cached. (#13471) 2021-11-03 13:39:18 -05:00
Tony Murray
0862496e26 Fix api transport mult-line parsing (#13469)
* API transport fix parsing
parse templates after parsing user options, not before

* API transport tests

* fix style and lint

* remove accidental item

* fix more type issues
2021-11-03 13:37:57 -05:00
Russell Morris
b398a5cf2c PHP8, correct multiplication in packages (#13462)
To address error message / failure,
Unsupported operand types: string * int
2021-11-03 07:25:02 -05:00
Garcia MICHEL
e0443293a0 Add iDrac physical disk state (#13264)
* Add physical disk for iDrac

* Add alert rule for iDrac Physical Disk

* Add test data
2021-11-02 23:26:59 +01:00
Tony Murray
c572e2828b RouterOS now returns the correct runtime (#13461)
as of version 6.47
2021-11-02 12:23:56 +01:00
Julian Lehrhuber
064463915c Fix poller for Bintec Be.IP Plus (#13453)
* Fix OID not increasing

* restore default flags

* Update ports.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-29 23:20:23 -05:00
Tony Murray
5900edbf16 PHP-Flasher for toast messages (#13401)
* PHP-Flasher for toast messages
Allows customized template
removes dependency on unmaintained package using dev stability
no solution for javascript toasts yet

Use DI in places it makes sense

allow html in flashes

Use "template.librenms" as a default notification style

merge toast containers
toastr needs to be second because it will find the containr made by flasher, but the inverse is not true

upgrade php-flasher to add custom options and persistent notifications

Add dark theme

* update composer.lock
2021-10-29 09:13:56 -05:00
Tony Murray
38773598e0 Fix syslog widget priority filtering (#13411)
* Fix widget filtering
syslog stores priority as a string
filter strings, not numbers

* Add enums for SyslogSeverity and CheckStatus
2021-10-29 10:32:36 +02:00
Tony Murray
b979761cef Don't use proxy for localhost (Oxidized and Prometheus) (#13450)
fixes #13382
2021-10-29 10:10:17 +02: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
Julian Lehrhuber
a3ec263f78 Bintec be.IP plus support (#12993)
* Introduce OS flag to support devices that deliver OIDs out of order

* Add MIB for Bintec Be.IP Plus

* Add YAML definitions for Bintec Be.IP Plus

* Add Bintec be.IP plus test files

* Rename bintec mib files

mib-standards.mib was deleted, because it included definitions that also
existed in separate files

* Add test data

* Remove standard mib files from bintec dir

* Add regex to parse Bintec Be.IP Plus OS version

* Update test data for Bintec Be.IP Plus

* Calculate Bintec Be.IP Plus CPU load from inverse of idle time

* Improve Bintec Be.IP Plus discovery and tests

* Use MIB instead of numerical OIDs where possible

* Update tests to comply with updated discovery

* Remove unused MIBs

* Remove json props that let tests fail

* Update Settings.md

* Remove `snmp_out_of_order_oids` definition from bintec-beip-plus

* Add `-Cc` snmp param for prots module

* Add `-Cc` snmp param for arp-table module

* remove snmp_out_of_order_oids

* Remove snmp_out_of_order_oids

* Update snmp.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-28 13:05:43 -05:00
Arjit Chaudhary
f6d5cd525f Improve Poweralert based devices support (#13340)
* Improve Poweralert based devices support

- Add graphs / data for Input Voltage
- Add graphs / data for Total/Output Current

* fix version formatting

* Create poweralert_3.snmprec

* Create poweralert_3.json

* Update poweralert.yaml

* Update poweralert_3.snmprec

* Update poweralert_3.json

* Missed one

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-28 11:08:17 -05:00
cenjui
ba45d5eba5 Add APC PowerChute sysObjectID (#13406)
* Update apc.yaml

Added sysObjectID: .1.3.6.1.4.1.318.1 to apc.yaml definition rules to allow the discovery of UPS' that are connected to Power Chute Business edition hosts.
(Tony Murray you were right & YAML hates me!).

* Create apc_powerchute.snmprec

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-28 10:15:59 -05:00
Dan Baker
3e4209d35f Added support for Extreme SLX-OS switches (#13431) 2021-10-28 08:12:35 -05:00
Nocturr
5f8b41d4ba UniFi/EdgeSwitch OS support for fw 5.x (#13434)
* Fix support for fw 5.x

* Add test data
2021-10-28 01:52:58 +02:00
Nocturr
bba7a9e3a1 Fix Sophos-XG OID for number of active tunnels (#13444)
* Fix for number of active tunnels

* add test data
2021-10-27 22:42:55 +02:00
Nocturr
4912c8c334 Add Sophos-XG OID for monitoring HA, IPSec and license state (#13423)
* Add Sophos-XG OID for monitoring HA and license state

* add generic property

* Update MIB to newest version

* Add Test-data for sfosCentralOrchestrationLicRegStatus

* Add IPSec monitoring

* regenerate test-data
2021-10-27 12:52:07 +02:00
TheGreatDoc
56b78da254 Fix hwg poseidon state sensors (#13438)
* Fix state sensors oids

* Test data
2021-10-27 12:38:11 +02:00
Peca Nesovanovic
08dd8a07db Mikrotik vlans discovery, v2 (#13427)
* Mikrotik vlans discovery, v2

* styleci cleanup

* added Routeros entry in mkdocs.yml

* fixed typo in mkdocs.yml

* Better Vlan Eloquent Model

* Missed one

* Use new SnmpQuery code

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-26 18:31:44 -05:00
Russell Morris
9abacb594d PHP8 Unit Conversion, ups-nut (#13432) 2021-10-26 23:12:22 +02:00
Tony Murray
b0e0d65c86 Fixes for misc unset variables in polling (#13421)
Remove $attribs global
2021-10-25 21:35:18 +02:00
Dan Baker
d23e75f967 Added sensor discovery for APC NetworkAIR FM and InfraStruXure ATS (#13426) 2021-10-25 21:29:50 +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
Tony Murray
47cb5736dd Fix application and storage query errors (#13417)
* Fix query errors

* Fixed test data
(one has crlf instead of lf)

* oops
2021-10-23 18:26:41 +02:00