Commit Graph

1307 Commits

Author SHA1 Message Date
Jellyfrog
7e8e11f097 phpstan: new baseline (#15015)
* phpstan: new baseline

* wip
2023-04-28 17:13:55 +02:00
Olen
7ec37561c5 Ensure irc fifo-file is shared between dispatcher and core containers (#14647)
* Ensure fifo-file is shared between dispatcher container and core container

* Fix config path
2023-04-28 09:03:24 -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
Mathias Bøhn Grytemark
204abe0cf2 add advantech icr-os for advantech routers (#14171) 2023-04-25 07:54:41 -05:00
Jellyfrog
f271019f6c Add a validation for checking if the scheduler is running (#14987) 2023-04-24 10:04:50 +02:00
Tony Murray
a15a27da3a Fix scale_rigid accidentally being set to false (#14992) 2023-04-21 21:08:35 -05:00
Tony Murray
3fe3db747c Refactor billing (#14979)
* Refactor common billing code into a namespace
Prevents issues of usages where the code hasn't been loaded.

* remove redundant Billing in method names

* remove accidental duplication

* more use statements

* Style fixes
2023-04-21 19:52:47 -05:00
Tony Murray
2ddfba51dd Set ping_perf scale_min to 0 (#14989)
And allow scale_min, scale_max, and scale_rigid to be set via url parameter
2023-04-20 22:30:32 -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
Tony Murray
52f5f10231 Fix some lint issues (#14962) 2023-04-15 09:02:41 -05:00
Tony Murray
d83ba61408 Fix Legacy vars Processing (#14967)
if a var was set to 0, it would be set to "yes" instead of 0
2023-04-14 16:46:56 -05:00
AdamB
55b167562e Implement authentication for Redis/Sentinel (#14805)
* Implement ACL support for redis (and sentinel)

Currently, sentinel only works with anonymous connections.
Some parameters are passed when using sentinel, however these are
dropped on the floor.
This encapsulates them as py-redis expects, and passes them correctly.

* Pass username

* Differentiate duplicate error messages

* Actually pass var

* Docs and requirement bump

* Lint

* Consistency

* More lint

* Lint harder

* Doc Updates
2023-04-14 07:11:44 -05:00
Tony Murray
e9c08e21a5 Fix more divide by zero issues (#14954)
* Fix more divide by zero issues
fixes: 14932

* Round to the nearest integer, then cast

* Fix up dhcpatriot
2023-04-11 13:44:45 -05:00
Tony Murray
d09c5540ed Fix SnmpQuery and max_oid (#14955)
If the snmpget had less oids than the max, it would run them one at a time instead of all together.
2023-04-10 12:07:32 -05:00
Dan Baker
a340672e86 Added graphing of DDoS-protection related OIDs for PAN-OS (#14847) 2023-04-06 19:11:16 -05:00
Tony Murray
d6e1c6ee5f Bump version to 23.4.0 2023-04-06 18:52:52 -05:00
Jellyfrog
68e0b3df28 Apply fixes from StyleCI (#14899)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-03-13 22:32:22 +01:00
Tony Murray
d3f02e6bb7 SnmpQuery, respect snmp.max_oid (#14894)
Previously, the code would query all the oids it received. Now it will split it up into multiple queries if too many are sent.

Prevents some devices snmp service from crashing.
2023-03-13 10:17:34 -05:00
not-known
2a4c50ed19 Jira transport: use template title (#14883)
* Use the title from the Alert Template for the Jira Transport if not empty or else use the default title

* Use the title from the Alert Template for the Jira Transport if not empty or else use the default title

* Fix style

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-03-13 05:07:29 +02:00
Jellyfrog
f111ac22fe APC: Add support for Battery Recommended Days Remaining (#14653)
* APC: Add support for Battery Recommended Days Remaining

* Extract number from string later during polling
Odd that this is different from the discovery process

* wip

* wip

* Apply fixes from StyleCI

* wip

* wip

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-03-10 14:50:56 +01:00
Peter Childs
d35679d991 add poller_groups (served) to the poller_cluster table (#14886) 2023-03-09 17:20:49 +01:00
Henne Van Och
2140ff21c5 add more docker stats (#14767) 2023-03-01 01:02:01 +01:00
electrocret
c0fd1e15e2 Fix Alertlog messaging (#14861) 2023-02-24 13:10:10 +01:00
GeantRA
2da5d4505b Refactored Juniper SLA to include support for TWAMP and remove ambigu… (#14787) 2023-02-24 13:09:52 +01:00
Tony Murray
c91b9b64d7 Bump version to 23.2.0 2023-02-23 16:27:42 -06:00
Timo Reimann
4b2fb79c1e Fix MS Teams alert transport, correct HTTP header (#14843)
* Fix Msteams.php

Microsoft rejects webhooks without correct Content-Type since beginning of January. This PR fixes the behaviour and makes Teams webhooks working again.

* Update Msteams.php

Fix StyleCI issue
2023-02-14 07:51:16 -06:00
Hans Erasmus
c330f91e01 Fix empty output on validation test (#14822)
* Fix empty output on validation test

* tried to fix indentation issue

* tried to fix indentation issue again

* tried to fix stylci test error

* remove trailing spaces

* Applied styleci diff
2023-02-01 10:52:36 -06:00
Alexandre Novakovski
48be858bf2 Telegram: Add support for topics (#14804) 2023-01-26 15:28:41 +00:00
Zane C. Bowers-Hadley
98c033e84f CAPEv2 support (#14801)
* re-add it

* add cape app page

* add initial cape graphs

* now work for the general page

* more udpates

* add cape pending

* add pending and cleanup for if there are no packages(likely cuckoo, so don't add extra items)

* rework the lack of packages a bit more

* more cuckoo related cleanupgiot

* fix cape error logging

* minor cleanups

* add a new graph and use it with cape... also lots of cape cleanups

* misc cape updates

* add percentile values for stats

* add fix for weekly

* don't display 1 day average if under 17 hours

* zero timeslots of packages not used for this time slot

* add avg stat graphs for cape

* now use the average graphs and update the app page

* add a new graph

* add CAPEv2 docs

* add tests data

* lots of style cleanup

* another tweak for the test data

* fix misc style issues

* add cape to apps page

* add nicecase for cape

* case fix

* json fix for test data

* add a missing stat

* some more test data tweaking

* more misc test updates

* more test tweaking

* more test work...

* more test data work

* add what is hopefully the final test tweak
2023-01-24 11:20:18 -06:00
Tony Murray
040ebcf917 Bump version to 23.1.0 2023-01-24 10:43:30 -06:00
carbinefreak
d869b879d1 Nokia PMC Microwave Improvements (#14761) 2023-01-19 23:31:57 +01:00
not-known
87a062a48d Stop net-snmp from interpreting the octet-string from rttMonEchoAdmin… (#14676) 2023-01-10 16:42:54 +01:00
Nick Peelman
d21d4422b4 Add AXOS sensor data for PON Transceivers (the only transceivers Cali… (#14741) 2023-01-02 11:24:59 +01:00
Tony Murray
8b4263f2f3 Bump version to 22.12.0 2022-12-28 12:26:21 -06:00
Tony Murray
15fbd3adb2 Update PHP dependencies (fix dependencies on PHP 8.2) (#14759)
* Update dependencies (fix dependencies on PHP 8.2)
  - Removing fgrosse/phpasn1 (v2.5.0)
  - Removing php-cs-fixer/diff (v2.0.2)
  - Upgrading barryvdh/reflection-docblock (v2.0.6 => v2.1.0)
  - Upgrading brick/math (0.9.3 => 0.10.2)
  - Upgrading composer/ca-bundle (1.3.3 => 1.3.4)
  - Upgrading composer/composer (2.4.1 => 2.5.1)
  - Upgrading composer/pcre (2.0.0 => 3.1.0)
  - Upgrading composer/xdebug-handler (2.0.2 => 3.0.3)
  - Locking dflydev/dot-access-data (v3.0.2)
  - Upgrading doctrine/annotations (1.13.3 => 1.14.2)
  - Upgrading doctrine/event-manager (1.1.2 => 1.2.0)
  - Upgrading doctrine/inflector (2.0.5 => 2.0.6)
  - Upgrading dragonmantank/cron-expression (v3.3.1 => v3.3.2)
  - Upgrading fakerphp/faker (v1.20.0 => v1.21.0)
  - Upgrading filp/whoops (2.14.5 => 2.14.6)
  - Upgrading friendsofphp/php-cs-fixer (v3.4.0 => v3.13.1)
  - Upgrading guzzlehttp/psr7 (2.4.1 => 2.4.3)
  - Upgrading laravel-notification-channels/webpush (5.1.1 => 7.0.0)
  - Upgrading laravel/dusk (v6.25.1 => v6.25.2)
  - Upgrading laravel/framework (v8.83.23 => v8.83.27)
  - Upgrading laravel/serializable-closure (v1.2.1 => v1.2.2)
  - Upgrading laravel/socialite (v5.5.5 => v5.5.6)
  - Upgrading laravel/tinker (v2.7.2 => v2.7.3)
  - Upgrading league/commonmark (1.6.7 => 2.3.8)
  - Locking league/config (v1.2.0)
  - Upgrading league/flysystem (1.1.9 => 1.1.10)
  - Upgrading librenms/laravel-vue-i18n-generator (0.1.47 => 0.1.48)
  - Upgrading minishlink/web-push (v6.0.7 => v7.0.0)
  - Upgrading nesbot/carbon (2.62.1 => 2.64.0)
  - Locking nette/schema (v1.2.3)
  - Locking nette/utils (v3.2.8)
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2)
  - Upgrading nunomaduro/larastan (1.0.3 => 1.0.4)
  - Upgrading pear/net_dns2 (v1.5.2 => v1.5.3)
  - Upgrading php-amqplib/php-amqplib (v3.2.0 => v3.4.0)
  - Upgrading php-webdriver/webdriver (1.12.1 => 1.13.1)
  - Upgrading phpdocumentor/type-resolver (1.6.1 => 1.6.2)
  - Upgrading phpmailer/phpmailer (v6.6.4 => v6.7.1)
  - Upgrading phpseclib/phpseclib (3.0.16 => 3.0.18)
  - Upgrading phpstan/phpstan (1.8.5 => 1.8.11)
  - Upgrading phpunit/php-code-coverage (9.2.17 => 9.2.22)
  - Upgrading phpunit/phpunit (9.5.24 => 9.5.27)
  - Upgrading psr/cache (1.0.1 => 3.0.0)
  - Upgrading psr/container (1.1.1 => 1.1.2)
  - Upgrading psr/log (1.1.4 => 2.0.0)
  - Upgrading psy/psysh (v0.11.8 => v0.11.10)
  - Upgrading ramsey/collection (1.2.2 => 1.3.0)
  - Upgrading ramsey/uuid (4.2.3 => 4.7.0)
  - Upgrading sebastian/comparator (4.0.6 => 4.0.8)
  - Upgrading sebastian/exporter (4.0.4 => 4.0.5)
  - Upgrading sebastian/type (3.1.0 => 3.2.0)
  - Upgrading socialiteproviders/manager (v4.1.0 => v4.2.0)
  - Locking spomky-labs/pki-framework (1.0.1)
  - Upgrading symfony/console (v5.4.12 => v5.4.16)
  - Upgrading symfony/css-selector (v5.4.11 => v6.2.0)
  - Upgrading symfony/deprecation-contracts (v2.5.2 => v3.2.0)
  - Upgrading symfony/error-handler (v5.4.11 => v5.4.15)
  - Upgrading symfony/event-dispatcher (v5.4.9 => v6.2.2)
  - Upgrading symfony/event-dispatcher-contracts (v2.5.2 => v3.2.0)
  - Upgrading symfony/filesystem (v5.4.12 => v6.2.0)
  - Upgrading symfony/http-foundation (v5.4.12 => v5.4.16)
  - Upgrading symfony/http-kernel (v5.4.12 => v5.4.16)
  - Upgrading symfony/mime (v5.4.12 => v5.4.16)
  - Upgrading symfony/options-resolver (v5.4.11 => v6.2.0)
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0)
  - Upgrading symfony/routing (v5.4.11 => v5.4.15)
  - Upgrading symfony/stopwatch (v5.4.5 => v6.2.0)
  - Upgrading symfony/string (v5.4.12 => v6.2.2)
  - Upgrading symfony/translation (v5.4.12 => v5.4.14)
  - Upgrading symfony/var-dumper (v5.4.11 => v5.4.14)
  - Upgrading tecnickcom/tcpdf (6.5.0 => 6.6.2)
  - Upgrading tijsverkoyen/css-to-inline-styles (2.2.4 => 2.2.5)
  - Upgrading vlucas/phpdotenv (v5.4.1 => v5.5.0)
  - Upgrading web-token/jwt-core (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-key-mgmt (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-signature (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-signature-algorithm-ecdsa (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-util-ecc (v2.2.11 => 3.1.4)

* Remove Net_DNS2_Resolver workaround
2022-12-28 02:03:59 -06:00
electrocret
07e2ce5fc1 Polling poller debug (#14691)
* Add poller_name to debug

* Documentation

* Clarify debug output var is for traceroute.

* Fix -hopefully

* StyleCI
2022-12-15 21:48:43 -06:00
Tony Murray
8ea3f5cd06 Offer opt in to usage and error reporting during install (#13906)
and on the about page
2022-12-15 19:52:22 -06:00
Tony Murray
510f9d340d Fix ArubaInstance channel decode issue (#14732)
* Fix ArubaInstance channel decode issue
PHP no longer implicitly casts in this situation

* missing import
2022-12-15 19:36:57 -06:00
Tony Murray
e84b2c0c75 Number Casting allow preceding space (#14699) 2022-12-15 16:01:01 -06:00
Tony Murray
1d3440b943 Unify time interval formatting (#14733)
* Unify time interval formatting
Use carbon for formatting, it supports locales.

* fix style

* remove baseline exceptions

* fixes found by lint
2022-12-15 15:52:53 -06:00
Tony Murray
2aa44217d0 Release notes internal features category (#14700) 2022-12-05 14:15:53 -06:00
Tony Murray
e8c3b2c924 Improve SnmpResponse value() (#14605)
* Improve SnmpResponse value
Can now return a specific oid or the first non-empty oid in a list.
Cache values() call on object to avoid repeated parsing
Improved types

* fix style

* extract getOidParts to fix errors from different parts of the code parsing differently

* new object to deal with cache

* More tests

* whitespace

* style
2022-11-30 19:50:46 -06:00
electrocret
fb3c2ecb1c Add traceroute -I flag (#14667) 2022-11-28 08:54:00 -06:00
Tony Murray
bea0389938 Bump version to 22.11.0 2022-11-24 00:01:26 -06:00
Tony Murray
7635ace4fa Split out lnms snmp convenience commands (#14603)
* Split out lnms snmp convenience commands

* Use SnmpQuery->valuesByIndex()

* Fix style
2022-11-19 22:10:25 -06:00
Noah Roufus
359e00f602 Adjusted PMP to accomodate various other 450 models. (#14652) 2022-11-18 16:30:05 -06:00
Tony Murray
752bbc1531 Port search API search more than one fields (#14646)
* Fix port search columns

* Port search API search more than one fields
Fixup port APIs
Change validate_column_list api helper to throw a renderable exception on error and return the valid columns
DeviceCache::get() can handle a bigger range of input

* whitespace

* Refactor exceptions a bit

* change throws type to be more generic

* Lint fixes
2022-11-18 16:27:56 -06:00
Tony Murray
1dbe8cf0fa DeviceCache::get() allow hostname (#14649)
* DeviceCache::get() allow hostname

* whitespace fix
2022-11-18 12:09:56 -06:00
Josh Silvas
4107b37b9d Adds Cisco DHCP Server SNMP MIB and Trap Handlers. (#14618)
* Adds API call to update port notes on devices.

* Adds Cisco IETF-DHCP Server MIB and Trap Handlers.

* Updates local permissions changed.

* Linting cleanup.

* Moves test to a single file. Updates the args to match the status.

* Fixes tests failing for Cisco DHCP server SNMP traps.
2022-11-18 00:15:42 -06:00