19706 Commits

Author SHA1 Message Date
26318dc4b3 Improve trap testing (#14546)
* Improve trap testing
Add helper log() to Trap
Avoid saving to the database at all

* style

* Move all traps to $trap->log()

* Update tests

* Lint and style fixes

* Use correct partial mock call

* more style

* Add docs

* debug in ci

* use the correct log function....................

* all, I guess

* not the first??

* 3rd?

* use event_id to order
2022-11-05 14:43:54 -05:00
7f3301caa4 Device - Basic hatteras dslam integration (#14115)
* basic hatteras dslam integration

* snmprec and json test files

* fix HN4000e variant

* add hn4000e variant

* logo and yaml fixes

* change type in test file

* inexistent(?) disco module removed: route

* Update hatteras.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-11-05 14:43:23 -05:00
009d69a48d Use Collection instead of collect() (#14527)
* Use Collection instead of collect()

* wip
2022-11-05 10:04:36 +01:00
e5e169358f SnmpQuery Handle empty oids in get more gracefully (#14577) 2022-11-05 00:38:20 -05:00
78d6ed49ee Fix some icons (#14584)
fa-info icons, update to FA6 style
2022-11-04 23:13:36 -05:00
35bea945ba SnmpQuery fix mib directory order (#14580) 2022-11-04 23:12:56 -05:00
1f1efa55f2 Add snmp_flags and tips on string oids to the docs (#14579)
* Add snmp_flags and tips on string oids to the docs

* refinements, strongly suggest yaml
2022-11-04 20:22:50 -05:00
6cbe6fde4f Mock astext (#14581)
* Mock astext
avoid dns failures

* whitespace

* fix arista

* restore test data except astext

* restore test data except astext

* Full fresh run

* Move DI call into class
2022-11-05 01:18:52 +01:00
126696e26b Fix APC current divide by zero (#14578) 2022-11-04 11:18:29 -05:00
bca7591084 Added Fortigate SD-WAN Health checks (#14456)
* Added Fortigate SD-WAN Health checks

* Add unit test

* Fix for displaying user description when F2A isnt used

* Revert "Fix for displaying user description when F2A isnt used"
This reverts commit d9f170d7e600559e17970c0f6855b35bf4f76a88.

* Fix for displaying user description when F2A isnt used

* Fixing comments

* Requested changes, with modified tests

* adding the correct tests

* fix tests

* fix tests

* Testing issue resolved

* fixing tests
2022-11-04 10:41:06 -05:00
0f34c144cf Update license section of readme (#14571)
Bumped year to 2022
2022-11-04 01:39:17 +01:00
539ef9ff90 Fix graph errors wrong content type (#14574)
Some code was returning too soon and messing up the return type
Other code was simply not setting it
2022-11-03 15:07:17 -05:00
95e81a53a8 Fix device bits overview when no ports are included (#14573) 2022-11-03 13:29:17 -05:00
2fb81ce429 Fix graph previous period getting partially applied (#14572) 2022-11-03 12:33:29 -05:00
24c36ffcf4 [About] Open Laravel and RRDtool link in new tab (#14568) 2022-11-03 15:31:39 +01:00
511e345321 API graphs, variable whitelist (#14552)
* API graphs, variable whitelist
Restore several missing parameters that relied on graphing code fetching from $_GET directly.
Whitelist valid parameters to set on the request get
Move common parameter handling into common code

* Fix style

* Include previous
2022-11-03 01:08:52 -05:00
0c365d08e3 SnmpQuery numeric accept a boolean (#14565) 2022-11-02 18:50:46 -05:00
bd4c2d70fb McAfee Web Proxy with COUNTER rrd_type on sensors (#14529)
* webGw1

* rrd_type for mcafeewebgateway.yaml

* update tests
2022-11-02 18:45:52 -05:00
ce6eaadc2a More Replacement Capabilities for sensor index computation (#14522)
* More Replacement Cap.

style

* more compact

* fix mni.yaml

* too compact, revert

* quantastor

* str_replace was never matched
2022-11-02 16:54:40 -05:00
51fcd8f6a0 Don't poll sysDescr, sysObjectID, and sysName (#14562)
sysDescr, sysObjectID should not change unless the device is swapped, which would need  a rediscover anyway.
sysName is not needed, polling here overwrites custom sysName discovery.
Poll sysDescr, sysObjectID if they are not filled (poller run before discovery) as they are required for a lot of code to work right.
2022-11-02 14:33:18 -05:00
de9787ea9a Added support for Vultan Environmental Monitoring units (#14401)
* adding new os: vutlan

* renaming mib file, moving mib file to vendor folder, removing commented code

* Cache version data (#14404)

* Cache version data
Calling cli commands can be expensive, cache the results.

* style fixes

* Fix pre-laravel usage

* fix lint

* Revert "Cache version data (#14404)"

This reverts commit e426a9299db1dd4252bf0785f7ed193f3c46a308.

* fixing descr for door state and removing comments

* adding tests and moving vutlan definition file

* adding num_oid value for tests

* Rename VUTLAN-SYSTEM-MIB.mib to VUTLAN-SYSTEM-MIB

* Update vutlan_vt825.json

* updating test data

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-11-02 19:31:12 +01:00
7612aa7d86 Support regex in os field replace (#14563)
* Support regex in os field replace

* Support regex in os field replace
2022-11-02 12:32:36 -05:00
a00ad931ab Github tests log improvement (#14559)
* Github tests log improvement
Don't fail when dumping non-existent log file

* Update test.yml
2022-11-02 17:09:18 +01:00
2dea36f70f Remove graph_min (#14561)
* Remove graph_min
it doesn't do anything
(scale_min sets minimum graph scale)
(graph_max shows a line at max on some graphs)

* fix style
2022-11-02 09:55:28 -05:00
b04211bf73 Fix scale when it is zero (#14560) 2022-11-02 09:11:23 -05:00
e938458cde Fix BaseApi uninitialized (#14557) 2022-11-02 09:02:52 -05:00
3a61955658 Fix Type error (#14555)
Fix production.ERROR: Typed property App\ApiClients\BaseApi::$client must not be accessed before initialization
cf. https://stackoverflow.com/a/59265626/3236342
2022-11-02 14:40:05 +01:00
95a0050074 Remove $_GET from graphs (#14554)
Fixes issues setting variables in other contexts
2022-11-02 08:24:42 -05:00
624ebf8d55 Extend EfficientIP SolidServer support (#14549) 2022-11-02 08:24:39 +01:00
a63b12a00d XSS sanitize pwrstatd application script inputs (#14545)
* XSS sanitize pwrstatd application script inputs

* Removing is_int logic
2022-11-01 20:33:17 -05:00
b59cf980ca Type API methods and properties (#14476)
* Type properties

* Comment method

* Update base_uri child property

* Update BingApi.php

* Update GoogleMapsApi.php

* Update MapquestApi.php

* Update NominatimApi.php

* Update RipeApi.php

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Fix indent

* Fix escaping

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* StyleCI indent

* Update phpstan-baseline.neon

* Make possible for $client to be null

* Remove comments

* Remove comments

* Remove comments

* Update MapquestApi.php

* Update NominatimApi.php

* Remove comments

* Remove comments

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type $client

* Type method and properties

* Remove errors not matched anymore

* Fix type errors in graylogapi

* Mixed can't be ORed

* uri never null

* Update app/ApiClients/GraylogApi.php

* Fix getAdresses Type

* Collection changed its folder?

* Fix directory, there was just a backslash missing

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-11-02 01:06:15 +01:00
70d37adf66 Add connection exception handling to all redis calls (#14467) 2022-11-02 01:04:33 +01:00
5a69ac687d Add check_hetzner_storagebox to includes/services (#14463)
When using check_hetzner_storagebox (https://github.com/muensmedia/check_hetzner_storagebox) the -H can not be passed.
2022-11-02 00:59:59 +01:00
f4860ac999 Open the contributor list link in a new tab (#14553) 2022-11-01 16:51:01 +01:00
07cc9f4cdc Fix XSS in api access (#14551)
api access page didn't escape username allowing for injection.
2022-11-01 11:20:08 +01:00
e864ed7795 Fix graph font sizes (#14550)
flipped big and small
2022-10-31 21:01:35 -05:00
7d9f22705f Memcached application improve error visibility (#14536) 2022-10-31 08:13:41 -05:00
55d81fde1e Improve embedded graph title handling (#14544)
* Do not always show graph title.
Setting the default title too early cause the titles to always be shown.
AFAIK, they should only be shown when:
 - title is set by the user or graph itself (not 100% sure)
 - the title variable is set

* Use default for empty titles too

* Don't clean titles so aggressively

* Only show title if explicitly shown

* A little more consistent default titles

* use built-in escape

* Actually show user titles if set
Handle single quotes in title

* initialize title

* $title doesn't need to be nullable
add method getTitle() to always get some text

* Revert incorrect formatting change

* whitespace fix
2022-10-30 23:56:17 -05:00
d28b1cac3f Adding systemd application (#14540) 2022-10-30 14:18:02 -05:00
437322f8cb TAIT-Infra93 - Fix state + skip_values for Battery (#14541) 2022-10-30 11:13:41 +01:00
4b65dc41d2 Graphing cleanup (#14492)
* WIP

* Fixes and cleanups

* Move parseAtTime to Time util class

* lint fixes, explicitly define variables

* Style fixes
2022-10-28 08:06:29 -05:00
d5fcf53e01 Correct variable use in billing (#14533) 2022-10-28 12:55:37 +02:00
b90fbcb9bf Undefined array key fixes (#14532)
* Undefined array key fixes

* Update check-services.php
2022-10-27 21:02:27 +02:00
0dd183f1e1 fix awplus ntp polling bug (#14521)
tries to count an integer :/
2022-10-26 20:47:46 +02:00
0470b03456 fix bke yaml file (#14524) 2022-10-26 19:05:07 +02:00
7436ef4425 Added support for additional Moxa EDS-P model (#14523) 2022-10-26 10:44:08 +02:00
339e3c28be Add a few breaks to avoid connection flooding for the irc-bot (#14479)
* Add a few breaks to avoid connection flooding

Adding a few sleep()s in the connection loop to avoid connection flooding on errors.

* Add lost bracket

* Add linebreaks to please StyleCi

* More Ci
2022-10-25 16:10:35 -05:00
c2678c1b6c EES Rectifier various fixes from MIB + added tests (#14519)
* EES fixes from MIB + added tests
* Another typo
* Another typo + Tests
* Update ees_v2-2-12.json

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-10-25 23:01:05 +02:00
b450f5e543 Fix sensor limit linked port rules in collection(#14520)
Escape the sensor_limit properly
2022-10-25 23:00:36 +02:00
334150ec17 Disable super-linter PHP lint (#14518)
* Disable super-linter PHP lint
It does not support PHP 8.1 yet.

* remove variable completely
2022-10-25 14:00:55 -05:00