Commit Graph

18853 Commits

Author SHA1 Message Date
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
Tony Murray
6e5ec4a0b8 Dispatcher: services and ping not polling default groups (#13403) 2021-10-21 10:12:36 -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
nq5
5854244f5a Syslog hook examples and documentation for Procurve devices (#13397)
* Add support for Procurve devices

Syslog hook support added for automatic Oxidized backups of devices running Procurve

* Add documentation for HPE/Aruba Procurve devices

Update documentation to support configuration of example Syslog hooks for HPE and Aruba devices running Procurve
2021-10-21 09:45:16 +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 ', 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
Tony Murray
4663bf0494 barryvdh/laravel-debugbar (v3.6.2 => v3.6.3) (#13396)
doctrine/dbal (2.13.3 => 2.13.4)
facade/ignition (2.14.0 => 2.15.0)
filp/whoops (2.14.3 => 2.14.4)
graham-campbell/result-type (v1.0.2 => v1.0.3)
guzzlehttp/guzzle (7.3.0 => 7.4.0)
guzzlehttp/promises (1.4.1 => 1.5.0)
guzzlehttp/psr7 (2.0.0 => 2.1.0)
laravel/dusk (v6.18.1 => v6.19.2)
laravel/framework (v8.62.0 => v8.65.0)
laravel/serializable-closure (v1.0.2 => v1.0.3)
maximebf/debugbar (v1.17.1 => v1.17.2)
nunomaduro/larastan (v0.7.12 => v0.7.13)
php-webdriver/webdriver (1.11.1 => 1.12.0)
phpdocumentor/reflection-docblock (5.2.2 => 5.3.0)
phpdocumentor/type-resolver (1.5.0 => 1.5.1)
predis/predis (v1.1.8 => v1.1.9)
psy/psysh (v0.10.8 => v0.10.9)
ramsey/collection (1.2.1 => 1.2.2)
swiftmailer/swiftmailer (v6.2.7 => v6.3.0)
vlucas/phpdotenv (v5.3.0 => v5.3.1)
2021-10-20 21:24:44 -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
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
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
Mike Beattie
8d5d0b12c3 Increase length of devices_attribs.attrib_type column (#13395)
* Increase length of devices_attribs.attrib_type column

closes #13381

Signed-off-by: Mike Beattie <mike@ethernal.org>

* Update db_schema.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-20 19:50:15 -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
fb934e2ede Disable ExamplePlugin (#13391) 2021-10-20 08:02:01 -05:00
Tony Murray
4c572427b2 Allow legacy plugins to use any method (#13392) 2021-10-20 08:00:09 -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
PipoCanaja
c8b394f317 bug - Fix missing uptime in fillable (Device Model) (#13387)
Seems that uptime is not fillable, but it used in the new rewrite of Core Module. This fixes it. A few devices in my master instance failed with uptime
2021-10-19 19:08:10 -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
Jellyfrog
5edbd29f69 Fix regression from #12998 (#13385) 2021-10-19 17:20:32 +02:00
Ahmed Sajid
1f1c11ee32 Added Unpolled Devices rule to collection (#12896)
* Added Unpolled Devices rule to collection

* fixing the incorrect syntax

* Using different approach for determining if devices aren't polled

* Update alert_rules.json

* Update alert_rules.json

* Update alert_rules.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-19 09:43:24 -05: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
Tony Murray
2d5d7e14ed Don't suggest running validate.php as root (#13378) 2021-10-19 00:57:19 -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
Tony Murray
6b8b9fdb31 Fix Dispatcher service not discovering poller groups (#13377)
The discovery workers were not monitoring non-default poller group queues
2021-10-18 17:30:30 -05:00
Simon Smith
81819c2aca fix windows fanspeed (#13376) 2021-10-18 23:38:57 +02:00
Jellyfrog
81a7cdfcb2 Update label-actions.yml 2021-10-18 15:44:34 +02:00
Jellyfrog
b0d49debe7 Update label-actions.yml 2021-10-18 15:30:08 +02:00
Jellyfrog
90936c569e Use the new Label Actions (#13374) 2021-10-18 15:13:28 +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
Tony Murray
66d0a34f40 Dusk: improve speed and safety (#13370)
* Dusk: improve speed
Instead of refreshing the database between tests, just cleanup all side effects.
Update UserFactory to upstream so hash never has to be generated for default

* Actually, migrate, but not fresh
2021-10-18 10:01:07 +02:00
Tony Murray
4685ea13cc Port Speed degraded alert rule (#13371)
* Port Speed degraded alert rule

* don't include disabled ports either
2021-10-18 09:59:33 +02:00
Tony Murray
3ef21e740c Remove unused snom files (#13369)
No snom os exists anymore.
According to very old files, sysDescr should contain the string "snom".
I checked on stats and no one reports an snom phone added to LibreNMS.
I can't add the os detection, so just remove these.
Netstats PR will remove other snom references
2021-10-17 17:08:47 +02:00
Dan Kerse
60f056c691 Poll SPU memory from Juniper SRX devices (#13191)
* Poll SPU memory from Juniper SRX devices

* Add test data

* Update junos_rpm.json

* Update junos_rpm.json

* Update junos.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-16 20:44:18 -05:00
Tony Murray
98ee237420 Bump version to 21.10.0 21.10.0 2021-10-16 08:02:35 -05:00
Tony Murray
a9a1c6f2b7 Changelog for 21.10.0 2021-10-16 08:02:33 -05:00
Tony Murray
351674a305 Change "move" to "migrate" to make it easier to find (#13365)
I think most people consider moving an install to a new server as migrating.  Update the text to make it easier to search for.
2021-10-16 01:59:27 +02:00
Tony Murray
eb653619a3 Dispatcher bugfix queues not being disabled properly (#13364)
* Dispatcher bugfix queues not being disabled properly
Introduced in #13355
Affected queues: Alerting, Discovery, Services, Ping

Adjust log level of several messages

* better formatting? looks like garbage python black
2021-10-14 23:39:08 -05:00
Tony Murray
da57ea65f6 Dispatcher: Don't update poller groups when updating stats (#13363)
* Dispatcher: Don't update workers/frequency when updating stats

* Fix the right thing

* Don't set poller groups on the cluster entry, this way config.php can override if it hasn't been set by the webui
2021-10-14 19:41:35 -05:00
hjcday
d8e831d772 newdevice: Added support for Teltonika RUTX series routers (#13350)
* Added support for Teltonika RUTX series routers

* Added snmprec file for testing

* Update and rename rutos-RUTX.yaml to rutos-rutx.yaml

Fix OS name

* Rename rutos-RUTX.yaml to rutos-rutx.yaml

* Rename rutos-RUTX_rutx11.snmprec to rutos-rutx_rutx11.snmprec

* Create rutos-rutx_rutx11.json

* Fix: Device discovery OID removed tab

* Remove whitespace

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: hjcday <hugh.day@lsv.com.au>
2021-10-14 12:35:28 -05:00
Tony Murray
436487f5f2 Dispatch Service: always start queue managers (#13355)
* dispatch service always start queue managers
Only start workers if they are enabled for this node

* style

* please stop mr ide, sir
2021-10-13 21:49:43 -05:00
Tony Murray
526afd437f SnmpQuery updates and more tests (#13359)
* SnmpQuery updates and more tests
improvements to translate handling

* fix method description

* fix whitespace
2021-10-13 08:49:19 -05:00