Commit Graph

1200 Commits

Author SHA1 Message Date
PipoCanaja
53bfb24ef9
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207)
* use component to discover if xDSL polling is needed

use component to discover if xDSL polling is needed

* Components OK, Polling in correct files, no DB for VDSL

* GUI

GUI_suite

* per port as well

* rename

* interface listing

* draytek_snmpsim

* fix arraymerge

fix names and max value

* schema

schema

style

* remove one dbFetchRows

remove 2x dbFetchCell

style

style

remove Legacy dbFetchRow

tests

tests

eloquent

more eloquent

more eloquent

one more gone

* fix properties access

eloquent_insert_update

style

tests

tests

tests

tests

* tests

tests

tests

* adslLineCoding

* Models

* fix not nullable cols in DB from code

default values

typo

rename

typo

schema

fix

fix

vdsl fix now

typo

typo

fix size

fix size

* Power values for VDSL

Power values for VDSL

Power values for VDSL

DB

* cleanup

* Rrd::checkRrdExists

* always enable DSL discovery

style

* xdsl module

* cleanup and move to Module

cleanup and move to Module

cleanup and move to Module

cleanup and move to Module

* Fix display

* fix polling and tenth

* remove legacy poller

* Style and Cosmetics

Cosmetics

Cleanup

* Translations

Translations

* exists

exists

* add test support for xdsl

* remove last component call

unused

* translations

* remove non standard onclick event on xdsl line

* Update Discovery Support.md

Update Poller Support.md

toner_gone

* Notification for removal of lnms config:set enable_ports_adsl true

* enable on devices with potential DSL interfaces

* tests are working now

fix teldat tests

* os_schema

* teldat

* move to new module structure

* move to new module structure

* wrong dump function

* wrong dump function

* laravel_through_key hidden

* Update notifications.rss

