Commit Graph

1175 Commits

Author SHA1 Message Date
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
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
0f13f2343f Fix more webserver validation issues (#14096)
IPv6 and undefined index errors
2022-07-08 23:36:48 -05:00
Dag Bakke
24fc12722b Add option STARTTLS for authentication via AD (#14051)
* Add option STARTTLS for authentication via AD

* Fix dangling spaces

* Moved starttls code to the correct place

* tabs vs spaces...

* Update ActiveDirectoryAuthorizer.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-05 14:53:29 -05:00
Tony Murray
5ac8f85690 Increase traceroute timeout (#14084)
traceroute going to 30hops with a 3s timeout was exceeding the default execution time.
https://community.librenms.org/t/possible-bug-in-polling/19061
2022-07-01 17:43:47 +02:00
Jellyfrog
5980d9d042 Use --no-patch instead (#14047) 2022-06-20 22:59:15 +02:00
Tony Murray
3724aaa836 Bump version to 22.6.0 2022-06-14 21:53:42 -05:00
Tony Murray
c1a59e29e5 Git version validation fix (#14042)
Instead of erroring because the date is empty, print the error message from git.
2022-06-14 13:36:46 -05:00
Tony Murray
1d35d9391d server name validation, handle ports better (#14041)
Ignore standard ports and include non-standard ports in the base_url setting
2022-06-14 10:14:44 -05:00
Jellyfrog
051c72b9bc Regression fix from #13596 (#14034) 2022-06-13 11:40:53 -05:00
Tony Murray
967c880d86 Fix rrd version check (#14036)
Remove hardcoded version
Add version display in error message
2022-06-13 11:20:13 -05:00
Tony Murray
3c70655c21 Fix DB timezone validation (#14035)
* Fix DB timezone validation
Restore DB session timezone after schema dump

* happy styleci is good styleci
2022-06-13 16:10:21 +02: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
7a0d604cdd Automatic fixes for validation failures (#13930)
* Automatic fixes for validations

* webui

* lint fixes

* Fix an install issue with ConfigSeeder requesting cli input in web page.

* Do not use c_echo in validate.php print_fail()
2022-06-10 16:25:33 -05:00
Tony Murray
1d442fa5c2 Fix an issue when getting the local version from git (#14020)
* Fix an issue when getting the local version from git
If the process is not the owner of the git repo, an unsafe directory error is thrown.

* fix style
2022-06-10 16:19:40 -05:00
Tony Murray
a63166dd0e Remove traceroute6, it is unused (#14019)
* Remove traceroute6, it is unused
LibreNMS just uses traceroute -6, which is supported on all supported OS, and then some.

* missed some items
2022-06-08 08:52:33 +02:00
Tony Murray
7644c994ee Validate base_url and server_name (#13941)
* Validate base_url and server_name

* Fix style

* add return types
2022-06-07 20:53:39 -05:00
Tony Murray
d482ab729a Fix tests failing when device with IP 127.1.6.1 (#14016) 2022-06-07 19:22:29 -05: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
Tony Murray
82be234bae SnmpQuery walk multiple oids (#14015)
Makes it easier to walk select oids from a large table.
Walking oids with different indexes will break some logic and is undefined so far.
2022-06-07 09:04: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
Nash Kaminski
4fe3b0fd57 Fix 500 error in validations when capabilities are not supported or set (#13991)
* Fix 500 error in validations when capabilities are not supported or set

* Update Programs.php

* Update Programs.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-04 15:38:09 -05:00
Nash Kaminski
24e1c96790 Allow the use of a custom URL for accessing the PagerDuty API and correct API schema violation (#14010)
* Allow the use of a custom URL for accessing PagerDuty

* styleci

* PagerDuty custom details must be an Object, not string

* styleci
2022-06-04 13:54:35 -05:00
TheMysteriousX
afe3a25738 Use display name when sending alerts to Sensu (#13967)
* Use display name when sending alerts to Sensu

* system->hostname should always be an FQDN or IP
2022-05-27 09:07:29 -05:00
Holger Hees
3b255edc37 Implement support for usernames coming from reverse proxies (#13894)
* implement support for usernames comming from reverse proxies

* add configurable auth header

* Move implementation to AuthorisationBase class

* refactored default value handling

* fixed external user check
2022-05-24 07:48:19 -05:00
DaftBrit
cedaf8e3ae Setting card summary to alert title (#13989) 2022-05-24 12:21:09 +02:00