Commit Graph

423 Commits

Author SHA1 Message Date
Tony Murray
a717e084f0 Bump version to 24.6.0 2024-06-16 11:23:37 -05:00
Tony Murray
2a42bf714f Bump version to 24.5.0 2024-05-19 22:53:54 -05:00
Tony Murray
07655c24af Merge duplicate toBytes functions (#15994)
* Merge duplicate toBytes functions
Replace other duplicate code and add tests

* Allow space between similar to formatSI output

* Style fixes

* Match previous behavior in Docker app
2024-04-30 14:40:08 +02:00
Warren Ashcroft
1aa712e189 Fix graph_type variable (svg / png) (#15972) 2024-04-26 08:33:08 -05:00
Tony Murray
9088a34299 Bump version to 24.4.0 2024-04-19 20:52:35 -05:00
Tony Murray
af2f953c7f Bump version to 24.3.0 2024-04-01 10:18:44 -05:00
Walkablenormal
c855d6c2fe Support for InfluxDB V2 API (#15861)
* Addition of influxdb-client-php to Composer.

* Addtion of InfluxDBv2 support.

* Addition of front-end options.

* Addition of documentation.

* Addition of the acknowledgement of the PHP library used.

* Fixed a unneeded bracket.

* Addition of a basic datastore test.

* StyleCI fixes.

* StyleCI fixes.

* StyleCI fixes.

* Fixed exception class.

* Revert accidental change.

* Fix to composer lock to not update all packages.

* Fix to composer lock to not update all packages, but still include the new Influx lib.

* Another attempt at getting Composer to behave the way I think it should work.

* Fixed merge-conflict in Composer due to #15869.

* Update composer.json

* Update composer.lock

* Update composer.json

* Update composer.lock

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-03-07 12:26:21 -06:00
Tony Murray
f362746224 Bump version to 24.2.0 2024-02-27 12:54:10 -06:00
Peca Nesovanovic
eb6006248f Rewrite ups-nut discovery to SnmpQuery:: (#15850)
* modernize and move ups-nut to unix

* fix test data (group and invalid runtime)

* add Battery Temperature to test data

* lnms dev:check style
2024-02-26 17:48:40 +01:00
Jellyfrog
b0bd0765ad Prevent ansi colors in key:generate output (#15773)
* Prevent ansi colors in key:generate output

* Apply fixes from StyleCI
2024-01-23 12:35:39 +01:00
Neil Lathwood
421f2c7d38 Bump version to 24.1.0 2024-01-07 15:49:52 +00:00
Jellyfrog
071ca9bc2a Apply fixes from StyleCI (#15698)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-01-04 22:39:12 -06:00
Tony Murray
6bea8cffa6 New utility Number::constrainInteger() (#15663)
* New utility Number::constrainInteger()
Fixes a bug with Number::unsignedAsSigned() and implements signed support as well.

* cleanup

* Apply fixes from StyleCI

* Remove default cases

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-12-20 09:21:40 -06:00
PipoCanaja
648a5ea7d3 bug - XDSL adslAtucCurrOutputPwr exception (Cisco CSCvj53634) (#15614)
* Cisco CSCvj53634

tests

change RRD minimas to accept negative dbm output power

unnecessary tests

* unsignedAsSigned function

* use new function Number::unsignedAsSigned

* negative power for Vdsl as well

* style

* style

* Add types

* simplify and exception if over max value

* Add tests

* Style fixes

* Tell phpstan to shut up

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-12-15 10:06:52 -06:00
Tony Murray
54ff1d7e63 Bump version to 23.11.0 2023-11-16 20:57:41 -06:00
eskyuu
cc7e02cbcd Device links formatting changes (#15580)
Make the images inline so they appear side by side
Put newlines between the major device information sections (name, model/OS, location)
2023-11-16 08:54:29 -06:00
Tony Murray
63eeeb7172 Mail Transport use BCC option (#15554)
Option to use BCC instead of to field for emails
2023-11-08 08:36:09 -06:00
Tim de Boer
d5c6d0aaf4 Fixed BGP Remote peer link and graph in Routing Overview, or just static text when not a device in LibreNMS (#15535)
* Fixed BGP Remote peer link and graph in Routing Overview, or just static text when not a device in LibreNMS

* Added extra space

* Reverted back to overlibLink (due to BGP update graphs on hover)

* Added extra space

* Remove graph for remote peer, as it is falsely (showed earlier the Updates Graph for local peer)

* Removed unnecessary/unused code

* Remove graph for remote peer, as it is falsely (showed earlier the Updates Graph for local peer), replaced with just a DeviceLinks

* Change Url::deviceLink to return $text if the device doesn't exist.  Default to ''
Import some of the things to improve readability.

* update phpdoc

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-11-02 00:41:19 -05:00
Tony Murray
c22b74d46b Bump version to 23.10.0 2023-10-26 22:47:36 -05:00
Tony Murray
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 Murray
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
Tony Murray
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 Murray
abf4fa0004 Exclude availability module from default testing (#15462) 2023-10-16 07:02:35 -05:00
bnerickson
78a4bfb9d9 Adding Socket Statistic Application Support (#15307) 2023-10-13 22:45:03 -05:00
Tony Murray
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 <Jellyfrog@users.noreply.github.com>

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2023-10-08 18:37:33 -05:00
Tony Murray
685d11d4f1 Misc fixes 42 (#15413)
* Misc Fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-07 21:39:16 -05:00
Tony Murray
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 <bot@styleci.io>
2023-10-06 07:34:14 -05:00
Tony Murray
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 <bot@styleci.io>
2023-10-05 01:29:22 -05:00
Tony Murray
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 <bot@styleci.io>
2023-10-04 10:32:59 -05:00
Tony Murray
c8041b6699 FDB Tables improve performance (#15333)
* FDB Tables improve performance
Reduce unnecessary sql queries, by using a relationship
Cache vendor oui lookups

* Oui already "clean"

* Fix typo
2023-09-25 19:49:22 -05:00
Tony Murray
bfc82a5383 Bump version to 23.9.1 2023-09-18 20:59:06 -05:00
Tony Murray
4b98bd7607 Bump version to 23.9.0 2023-09-15 07:29:15 -05:00
Tony Murray
f670a8074a Fix .env quoting issue (#15298)
Triggered when password contains # and .env file uses windows line returns.

Friends don't let friends use windows line returns
2023-09-08 08:31:41 -05:00
Tony Murray
69297c9e91 Bump version to 23.8.0 2023-08-19 09:13:28 -05:00
Tony Murray
9382959c8c Set mibs explicitly in SnmpQuery (#15199)
* Set mibs explicitly in SnmpQuery
Always override system mibs, so we have consistency
New method to control mibs

* Lint fixes
2023-08-05 14:45:15 +02:00
Tony Murray
12f8bb2040 MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
2023-08-03 19:29:30 -05:00
Jellyfrog
1a6fe2bff7 Update composer dependencies (#15167) 2023-07-26 22:24:37 +02:00
Tony Murray
3908bddb49 Miscellaneous fixes (#15162) 2023-07-26 01:08:10 +02:00
Andy Norwood
64c4650801 Add FDB table vendor search drop down (#15072)
* Add vendor search and related functions

* Add OUIDB cache for vendor lookup

* Add vendor drop down

* appy style CI changes

* Apply style CI and lint changes

* more styleCI changes

* update type hinting

* Edit mac_oui cache lock name and function

* Update MAC OUI message during daily

* Use DB for vendor lookup

* New vendor_oui table migration

* New MAC OUI to database function

* Update readbleOUI to use DB rather than cache

* Make StyleCI changes

* styleCI tweak

* Remove lock release to allow refresh timer

* change migration name to match table

* add schema dump

* update schema

* styleCI tweak
2023-07-21 11:30:13 -05:00
Zane C. Bowers-Hadley
54a38dd4cd add the Mojo CAPE Submit app (#15140)
* add poller for mojo cape submit

* mojo_cape_submit poller now works

* add app page for mojo_cape_submit

* add basic generic stat graphs for mojo cape submit

* general size stats graph for mojo_cape_submit

* make sure we update slugs that did not see anything submitted for them

* sort the slugs by sub count

* add app protos graph and sub top 12 graphs

* add mojo cape submit docs

* add tests for mojo_cape_submit

* add mojo_cape_submit to the apps page

* add string helper for mojo_cape_submit

* poke lots of stuff with php-cs-fixer

* remove a unneeded line

* add a missing metric and app data to test
2023-07-19 22:41:51 -05:00
Tony Murray
6edb3b5046 Bump version to 23.7.0 2023-07-16 23:42:41 -05:00
Tony Murray
eaf0253412 Bump version to 23.6.0 2023-06-23 08:25:03 -05:00
Jellyfrog
b14e2d4609 Apply fixes from StyleCI (#15101)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-06-13 13:35:00 +02:00
Jellyfrog
2b3575a5e9 Laravel 10.x Shift (#14995)
* Apply code style

* Remove explicit call to register policies

* Shift core files

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Add type hints for Laravel 10

* Shift cleanup

* wip

* wip

* sync translation

* Sync back config

* Public Path Binding

* QueryException

* monolog

* db::raw

* monolog

* db::raw

* fix larastan collections

* fix phpstan bug looping forever

* larastan errors

* larastan: fix column type

* styleci

* initialize array

* fixes

* fixes

---------

Co-authored-by: Shift <shift@laravelshift.com>
2023-05-24 22:21:54 +02:00
Jellyfrog
075267dcc9 Add AllowDynamicProperties to DynamicConfigItem (#15058) 2023-05-23 21:18:03 -05:00
Tony Murray
04bb75f5f3 Alert transport cleanup, no_proxy support and other proxy cleanups (#14763)
* Add no_proxy and other proxy related settings
Set user agent on all http client requests
Unify http client usage

* Style fixes

* Remove useless use statements

* Correct variable, good job phpstan

* Add tests
fix https_proxy bug
add tcp:// to the config settings format

* style and lint fixes

* Remove guzzle from the direct dependencies

* Use built in Laravel testing functionality

* update baseline
2023-05-23 09:25:17 -05:00
Tony Murray
02896172bd Bump version to 23.5.0 2023-05-19 10:32:19 -05:00
Tony Murray
75f8fe214f Slightly better OS module test output (#15001)
* Slightly better OS module test output
Maybe faster
Remove forced --debug in phpunit

* No assertions is ok

* Use always true assert instead

* Restore route poller module skip

* Sneaky whitespace
2023-04-27 14:49:52 -05:00
Jellyfrog
0a351b49fd Laravel 9.x Shift (#14504)
* Move `resources/lang` folder

* Shift registered middleware

* Remove `fruitcake/laravel-cors` dependency

* Streamline `$commands` property

* Upgrade to Flysystem 3.0

* Shift core files

* Convert `optional()` to nullsafe operator

* Remove unnecessary `$model` property

* Convert route options to fluent methods

Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.

* Convert deprecated `$dates` property to `$casts`

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Use `<env>` tags for configuration

`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.

Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/

* Fix error provider

* Match new symfony syntax

* Match upstream syntax

* Fix route syntax

* generate composer.lock

* Sync back configs

* routes

* composer

* Fix more flare

* fix cors

* sync lang

* Apply fixes from StyleCI (#14517)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* bump larastan

* update packages

* wip

* Temporarily lower phpstan level

* Update phpstan.neon

* wip

* wip

* wip

* Apply fixes from StyleCI (#14592)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test

* Update CiHelper.php

* Update test.yml

* Update CiHelper.php

* Update CiHelper.php

* Apply fixes from StyleCI (#14616)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test?

* fix phpstan problems

* dont run snmpsim on github ci

* Fix whitespace

* More whitespace

* More whitespace ???

* I think the space broke it

* fix the reset of the whitespace

* hard code auth guard

---------

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 06:51:35 -05:00
Nick Peelman
8a64526e34 Fix a bug when creating test data; if a community contained the strin… (#14739)
* Fix a bug when creating test data; if a community contained the string 'snmp', it would cause test data to not be generated.

Add line start/end anchors, and search for specific SNMP commands, instead of a snmp<wildcard>, and a couple of other minor tweaks...

* Fix unwanted 'g'
2023-04-16 13:42:26 -05:00