* Update notifications.rss

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-07 19:29:17 -05:00
Tony Murray
b44f1546a2
Improved Modern Modules (#14315)
* Improved Modern Modules
Modules now report module dependencies and can dump data for testing
This should serve to the process of building a module more obvious.
cleanup now only requires a device, not an os wrapped around a device
Helper to create a modern module (including the legacy adapter) from a name.

* return false correctly for dump and handle it.

* make sure test data is in the right format.

* wrong isis table name

* sort

* Fix style and lint issues
2022-09-07 23:53:16 +02:00
Tony Murray
8a4d8037e8
Don't include null os when loading defs (#14312) 2022-09-07 09:27:06 +02:00
Jellyfrog
36e9c5e0b9
PHPStan: Remove PHP version constraint (#14314) 2022-09-06 23:43:51 +02:00
Tony Murray
9fdc213f25
Return GraphImage to include more metadata (#14307)
* Return GraphImage to include more metadata
Allows things like including title.
Implements __toString for backwards compatability
getImageData to allow controlling the output through flags

* Style and Lint
2022-09-06 07:33:57 -05:00
Tony Murray
69d1c2022a
SnmpResponse filterBadLines fix (#14306)
Actually filter lines (instead of full responses) with No Such Instance regex
2022-09-06 12:10:29 +02:00
Tony Murray
302a989d4e
Email Transport: embed graphs by default (#14270)
* Email embed graphs

* Allow attachment for non-html
Add setting to webui
Correct $auth setting

* Cleanups, throw RrdGraphException instead of returning an error image.
Generate the error image later, giving more control.
Reduce code duplication a little

* Style and lint fixes
Change to flags

* Add baseline for lint errors I don't know how to resolve

* oopsie, changed the code after generating the baseline

* Tiny cleanups.  Make set DeviceCache primary, it is free.

* Docs.

* email_html note

* Allow control of graph embed at the email transport level to override the global config.

* Allow control of graph embed at the email transport level to override the global config.

* Add INLINE_BASE64 to make it easier to create inline image tags
2022-09-05 20:41:55 -05:00
Tony Murray
ec8629fb63
Discord ability to attach graph images (#14276)
* Discord ability to attach graph images
Must use @signedGraphTag()
Needs more work on the graph side of things still: issues with CORs and other.

* Fixes

* alert data is an array for transports

* No need to decode, that was a bug before
2022-09-05 16:20:10 -05:00
Jellyfrog
2264229b8b
Silence return type mismatch (#14298)
* Silence return type mismatch

To keep PHP7 compatibility

* Update QueryBuilderFilter.php

* Update DynamicConfigItem.php

* Update ObjectCache.php

* Update DynamicConfigItem.php
2022-09-05 16:19:39 -05:00
Tony Murray
bdf903818b
Linux distro images require feature field (#14301)
No reason to check them if feature is empty
2022-09-05 22:32:04 +02:00
Tony Murray
09c6c725a1
Check if polling module exists (#14289)
Users have old configurations defined, do not try to include them and post a message about it
2022-09-05 09:22:59 +02:00
Tony Murray
842c454e7b
url alias fix (#14281) 2022-09-03 13:02:25 -05:00
Tony Murray
5c76890373
Add @signedGraphTag() and @signedGraphUrl() blade directives (#14269)
* More secure external graph access
Add @signedGraphTag() and @signedGraphUrl() blade directives
Takes either an array of graph variables or a url to a graph
Uses a signed url that is accessible without user login, embeds signature in url to authenticate access
See Laravel Signed Url for more details.
Adds Laravel route to graphs (does not change links to use it yet)
@graphImage requires the other PR
Also APP_URL is required in .env

* missing files from rebase

* Fix url parsing with a get string

* allow width and height to be omitted

* Documentation

* Add to, otherwise it will always be now

* Doc note for to and from relative security

* fix vars.inc.php (Laravel has a dummy url here)
2022-09-03 12:48:43 -05:00
Keenan Tims
c1f6c90aac
Don't send zeros to Graphite for missing metrics (#14262) 2022-09-02 21:09:07 -05:00
Tony Murray
ef1076dd7b
Cleanup some RunAlerts issues (#14274) 2022-09-03 03:19:21 +03:00
Jellyfrog
3e2d7435af
Fix more error exceptions (#14266) 2022-09-01 12:30:51 -05:00
Tony Murray
6f5cf7727a
Misc webui code cleanups (#14242)
* Misc webui cleanups

* Style

* More

* graphing fixes

* More graph cleanups

* more fixes, graphs and device pages

* style
2022-08-30 12:55:37 -05:00
Jellyfrog
797d73ad16
Misc errors cleanup (#14257)
* Misc errors cleanup

* Rename the variable in the loop to match

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-30 09:00:12 -05:00
Tony Murray
a664d12eb7
Fix ipv6 hexdec error (#14254)
* Fix ipv6 hexdec error
convert to SnmpQuery and Ipv6 util

* Don't walk other oids if one fails.
2022-08-28 20:47:51 -05:00
Tony Murray
08c4d7f3b3
Allow SnmpQuery to optionally abort walks if one fails (#14255)
* Allow SnmpQuery to optionally abort walks if one fails

* style

* remove baseline
2022-08-28 19:47:20 -05:00
PipoCanaja
969159f77a
Save-test-data to refresh all variants of an OS (#14231)
* per OS

per OS

per OS

fixTest

fixTest

* fix empty variant
2022-08-26 15:29:14 -05:00
PipoCanaja
2ae0e84091
Fix redeclare of function breaking tests in OS eltex-mes23xx (#14227)
* eltex
* function in Class file
* style
2022-08-24 23:05:38 +02:00
Tony Murray
db54161b10
Fix os_group unset errors (#14238)
Instead of requiring an isset check for os_group, just set it, but to null
valid isset checks will still work right since it is now set to null.
2022-08-24 14:45:43 -05:00
Tony Murray
34163703fb
Percentage calculation helper (#14235)
* Percentage calculation helper
Helper function to prevent divide by zero mistakes
Replace all percent calculations

* style
2022-08-24 21:01:54 +02:00
Jellyfrog
1dbab5ac7e
Error reporting (#14190)
* Error reporting

* Move code to ErrorReportingProvider
Enable reporting of error (and warning) messages.
report module exceptions

* Restore flare key
Not needed to set late anymore.  We set up filtering before it is initialized.

* Remove unnecessary and maybe double Flare report

* lint

* Cannot use typed properties yet, use phpdoc

* fix handleError return type

* Filter both exceptions and reports (so we don't miss any)
Consolidate the check if reporting should be enabled

* Cache reportingEnabled check for the runtime

* Split out middleware to improve readability
Logging of why reporting is disabled
Fix reportingEnabled cache

* Style

* Return some user data

* Change to class based middleware, it looks nicer

* Fix error page error id report, add url.

* also rewrite intended url

* remove link

* Move ignition to production and update flare-client

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-24 00:33:28 +02:00
Tony Murray
465fa3986a
Fix Undefined variable/key warnings (#14134)
* Fix Undefined variable/key warnings

* massage for test data

* restore set_numeric, only generates noise

* Fix ucd storage used (apparently free is not stored in discovery...)
2022-08-21 16:23:43 -05:00
Tony Murray
ff7d89e5e4 Bump version to 22.8.0 2022-08-19 20:34:31 -05:00
Tony Murray
b31dbdc224
Fix legacy os extends (#14220)
* Fix legacy os extend support
Now compatible with oids that could have been used by older software:
extend .1.3.6.1.4.1.2021.7890.2 hardware
extend .1.3.6.1.4.1.2021.7890.3 manufacturer
extend .1.3.6.1.4.1.2021.7890.3 vendor
extend .1.3.6.1.4.1.2021.7890.4 serial

And correct the oids for VERY old exec options.

* Convert to SnmpQuery and convert some numeric oid to textual

* MIB-Dell-10892::chassisServiceTagName.1 is discovered already in ServerHardware trait, no need to double fetch

* OIDs were previously mixed up, fix data
2022-08-19 15:26:46 -05:00
Tony Murray
6e8224565f
AD Auth PHP8.1 fixes (#14215) 2022-08-18 21:47:14 -05:00
Zane C. Bowers-Hadley
55c62b234e
add Opensearch\Elasticsearch monitoring (#14053)
* add new poller

* add a missing ;

* formatting cleanup

* graph stuff and metrics move

* add rrd name

* clean up metrics/rrd def

* more metric/rrd def cleanup

* cleanup

* add basic opensearch graphs

* add opensearch to apps.inc.php

* begin work on opensearch app page

* formatting cleanup

* add translog graphs

* add a missing graph

* fix pending tasks

* add the ability to fetch the saved cluster name

* add fetching the cluster name

* correct the opensearch comment

* add combined shard stats

* add indexing graphs

* correct graph name

* correct some units as being per second

* add more graphs

* add more items for graph sets

* cleanup of units and naming... also more graphs

* more graph stuff

* change the RRD def again and define a few more graphs

* finish basic graph sets

* more graph stuff

* another rrd def change

* add more graphs

* add some more graph sets

* correct unit for c_task_max_in_time

* more graph stuff

* more graph stuff

* correct the unit

* add missing tw_time and another rrd def change

* another unit change

* add trc graphs

* more graph stuff

* add tseg graphs

* add all shards graph to both cluster items

* more graph stuff

* update opensearch app page

* add Opensearch\Elasticsearch app

* add opensearch tests

* run php-cs-fixer on two files

* add alert examples for checking cluster status

* remove an item that was accidentally added as a metric in the test but is not

* derp! thanks jellyfrog

* make it come up as Elisticsearch\Opensearch in the webui

* no longer use components, but app_data, for cluster name change

* update the web side for opensearch for using app_data

* style fix

* update opensearch for new app data stuff

* update to the new Application model

* update poller and device app page for ES/OS

* style cleanup

* update graphs

* test fix

* more test cleanup

* Update alert_rules.json

* begin work on breaking out the RRDs

* update all non-multi rrd graphs for opensearch

* update time_all

* add a unass shards graph

* correct rrd name

* should all be good now

* add missing tm stats

* Un Assigned -> Unassigned

* style cleanup

* another style fix

* remove cluster_name from saved metrics as it is not a metric

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-08-15 14:44:20 -05:00
Jellyfrog
2ef1c3670b
Fix error when ldap_search returns false (#14199) 2022-08-14 09:14:12 -05:00
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
Nash Kaminski
9bb6b19832
Support for SSL/TLS protected connections to MySQL databases (#14142)
* Allow configuration of the SSL/TLS operating mode when connecting to a mysql database

* Support SSL/TLS DB connections in the dispatcher service as well

* Apply black formatting standards to Python files

* Suppress pylint errors as redis module is not installed when linting

* More pylint fixes

* Correct typo in logging output

* Refactor SSL/TLS changes into DBConfig class instead of ServiceConfig

* Define DB config variables as class vars instead of instance vars

* Break circular import
2022-08-07 14:53:29 -05:00
Tony Murray
e9211d93c0
Fix ports display (#14183)
* Fix ports with deleted device breaking all ports display

* Only filter callable based filters when required
2022-08-05 09:01:15 -05:00
Jellyfrog
02400e66cd
Fix APP_KEY generation when using fpm (#14168) 2022-08-04 17:59:10 -05:00
Tony Murray
1c2e446326
New Poller validations (#14148)
* New Poller validations
Seperated poller and distributed poller validations to make poller validations generally available
One auto fixer added
Translatable strings

* lint and style fixes

* and style

* and style

* Update LibreNMS/Validations/Poller/CheckLocking.php

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

* Update CheckPythonWrapper.php

* Try to check if cron is even installed before warning about not being able to read the cron files.
Likely most systems they won't be readable, but also, it is very unlikely we hit the cron check and it is meaningfully different than the first Poller::exists() check.

* Work on poller validation
Remove errors/warnings when at least one poller of the other type is active.

* style fixes

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-08-02 16:02:37 -05:00
TheMysteriousX
a2c705bd87
queit -> quiet (#14163) 2022-07-31 16:05:37 +02:00
Mark Nagel
3309750f35
replace git show --no-patch option with --quiet (#14160)
* replace git show --no-patch option with --quiet

Older versions of git do not support --no-patch or -q, but both older and modern versions support --quiet.

* Merge #14161

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-30 14:57:26 +02:00
Peca Nesovanovic
5dd23f7d7d
IPv6 Debug typo (#14162) 2022-07-30 13:27:16 +02:00
Jellyfrog
670f964e98
Validate: use "database version" instead of "mysql version" (#14158)
* Validate: use "database version" instead of "mysql version"

* wip

* wip
2022-07-29 11:36:18 -05:00
Tony Murray
8508710e62
Stats: Collect OS distro and LibreNMS version (#14138)
* Stats: Collect OS distro and LibreNMS version

Add os distro/version and LibreNMS version to stats collection.

To view stats: https://stats.librenms.org

* style/lint fixes

* Put debug where it will work

* One call sends int, which is ok
2022-07-29 08:53:41 -05:00
Jellyfrog
6ebcde3c04
Prepare for PHP 8.1 (#14156) 2022-07-28 22:09:09 -05:00
Nash Kaminski
d0503fbdef
Fix 500 error in validation when UI containers and poller containers have differing node_ids (#14146)
* Fix 500 error in validation when UI containers and poller containers have unique node_ids

* Update DistributedPoller.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-27 03:08:17 -05:00
Nash Kaminski
797fe7477d
Improvements to PagerDuty alert formatting (#14143)
* Split PagerDuty payloads into an array delimited by newlines

* Remove empty lines in PagerDuty message
2022-07-27 02:51:02 -05:00
Jellyfrog
a214dbc8f3
Use --no-patch to support old git clients (#14137) 2022-07-26 01:21:19 +02:00
Tony Murray
799c03df29
lnms device:poll better feedback (#14130)
* lnms device:poll better feedback
Feedback when 0 devices are found to poll or 0 devices are polled.
Make devices polled summary string translatable.

* additional note on what the wildcard is

* Fix style
2022-07-22 16:31:27 -05:00
Tony Murray
52f0dab2f8
Sensors, convert hex to strings (#14121)
* Sensors, convert hex to strings

* Fix clickshare, it actually was returning hex

* update hpe-mapdu

* skip ict-mps sensors without valid values
2022-07-22 07:59:41 -05:00
Marek Wobst
207aaf3064
Add rich (=html) support for messages via Matrix (#14054)
Mails may be colorful now, too.
2022-07-20 23:05:38 -05:00
Tony Murray
747d6f288c Bump version to 22.7.0 2022-07-20 21:53:17 -05:00