Commit Graph
1419 Commits
Author SHA1 Message Date
PipoCanajaandGitHub 63f33642b8 string VS array (#15533) 2023-10-31 15:22:18 -05:00
Tony MurrayandGitHub e1f6b77204 Fix Ciscowlc error when bsnApIfNoOfUsers is not present (#15529)
fixes #15517
2023-10-31 08:25:35 -05:00
7c542d70af SnmpQuery runtime cache (#15512)
* SnmpQuery runtime cache
Optionally cache the SnmpResponse from queries for the rest of the runtime.
It would be nice to have cache hits for these to help prevent wasting memory caching data that is only used once.
Key data must match: device, context, options, oids

* Apply fixes from StyleCI

* Add command to the cache key

* Caching in the wrong spot, cache individual commands...

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-29 22:46:04 -05:00
Tony Murray c22b74d46b Bump version to 23.10.0 2023-10-26 22:47:36 -05:00
db17036f5d Ospf metrics fix (#15508)
* Ospf metrics fix
If the device gave an invalid IP for metrics, it would fail.
Fix this issue, and optimize the sql queries so less are needed.

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-26 11:21:08 -05:00
Tony MurrayandGitHub 7e0b41a05a IP::fromHexString handle ascii (#15504)
* IP::fromHexString handle ascii
Some bad MIBs convert the hex to ascii on display.
Attempt to decode that if the situation is detected.

fixes #15501

* add ascii tests
2023-10-26 10:03:03 -05:00
Tony MurrayandGitHub 811416eec4 Fix poller perf graph time (#15500) 2023-10-24 07:16:23 -05:00
Tony MurrayandGitHub 98992345fa Do not update device IP when DNS resolution fails (#15499) 2023-10-23 20:09:55 -05:00
Tony MurrayandGitHub 79cc5c9114 IS-IS polling handle missing data (#15491)
fixes #15489
2023-10-23 11:02:17 +02:00
Félix BouynotandGitHub 6ce43a300b Fix regression causing wall of ping latency (#15486)
Fix https://github.com/librenms/librenms/issues/15382
2023-10-20 07:30:51 -05:00
Tony MurrayandGitHub f0aa80e73d ports ifPhysAddress use MAC helper (#15478)
* Ports min polled period of 1
Prevent divide by 0
Use Mac utility

* fix bad snmprec for airos-af-ltu

* Update a large amount of invalid mac addresses
either the script is capturing them wrong or users are mangling them

* More updated test data

* Update test data with bad input

* Fix ones using encoded <private> and attempt to fix capture

* Update awplus data

* restore missing data

* update other DNOS

* Fix ones using encoded <private> and attempt to fix capture

* Fix ones using encoded <private> and attempt to fix capture

* fix typo

* Update some data

* update data

* update ruijie
2023-10-19 20:10:52 +02:00
7bd1a57c3e Mcc valere (#14753)
* modifications needed for update of VALERE-DC-POWER-MIB with new file ELTEK-BC2000-DC-POWER-MIB

* add test results for BC2000 post update

* updated test file data

* re-upload of updated files

* reverted valere.json to defaults and recreated with proper varient .json

* replace vpwrShelfIndex with vpwrBayIndex

* updated test data

* Update test data

* try again valere_bc2000.json

---------

Co-authored-by: Tony Murray <[email protected]>
2023-10-19 07:22:46 -05:00
8f91fb3877 Fix polling down retry (and other items) (#15483)
* Only update last_polled if polled
Because availability now runs always, we need to check if we ran any other modules successfully, if so, we can update last_polled

* Tally results and act accordingly

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-19 06:55:41 -05:00
Wade FitzpatrickandGitHub 27ef398907 Add alert transport for Grafana Oncall (#15330)
* Add alert transport for Grafana Oncall

* Add doc for Grafana Oncall

* Fix lint

* Fix comment lint
2023-10-18 22:24:40 -05:00
Tony MurrayandGitHub 921872369d Fix rrd exists check (#15466)
Filename incorrect for test
2023-10-16 12:48:01 -05:00
Tony MurrayandGitHub fb59cfec1c Module status cleanups (#15461)
* Module status helper

* Correct reference

* Rename function to make it more explicit

* Same for exists checks, normalize argument names

* Use new functions
2023-10-16 07:03:32 -05:00
Tony MurrayandGitHub abf4fa0004 Exclude availability module from default testing (#15462) 2023-10-16 07:02:35 -05:00
7a8e479b61 Unix Agent and Application fixes (#15460)
* Unix Agent and Application fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-16 03:40:40 -05:00
Tony MurrayandGitHub fcfaded91f Always create rrd folder on localhost (#15457)
for some reason rrdcached cannot create folders when it is running on localhost
Always create directories on the local poller in case rrdcached is running on the same machine
A few small changes to checkRrdExists() too
2023-10-14 15:29:13 -05:00
bnericksonandGitHub 78a4bfb9d9 Adding Socket Statistic Application Support (#15307) 2023-10-13 22:45:03 -05:00
Tony MurrayandGitHub 5b77dfc75c Huawei VRP AP controller fixes (#15450) 2023-10-13 22:26:33 -05:00
SourceDoctorandGitHub 0f0f49697f muteabel acknowledged alert notifications (#15456) 2023-10-13 22:20:51 -05:00
Tony MurrayandGitHub 1caa2dec42 Send event log when alert rule fails (#15440)
Instead of breaking all following alerts when one has an error, just skip that one alert rule and send and eventlog detailing the error.
2023-10-12 19:31:53 -05:00
Tony MurrayandGitHub afc78d7890 Timos MPLS nullables round 2 (#15448) 2023-10-12 18:53:05 -05:00
Tony MurrayandGitHub a5198d7d57 Remove some lightly used or unused dbFacile functions (#15418)
* Remove some lightly used or unused dbFacile functions
['NULL'] legacy behavior seems unsupported, replace with actual nulls

* Fix refactor mishap

* another

* update baseline

* these were very wrong... what happened?
2023-10-12 09:15:03 -05:00
Tony MurrayandGitHub 2f33421aed Stop libvirt ssh attempts (#15438)
If enable_libvirt is not enabled, do not attempt to ssh to the target device.
2023-10-11 18:49:16 -05:00
Tony MurrayandGitHub b7ab5be347 Fix VRP polling (#15428)
Was using deprecated database functions.
Use current methods
2023-10-11 18:36:35 -05:00
e6be5f777b Use modern device attrib handling (#15429)
* Use modern attrib handling
Remove device attribs array.

fixes #15422

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-11 18:29:47 -05:00
Tony MurrayandGitHub 6e3261f801 Fix timos mpls, add checks (#15430) 2023-10-11 09:56:09 -05:00
14d9d66529 Agent: Packages fixes (+pacman) (#15415)
* Agent: Packages fixes
Don't try to save invalid packages, probably due to script failure on device.
Add pacman support

* Apply fixes from StyleCI

* Add version

* cast to number

* Update includes/polling/unix-agent/packages.inc.php

Co-authored-by: Jellyfrog <[email protected]>

---------

Co-authored-by: StyleCI Bot <[email protected]>
Co-authored-by: Jellyfrog <[email protected]>
2023-10-08 18:37:33 -05:00
685d11d4f1 Misc fixes 42 (#15413)
* Misc Fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-07 21:39:16 -05:00
Tony MurrayandGitHub 6848527753 Fix availability graphs (#15414) 2023-10-07 20:12:17 -05:00
Tony MurrayandGitHub 5386b24888 Type safety check (#15409)
* Type safety check
now fails silently, we already have schema validation to check it is a string, but... people find a way.

* Fixup
2023-10-07 18:45:30 -05:00
Tony MurrayandGitHub e53436b6a3 Calculate downtime from device_outages table (#15397)
* Calculate downtime from device_outages table

* refactor
2023-10-06 20:37:23 -05:00
Tony MurrayandGitHub 072d52e9fd Fix typo (#15406) 2023-10-06 07:51:51 -05:00
Tony MurrayandGitHub 6948b59c11 Add rewrites include for legacy modules (#15405) 2023-10-06 07:39:17 -05:00
d8c372bbf4 Refactor MAC utilities into a single class (#15379)
* Refactor MAC utils to a new utility class

* Apply fixes from StyleCI

* Inline functions
Add tests
Handle bridgeid format

* Apply fixes from StyleCI

* Dedicated code path for stp bridge parsing, and improve STP output a bit

* Correctly parse dot1dBaseBridgeAddress and don't store int in bool field

* trim any unexpected character from bridge addresses, add extra test data.

* better comment

* barsBridge can handle dot1dBaseBridgeAddress correctly now

* parseBridge, check for properly formatted mac first.

* update test data, empty data = empty mac

* Fix new usage after rebase

* import

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-06 07:34:14 -05:00
86793653b3 Validate secure cookies (#15401)
* Validate secure session cookies if HTTPS
When HTTPS is available, secure session cookies should be enabled
SESSION_SECURE_COOKIE=true

* Apply fixes from StyleCI

* Note config:cache

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-05 22:18:49 -05:00
Tony MurrayandGitHub cc98089af1 Revert "Fix last polled (#15396)" (#15400)
This reverts commit 313e9a48e1.
2023-10-05 21:49:44 -05:00
313e9a48e1 Fix last polled (#15396)
* Only update last_polled if polled
Because availability now runs always, we need to check if we ran any other modules successfully, if so, we can update last_polled

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-05 21:27:57 -05:00
Tony MurrayandGitHub 05c30b6001 Fix last polled in wrong column (#15398)
fixes #15382
2023-10-05 20:58:03 -05:00
087d588102 Vmware vminfo modernize (#15008)
* Vmware vminfo
Remove legacy file and migrate to OS discovery

* tighter

* ios_stp-vlans working correctly now

* Make vmwVmGuestOS nullable

* Discover os info too

* VM Info module

* Apply fixes from StyleCI

* Fix log severity

* Fix log severity (more)

* VM Info module

* Poll with ESXi too because it is lightweight
add test data

* poller data now too

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-05 19:49:26 -05:00
Tony MurrayandGitHub 366be4cd49 Re-fix bug in Graphite (#15394)
preg_replace can handle arrays of subjects :D
2023-10-06 00:11:33 +02:00
Tony MurrayandGitHub affb68e2bc Fix bug in graphite (#15393)
It was quite wrong.  Not sure if the fixed code is correct though.
fixes #15391
2023-10-05 14:38:48 -05:00
be24993cbb Remove snmp functions that are barely used (#15377)
* Remove snmp functions that are barely used
Replace them with SnmpQuery calls

* Apply fixes from StyleCI

* Fix missing namespace

* Import Oid

* No more variables left may be repeated multiple times at the end with snmpsim, remove them all

* update data fixed by SnmpResponse bugfix

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-05 01:29:22 -05:00
e0444bffcf Deprecate poller.php (#15370)
* Deprecate poller.php

* Apply fixes from StyleCI

* Remove references to poller.php
Leave wrapper...

* fix python style

* update wraper to call lnms device:poll

* Quiet output too

* make pb happy

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-04 16:32:02 -05:00
c1258320f8 Availability module fixes (#15369)
* Refactor poller to allow modules to run even if the device is down
Include core in config (but not webui) to avoid silly shenanigans
Inject datastore into polling

* Needed to split datastore interface

* Cleanup some data_udpate() references

* Apply fixes from StyleCI

* Fix legacy poller :D

* Output to the correct stream

* Fix lint issues

* Apply fixes from StyleCI

* Fix discovery not including core and submodule handling

* Use whereRaw

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-04 10:32:59 -05:00
4211b1c46f Remove unused functions (#15371)
* Remove unused functions
inline other legacy functions

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
2023-10-04 10:17:34 -05:00
Tony MurrayandGitHub 6f329a7595 Fix alerting find owner contacts on old SQL server versions (#15355)
* Fix alerting find owner contacts on old SQL server versions
Older SQL server versions had a bug where they didn't accept parenthesis around the first query of a union statement.
It was difficult to remove these parenthesis, so use whereHas instead.

* Fix style
2023-09-28 09:49:29 -05:00
Tony MurrayandGitHub 803e7c0004 Fix Linemessagingapi class name (#15356) 2023-09-27 13:49:12 -05:00