Commit Graph

19589 Commits

Author SHA1 Message Date
Tony Murray
e4fdbbd82d Fix bgp-peers bgpIfAce bug and update test data (#14420)
* Update bgp-peers test data

* Fix bgp-peer bgpPeerIface

* Update test data, requires ipv4_addresses table
2022-10-03 12:55:49 -05:00
Tony Murray
53ab0f775d Speed up tests (#14421)
Don't re-load os yaml every time
2022-10-03 11:59:54 -05:00
PipoCanaja
0e14dea12d Fix bgp_peer array_merge error (#14416) 2022-10-03 18:16:23 +02:00
Tony Murray
d372844aea OS test data update (#14417)
* OS test data update

* edfamux case

* restore ftos

* revert ird.json
2022-10-03 10:22:03 -05:00
Tony Murray
878666bb26 Revert "Update common.inc.php (#14407)" (#14419)
This reverts commit 698275dd12.
2022-10-03 08:23:44 -05:00
Jellyfrog
c19ed5afd2 Add another commit to blame ignore (#14418) 2022-10-03 14:54:42 +02:00
Tony Murray
9e89478071 Fix cisco-pw test capture (#14415) 2022-10-02 23:10:36 -05:00
Tony Murray
11565580dd Update ports test data to match current data (#14211)
* Update ports test data to match current data

* fix timos_hc

* update aos7

* Update ciena-sds data, I don't think it works when you run just the ports module by itself...

* update ciscosb_cbs250-24p-4x.json

* restore fortigate

* restore luminato_4x4

* restore luminato_c12.json

* restore timos

* restore timos_7705.json
2022-10-02 14:29:24 -05:00
jgelinas
3b5e93242a Skip empty drac state sensors (#14409)
* Newer iDrac includes empty dimm slots in the memoryDeviceTable
creating ', 0 MB' state sensors. Work around this by not discovering
entities that don't have descr_oid.

* Create drac_3.json

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-10-02 20:00:42 +02:00
Daniel
de524f2e05 Issue samsung printer m4080 fx (#14391)
* Added printer support to Samsung M4080FX which appears as generic

* Added printer support to Samsung M4080FX which appears as generic

* Create samsungprinter_m4080fx.json

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-10-02 19:54:53 +02:00
PipoCanaja
daa8c757f6 Fix a few Db* to Eloquent requests (#14278)
* Eloquent for 2 requests

* Eloquent for 1 request

* a few in Dell

* Model

* and more with timos

* and more with timos

* and firebrick

* firebrick

* one query instead of many

* Should use collection get

* Update timos.inc.php

* Update dell-os10.inc.php

* avoid changing timos as it breaks something

* new try with timos

* deps for BGP

* revert deps for BGP

* style

* style

* deps for BGP, 2nd try

* typo

* revert aos7

* fix create

* firebricktests

* firebrick

* firebrick

* cipsec-fix

* cipsec

* timos fix 100th time :)

* ./scripts/save-test-data.php -m os,ports,processors,mempools,vrf,sensors,bgp-peers,mpls,ospf  -o timos -v 7705

* remove timos from this PR

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-10-02 16:04:08 +02:00
Tony Murray
e4451714e2 version and git helper improvements (#14412)
* Fix up version and git helpers
Improve method names
Move all git calls into the git helper
Allow runtime and external cache of results where appropriate
Consolidate version headers for discovery, poller, and validate

* Style fixes

* improve consistency in git calls

* fix style

* don't send name inconsistently

* Improve database versions

* No need to cache Version it is not used more than once currently.
2022-10-02 00:41:56 -05:00
Tony Murray
964a67289a Populate the alert rule field with the builder json (#14374)
That way it isn't empty. (which is unexpected)
2022-10-02 00:02:08 -05:00
Tony Murray
abe4f6fbc0 API: fix port search with slashes (#14403) 2022-10-02 00:01:15 -05:00
O Palivan
a0316f4b9e Added OS tait-tnadmin for TN9300 (#14413) 2022-09-30 23:22:24 +02:00
Kayck Matias
1f54fc786a Update ports_purge docs and definitions (#14402)
* Update ports_purge docs and definitions
* Translate
2022-09-30 18:48:39 +02:00
Maikel de Boer
0faaee0ac6 Enexus system output current fix (#14324)
* enexus fix

* added test data

* added testdata

* add test data

* added testdata

* added testdata

* added testdata

* removed variant

* added testdata

* added test data

* added testdata

* added testdata
2022-09-30 11:30:41 -05:00
Kevin Zink
698275dd12 Update common.inc.php (#14407)
Place the Y grid dynamically based on the graph's Y range. The algorithm ensures that you always have a grid, that there are enough but not too many grid lines, and that the grid is metric. That is the grid lines are placed every 1, 2, 5 or 10 units. This parameter will also ensure that you get enough decimals displayed even if your graph goes from 69.998 to 70.001. (contributed by Sasha Mikheev).
2022-09-30 13:21:10 +02:00
Lucas Gasenzer
833dab7a83 Enhanced Service Overview on Device Overview Page (#14410)
* changed viewbox and scale as fix for safari

* enhanced service overview with "$name ($type)"
2022-09-30 10:22:01 +02:00
Kayck Matias
230ea950a8 Add initselect2 to locations ports (#14375)
* Update devices in alert-logs to init_select2

* Fix function ->exists

* Add init_select2 to location filter in ports

* fixes
2022-09-30 09:50:36 +03:00
Tony Murray
f60b6788d3 Cache version data (#14404)
* Cache version data
Calling cli commands can be expensive, cache the results.

* style fixes

* Fix pre-laravel usage

* fix lint
2022-09-28 23:23:32 -05:00
Tony Murray
59f9d90559 Fix rpi codec state sensor (#14400) 2022-09-27 14:44:01 -05:00
Tony Murray
883071dcfc Test supported PHP versions only (#14389)
* Test supported PHP versions only
Lower mariadb and mysql to their minimum supported versions for unit tests

* Cannot test PHP 8.2 yet, dependencies need to be updated first.
2022-09-27 14:28:28 -05:00
Alex
b1d25a96e4 GitHub Workflows security hardening (#14388)
* build: harden lint.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden doc.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden test.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-27 17:25:39 +02:00
Tony Murray
14f449e567 Fix libvirt count() uncountable error (#14398) 2022-09-27 09:43:27 -05:00
Tony Murray
467cb0ab6b Fix Firebrick local ASN (#14397) 2022-09-27 07:45:51 -05:00
Félix Bouynot
a174268a3f Fix documentation for php8.1 and bad package name (#14393) 2022-09-27 09:07:50 +02:00
Félix Bouynot
e1275340f3 Fix php7.2 occurence in Performance.md documentation (#14394) 2022-09-27 09:04:03 +02:00
Tony Murray
5b432ddc05 Fix ups nut PHP 8.1 issue (#14392)
https://community.librenms.org/t/sensors-initialisation-fails-with-php-8-1/19697
2022-09-26 12:02:42 -05:00
Tony Murray
66790e7e8f Increase minimum version to PHP 8.1 (#14378) 2022-09-26 08:52:15 -05:00
Tony Murray
e990dfcb35 Disable plugins that have errors (#14383)
* Disable plugins that have errors
Disable plugin if a hook throws an error and set a notification
Move notification code to class, so we can access it
Clear notification when plugin is attempted to be enabled again

* fix style and lint fixes

* another lint fix and handle if property is missing
2022-09-25 22:47:58 -05:00
Félix Bouynot
333ba7c2cd Fix oxidized web requests unclosed connections or responding fast enough (#14370)
* Fix oxidized web requests not closing connections or responding fast enough

* Update showconfig.inc.php

* Add method to get the text content of an oxidized page

* Use Oxidized getContent method instead of file_get_content

* Too much brackets with copy paste

* Fix carriage return errors because of copy paste

* Fix copy paste error again

* Fix indent

* PHPStan is waiting for a return even outside of the if loop

* Single quotes

* Variabilize timeout in baseapi

* Set Oxidized Api class timeout var to 90 because oxidized is slow and to be sure not to break half the installs here

* fix typo

* Variabilize timeout

* Variabilize timeout

* Variabilize timeout

* Variabilize timeout

* Variabilize timeout

* Spacing

* Remove timeout type because of this error

Unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in app/ApiClients/BaseApi.php on line 34

* Lint needs type finally

* Use contruct instead of setting variable

* Type hinting instead for php7.3

* Type hinting fix

* Set property value instead of calling parent constructor

* Typo

* Remove unneededconstructors

* Remove unneeded constructors

* Remove unneeded constructors

* Remove unneeded constructors

* Remove unneeded constructors

* Remove unneeded constructors

* Typing not casting

* Typing not casting

* Cannot type variables outside of a class

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-09-24 14:24:11 -05:00
Kayck Matias
64dcfcb8cc Alert map location fix (#14380)
* Update devices in alert-logs to init_select2

* Fix function ->exists

* Add init_select2 to location filter in ports

* fixes

* Fixed alerts rule system not filtering by location
2022-09-23 14:15:46 -05:00
electrocret
b993f38903 Fix Inventory table for Dark theme (#14377) 2022-09-21 23:35:24 +02:00
Tony Murray
dbcee24749 Bump version to 22.9.0 22.9.0 2022-09-21 01:51:22 -05:00
Tony Murray
1e2fbcff87 Changelog for 22.9.0 2022-09-21 01:51:21 -05:00
Tony Murray
fd6fdeeb5b Fix ports list exists (#14372) 2022-09-19 15:47:36 -05:00
sembeek
4e1f958e16 Fix ping.php skipped results (#14368)
* Update PingCheck.php

* Update PingCheck.php

* Update phpstan-baseline.neon

* Update PingCheck.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-19 15:10:26 -05:00
Jellyfrog
27a19039dc Defer loading cli option defaults (#14363)
* Defer loading cli option defaults

Also allows passing args to functions

* Update DynamicInputOption.php
2022-09-19 16:03:55 +02:00
Tony Murray
fb489f61ed Fix cipsec-tunnels ftd bad data causes error (#14366)
fixes #12393
2022-09-18 12:15:38 +02:00
huntr.dev | protect open source software
9f0b1cafff Add SECURITY.md (#14359) 2022-09-18 01:00:38 -05:00
Jellyfrog
be4f39a2b4 Remove call to Config from artisan (#14362)
Defers the loading of Config a bit
2022-09-17 23:44:45 -05:00
Tony Murray
0805002086 Fix scheduled maintenance xss (#14360)
Fix for fields title, notes, and maybe recurring_day. Other fields can't store html.

https://huntr.dev/bounties/bcb6ee68-1452-4fdb-932a-f1031d10984f/
2022-09-16 11:59:48 -05:00
Tony Murray
15fd7d0653 Handle null in unix-agent (#14358) 2022-09-16 15:44:41 +02:00
Kayck Matias
1e80780dd3 Load device selection dynamically on Ports page (#14353)
* Add search in real-time to Ports page

* Update to init_select2 and remove old query

* fixed styleci

* fixed styleci

* fixing email

* Finish up

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-16 08:40:03 -05:00
Quentin Schoemaker
d0bcf0a4da Added status checks for (BWCC) battery status and condition for onboa… (#14349)
* Added status checks for (BWCC) battery status and condition for onboard and PCIe RAID-controllers.
Added SNMPsim testfiles for iLO 4 and iLO5 with these changes.

* Added JSON test files.

* Masked serial numbers in SNMPrec files.

* Updated discovery description for battery condition.

* Updated masked SNMPrec file.
2022-09-16 12:03:43 +02:00
Tony Murray
67ad0726b0 Defer loading cli option values (#14354)
* Defer loading option values
Otherwise it causes a cli command to be run every single application boot.

* style and lint

* Just return whatever we have it isn't callable
2022-09-16 11:58:22 +02:00
Skylark
7aeb238b7f Oxidized "allow purpose and notes" (#14352)
error:
  "The value.group contains invalid keys: purpose,notes. Valid keys: hostname,sysName,sysDescr,sysObjectID,hardware,os,location,ip"

when running:
  lnms config:set oxidized.maps.group.purpose.+ '{"regex": "/^lon-sw/", "value": "london-network"}'
  lnms config:set oxidized.maps.group.notes.+ '{"regex": "/^lon-sw/", "value": "london-network"}'
2022-09-15 11:20:25 +03:00
Félix Bouynot
8dabf4e2ef Fix the case of 'Ungrouped' (#14351) 2022-09-14 20:14:31 +02:00
Tony Murray
4afc188cad Cache astext for 1 day (#14303)
* Cache astext for 1 day
Prep AS util to hold other code too
Fix code bugs (and hopefully not introduce new ones)

* Update AutonomousSystem.php
2022-09-14 02:00:30 +02:00