Commit Graph

7308 Commits

Author SHA1 Message Date
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
TheGracens
e4d26c0c09 Update apc.inc.php (#13405)
Fixes the wrong temperature multiplier in APC devices . In case high precision is not available and using older APC firmware
2021-10-21 17:08:50 -05:00
eskyuu
598366776d Added ignore for HR SNMP uptime on Luminato devices because they are causing issues (#13399) 2021-10-21 09:45:47 +02:00
Chris
bc8efedc83 Show single quotes correcting for device configs (#13360)
* Added ENT_HTML5 decoding for device configs
Previously single quote/apostrophes weren't being decoded correctly from &apos;, leading to configs being misrepresented in LibreNMS. ENT_HTML5 allows for proper decoding.

* Change to less risky flag

* Update showconfig.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 23:20:57 -05:00
Dag Bakke
46c26e3027 Eaton Network MS xups sensors (#12992)
* Added ambient temp sensor and XUPS alarm OIDs

* I dumbed this down a bit, as I do not fully trust that I actually understand the xups mib.
Now we raise an alert if XUPS-MIB::xupsAlarms.0 is anywhere in the range 1-4

* Changed the index:-value for consistency

* added snmprec and json for my hardware/firwmare version

* reran save-test-data against all variants and renamed my latest snmprec properly

* Update eaton-mgeups_9pxle.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 21:15:42 -05:00
Matt Peterson
3d4ad683ad OS support for West Mountain 4005i DC PDU (#12885)
* remove ^M from DOS style file

* Support for West Mountain 4005i DC PDU

* update SVG to include width attributes

* try adding reserveAspectRatio="xMinYMin meet"

* remove width attribute

* removed disabled modules per @Jellyfrog comment

* rename per PR

* add missing test JSON data

* don't attempt to graph or detect uptime, as neither OID is supported

* remove file extension

* remove specific modules for discovery & polling, as this device isnt buggy enough for justify

* Update westmountainradio.yaml

* Update westmountainradio.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 20:48:51 -05:00
Thomas Ford
0b5e826363 Run Alert Rules on Service status change. (#13348)
* Run Alert Rules on Service status change.

Added Alert Rules to the poll_service function to trigger alerts outside of polling interval.

* Update services.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 20:44:39 -05:00
Roy Cruse
aa6d685c9e Update ports.inc.php (#13393)
ifType of draytek router reporting as vdsl2 since firmware upgrade to v3.9.6.2
2021-10-20 18:54:56 -05:00
Erik
27c124f19f FabOS remove disabled dbm sensors (#12877)
* add check if adminstatus is up

* added testdata

* Changed ifAdminStatus state detection

* updated testdata

* updated testdata2

* Update fabos_6520.json

* Update fabos.json

* Update fabos_6520.json

* Update fabos.json

* fix fabos.json

* fix bug in discovery include

Co-authored-by: Erik <johndoe@example.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 18:51:49 -05:00
Tony Murray
6bf706eaa0 Fix uptime polling (#13388)
was comparing the wrong values sysUpTime (ms) vs calculated uptime (s)
move uptime code into a method to improve readability
2021-10-20 10:22:29 +03: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
Tony Murray
f94f7f23b8 Fully convert core to a modern module (#13347)
* Core module WIP

* update OS::make()

* core WIP

* try to finish up

* switch all core do os Model

* Mock WIP

* Working tests

* cleanup

* phpstan fixes

* style fixes

* fix agent

* trim space too
and a couple of cleanups

* corrected ios test data

* missed space

* update test data

* put escapes back

* another net-snmp difference

* Fix class description

* revert snmp.inc.php change, that can be a different PR

* revert snmp.inc.php change, that can be a different PR
2021-10-19 15:43:43 -05:00
Tony Murray
17b97abbd2 Keep stats for snmptranslate (#13379) 2021-10-19 22:40:47 +02:00
Kate Robinson
568d12cbd8 Modified SQL delete statement for vrf is null (#13199)
* Modified SQL delete for is NULL instead of = null

* Fixed spacing

* Fixed more spacing issues

* Replaced double quotes with single quotes for echo statement

* Fixed more spacing issues

* Modified null vrf db check to match vrp.inc.php

* Clean up comments

* Modified git username to fix CLA

* Revert bgp-peers.inc.php

Co-authored-by: Kate Robinson <katerobinson@KateRobinson-imac.local>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-19 06:54:34 -05:00
Shawn Kwang
0537f1d736 Add opengear humidity to sensors (#13226)
* Add new OID for humidity sensor for opengear devices.

* Typo fix

* Fixed typo: wrong OID

* Added opengear humidity test data JSON

* Removed ogEmdHumidityTable from cache.

* Added SNMP sim data for testing

* Update opengear_humidity.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-19 06:54:01 -05:00
Kevin Zink
98ed6bb9dc New plugin system based on Laravel Package Development (#12998)
* use Blade view and Eloquent models for plugins

* move views

* fix style

* fix style

* revert mistake

* Update Plugin.php

delete test property "name"

* rename plugin function to settings

* last but not least - rename in Test.php

* Rename Test to Example

* fix typo

* fix style

* fix style

* fix style

* fix style - I hate tabs...

* Extract view calls

* fix method calls and style

* Move Models the the abstract class

* fix style

* Convert to traits

* Change the Example description

* Fix style

* Fix style

* Fix style

* Convert plugin function to Model static methods and delete .inc.php

* fix style

* fix style

* Use scope

* final methods blows up legacy code

* Config > \LibreNMS\Config

* convert the static string to a static method

* Correct placement in the page

* fix tabs

* fix style

* Rename from tait to hook

to make it easier to understand and be complient

* rename file

* Typo

* Started to change the docu

* change to a more usefully Device_Overview example

* and activate of course

* PluginManager

* fix .gitignore

* only php files in the root folder

* corrected .gitignore with all files :)

* Rename the Hooks and ExampleClass for better readability

* Fix style

* Fix style

* Exception handling (especially if DB is not present)

* Fix style and update schema

* fix indentation

* actually correct indent

* fix migration collation check include utf8mb4_bin

* stop phpstan whining

* A view lines documentation

* add typeHints

* Allow return null on handle

* lint

* fix return types

* fix logic of column collation check

* Fix MenuEntryHook

* switch to longtext instead of json type for now :D

* try phpstan on PHP 7.3

* set phpstan target version to 7.3

* all the typehints

* optional

* more

* Use namespace to prevent view collisions
disambiguate plugin and hook
no magic guessing of names in PluginManager, bad assumptions
remove unused plugins from the DB

* cleanup plugin menu

* cleanup on shutdown and ignore but log query error on cleanup

* instanceof must be called against an instance

* Allow multiple hooks per plugin

* Port plugin ui code to Laravel

* page instead of settings for v1 plugins

* actually working settings pages
a little url cleanup plugin/admin -> plugin/settings

* fix style

* Add page hook

* PHPstan

* Try to fix Illuminate\Http\RedirectResponse

* typehint

* Rewrite the doc

* Fix style

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-19 06:53:28 -05:00
ottorei
d3726e6bdc Update alertlog-widget to allow filtering by device group (#13380)
* Add group filter to alertlog widget

* Remove extra characters from settings

* Apply fixes from StyleCI

Co-authored-by: ottorei <ottorei@users.noreply.github.com>
2021-10-19 06:18:29 +03:00
Nathan Manzi
fb7d89c4c3 Add get_ports_by_group API function (#13361)
* implement api route get_ports_by_group

* Update API docs for new get_ports_by_group

* Fix misspelling of function names and routes
2021-10-18 20:47:37 -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
TheGreatDoc
fdea39fc0f Update Himoinsa Genset discovery (#13356)
* Update Himoinsa Genset discovery

* Added snmprec

* Added json test data
2021-10-18 19:42:40 -05:00
martinberg
3856c33f9d IOS/IOSXE PoE stats (#13213)
* Updated mib

* Add support for IOS/IOSXE PoE stats

* Added testdata

* Better titles for Power-tab in Health

* Added low_limit for iosxe

* Update ios_2960x.json

* Added high_limit for ios

* update ios_2960x

* update ios_2900l

* pre-cache is not needed

will only slow polling down in some cases

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-18 19:42:13 -05:00
Cirno the Strongest
ece914a06d Use high precision OIDs for APC UPS sensors (#12594)
* Use high precision OIDs for APC UPS sensors

* Force test re-run

* Remove ifHighSpeed

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-18 19:41:37 -05:00
Simon Smith
81819c2aca fix windows fanspeed (#13376) 2021-10-18 23:38:57 +02:00
martinberg
d69810b3c3 Add support for NTI Enviromux (#13373)
* Updated mib

* Add support for IOS/IOSXE PoE stats

* Added testdata

* Better titles for Power-tab in Health

* Added low_limit for iosxe

* Basic support for Enviromux devices

* Fixes

* Revert "Added low_limit for iosxe"

This reverts commit 645e3b423a.

* Removed commits from wrong branch

* Removed limits due to not working, need php

* Added testdata

* Update nti.svg

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-10-18 10:35:30 +02:00