* 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
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* Module status helper
* Correct reference
* Rename function to make it more explicit
* Same for exists checks, normalize argument names
* Use new functions
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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
* 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>
* 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'