Commit Graph

1847 Commits

Author SHA1 Message Date
Slashdoom
1f7d5451a2
Add VLAN Discovery for arubaos-cx (#15055)
* add vlan discovery for arubaos-cx

* style fixes

* style fixes

* string interpolation fix

* status walk not used

* add snmprec for 10.10 + vlans

* Create arubaos-cx_10.10.json

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2023-07-24 21:47:46 -05:00
Zane C. Bowers-Hadley
40cceee8b4
update SMART monitoring to the use JSON (#15132)
* rework into a json app and support the old style

* working now

* add health checking

* add some datapoints to make writing alerts easy

* add a few missing item for has checks

* rework the app page

* use the right var for id9

* print the self test log if we have it

* add a graph for the max temp

* display the max temp graph

* display the health pass in the disk list if we have the data

* fix legacy handling and set app as ok

* replace id190 and id194 with the more useful maxtemp graph on the apps page

* don't print the additional info area for legacy extends

* add id232

* add id252 graph support

* properly display id232 now

* do not display SSD graphs for non-SSD disks

* for legacy extends, make sure we don't have a bad line

* add missing label for Product value

* fix metrics

* rework the metrics stuff a bit more

* typo fix

* more smart metrics cleanup

* add exit info to metrics

* style cleanup and logic checking for when disks are all now fine

* fix checking for no more health errors

* update the docs for SMART for v1 and remove slightly pointless notes about useSN

* update the docs

* initial test stuff

* add missing tests for the legacy code

* save if it it is legacy or not

* style cleanup

* update the smart legacy test

* style cleanup

* more test tweaking

* some more style cleanup

* more test fixes

* correct the disk ID for the legacy test da0 -> Z304VCFY

* more tests update

* more test cleanup

* begin cleanup of the v1 tests

* more v1 test updates

* more tests for v1

* more test cleanup

* fix exit_nonzero and add unhealthy metric

* add smart alerts

* add the metric unhealthy to the stat test

* use app data for the smart-common.inc.php
2023-07-24 17:03:45 +02:00
fbourqui
a978476cda
Fortigate ipv6 ipsec (#15150)
* Squash Commit
Fortigate Mib updates and ipsc ipv6 tunnels stat
test data to go allong with it

* add optional -Ih flag

* lint fix

* revert changeed on test data 500d

* fix test data on 60f3g4g
2023-07-20 07:50:49 -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
Zane C. Bowers-Hadley
2ac9a634b4
Logsize monitoring for LibreNMS (#15137)
* add logsize poller

* add set size info

* add more stats

* add min size

* more logsize files

* add logsize

* fix creating log file links

* add two new graphs

* add some graphs

* add no_minus_d

* add no minus d to app page

* add count of log files

* save logsizes in app data

* rename title log sizes

* only show top 12

* add mean median and mode

* cleanup naming a bit

* the values for the files hash is now a int instead of another hash

* add new stats and correct median name

* now properly handle unseen

* fix logsize bits

* add combined

* update metrics and add some tests

* add logsize graphs to apps page

* add the logsize bit

* add logszie docs

* add some example alert rules

* style cleanup

* more style cleanup

* fix a few things for metrics and update the test

* fix a variable name in the test and update the data
2023-07-19 22:02:23 -05:00
Tony Murray
1d7d241894
Add Calix E7 (EXA) PON port sensors (#15145)
* Add Calix E7 (EXA) PON port sensors

* oops

* remove space

* skip sensors on down ports

* fix state generic values

* 10 oid was breaking... change to 8 max

* Add initial divisors... need to double check

* change power to dbm as it is more useful

* Add bias and limits

* Test data

* change skip value
2023-07-17 08:54:04 -05:00
AdamB
b27dfa5891
Add support for PrimeKey Software Appliance (#15059)
* Add PK-SOFTWARE-APPLIANCE-V2 MIB

* Add support for PrimeKey Software Appliance

* Move file to correct path

* Make the OS detection more specific

* Thanks vscode

* Sync filename with osname

* Not supported

* Track SQL database size as volume

* Two fixes
2023-07-07 23:35:53 -05:00
Sander Blomvågnes
8081a3f3c8
Change state value for unplugged linecard (#15126) 2023-06-28 14:24:59 +02:00
Zane C. Bowers-Hadley
00cf300d1a
add Suricata Extract submission stats app (#15105)
* add suricata_extract

* convert from dervive to gauge and use delta

* add suricata_extract to includes/html/pages/apps.inc.php

* graph cleanup

* add sub_size

* add sub_size graph

* add docs for suricata extract

* add tests for suricata_extract

* add rules for suricata extract

* minor test tweaks
2023-06-25 20:48:26 +02:00
Cyril LAVIER
dc7b702bd8
Add regex for Supermicro switches running firmware 2.0 or newer, now called "SuperSwitch" (#15083)
* Add regex for Supermicro switches running firmware 2.0 or newer, now called "SuperSwitch".

* Add test data for Supermicro MBM switch
2023-06-24 12:22:59 -05:00
Tony Murray
0a3678d11a
Convert several JunOS sensors to yaml (#15118)
* Convert several JunOS sensors to yaml
Fixes some issues with the php code and reduces extra snmp fetches

* Convert several JunOS sensors to yaml
Fixes some issues with the php code and reduces extra snmp fetches

* Convert BER as well
Allow divisor and multiplier to be set from oid

* use fillValues

* fix

* sort snmprec, fix divide by 0, add more context
2023-06-24 11:52:36 -05:00
Zane C. Bowers-Hadley
f84fca697c
add Privoxy stats support (#15114)
* add privoxy

* various style fixes

* cleanup option bar

* save metrics for privoxy now

* add instructions for privoxy

* add privoxy test data

* regen the test data

* add a few missing depends to the instructions

* add apps.inc.php entry for privoxy

* note the required log settings for privoxy

* style fix
2023-06-23 15:27:28 -05:00
Wheel
106219d9cb
APC new sensors (#15090)
* APC Emu dry contacts

* EMU test files

* Added energy and power sensors

* Revert "Added energy and power sensors"

This reverts commit b27b4a3ac2.

* Total energy sensor
2023-06-23 15:08:48 -05:00
mtentilucci
278890ce0a
update mlos-nsp discovery (#15117) 2023-06-23 14:43:03 -05:00
Zane C. Bowers-Hadley
5da8e70bf4
add Sneck support, making it very trivial to use Nagios style checks in a NRPE like manner (#13954)
* code stuff done for Sneck

* whoops, correct the abs value post adding it post rrd update

* return a array for getting the sneck data and nicely print the raw return value

* add test stuff and freeze time at 1650911765 for tests

* move the freezeTime

* add use Illuminate\Support\Carbon;

* more test changes

* rework freezeTime a bit more

* more test stuff

* another test

* rework it a bit again

* correct variable spelling for $time_diff

* remove freezeTime as we are using a old version of Laravel

* finalize graphs

* misc

* finalize sneck page

* mve the sneck tests as it needs a newer version of laravel than we are using

* add documents for sneck

* finalize the poller

* formatting cleanup

* correct comment type

* correct the spelling of description

* more documentation

* save the check returns as metrics

* add some more examples

* fix some of the sneck alerts and add a few more examples

* turn off time to polling by default

* suggest using ntp if enabled

* since we are zeroing time_to_polling by default, this now works

* backout some suggested changes for once we change to larval 9

* remove del_sneck_data as it is no longer used

* add more docs on the metrics

* php-cs-fixer to fix a few things

* update and fix sneck tests

* remote a metric from the test

* another minor tweak to the test

* one more minor change

* ahh! derp! think I found it finally... hopefully hanging this for the last time...

* now use app data

* now logs check changes

* add a missing )

* add a missing )

* some style fixes

* update the sneck page use to the app data stuff

* update the poller to use the new app data

* misc

* update sneck to log check status changes

* correct alert log messages

* correct a comment

* fix metrics

* derp, another fix

* test fix

* re-order to avoid warning

* poller update

* update sneck graphs

* update sneck graphs

* remove a unneeded line

* test update for discovery

* minor tweaks to the test and fix update the polling a bit

* style fix

* fix return data printing

* fix the test data to include app data

* attempted test fix

* add config def to apps.sneck.polling_time_diff

* cleanup docs a bit

* minor config tweaks

* minor doc cleanup
2023-06-15 09:06:28 -05:00
Justin Lentz
b0ddd4ef15
Extend Avocent Support (#14914)
* Add files via upload

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Rename ACS6000-MIB to ACS-MIB

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Update avocent.yaml

* Create avocent_acs6048.snmprec

* Create avocent_acs6048.json

* Delete avocent_acs6048.json

* Same as avocent_6000

* Point at ACS MIB

ACS-MIB::acsSerialPortTableName

* Update avocent_6000.snmprec

Update avocent_6000 with additional MIB

* Update Test data

* Update avocent_6000.snmprec

* Update avocent_6000.snmprec

* Update avocent_6000.json
2023-06-14 22:50:44 -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
Garcia MICHEL
e547945985
Improve OpenWRT detection (#15096)
* Improve OpenWRT detection

* Add test data

* Remplace openwrt date with new one
2023-06-12 13:59:24 +02:00
Zane C. Bowers-Hadley
0ed68e33de
add Linux Softnet Stat app (#15094)
* add linux_softnet_stat poller

* add graphs and app page for linux_softnet_stat

* fix polling

* rename a few items, clean up the app specific page, and add to the apps page

* convert from derive to counter

* save the budget and budget_usecs to app data

* display current value of the budgets

* now track budget values

* add tests data

* rename it

* add docs for Linux Softnet Stat

* re-order and add budget for app page graph order

* style fix

* correct data location

* fix metrics for the json
2023-06-11 16:37:55 +02:00
Zane C. Bowers-Hadley
3190bdb8b2
add ZFS L2 support (#15095)
* add alerts for ZFS

* add initial l2 bits to the poller for zfs

* more minor tweaks to the ZFS poller

* more zfs bits

* add new ZFS graphs

* begin adding L2 stuff

* add linux_zfs-v3 bits

* update zfs app page

* style fix

* update the data for the zfs legacy test

* test update for zfs v1

* fix some zfs tests

* more zfs v3 test cleanup

* another zfs v3 test data fix

* more zfs v3 test data cleanup

* more test tweaks
2023-06-11 16:32:28 +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
d-k-7
dd3ed41319
add sensor support for cefcModuleOperStatus (#15026)
* add sensor support for cefcModuleOperStatus

* add tests for cefcModuleOperStatus

* revert sensors/state/cisco.inc.php

* add sensor support for cefcModuleOperStatus using yaml

* update tests for cefcModuleOperStatus

* try adding tests again for cefcModuleOperStatus

* include CISCO-ENTITY-FRU-CONTROL mib for cefcModuleOperStatus sensor state discovery
2023-05-24 20:43:37 +02:00
Jellyfrog
153be4d583
Tests: Fix Dusk tests after 13626 (#15057) 2023-05-23 19:23:15 +02: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
Nick Peelman
da94ac5a85
Add RoomAlert 12E Switch Sensors, fix Humidity Sensor (#15049)
* Add RoomAlert 12E Switch Sensors, fix Humidity Sensor

* Fix per murrant

* Revert port data generated on older install

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-05-19 10:14:09 -05:00
Tony Murray
38c29e0222
Reduce OS module test noise (#15046)
* Reduce os module test noise
JSON stores 1.0 as 1, so format the actual data in the same way.
Add tests too to make sure this behavior doesn't break

* Only change floats
2023-05-19 09:57:39 -05:00
mtentilucci
e55c4e9e1e
Add support for Trellix NSP devices (#14964)
* Add support for Trellix NSP devices

- Add discovery for mlos NSP devices
- Monitor port statistics from non standard MIBs
- Add Trellix MIBs
- Add test data

* Fix StyleCI findings

* Rename MIB files to match MIB names, remove unused MIBs

* regenerate mlos-nsp_ns9500.json to account for changes from PR#14963
2023-05-16 17:25:29 -05:00
cjsoftuk
635acad7d6
Firebrick CPU Monitoring (#15030)
* Add FB CPU definition.

* Poll in the right OID.

* Add test data for FB CPUs.
2023-05-09 17:32:34 +02:00
bnerickson
56e9fa3742
Adding linux_config_files application support (#14776) 2023-05-09 10:23:49 -05:00
cjsoftuk
927446db7b
Fix Firebrick mempool polling (#15022)
* Add support for Firebrick memory monitoring.

* Add mempool testing for Firebrick.

* We have to specify the OID by numeric, because otherwise it assumes it's some kind of indexed table.

* Specify by OID.

* Fix test result data for the FB mempools.x

* Firebrick reports in KB.

* Fix precision in the tests.
2023-05-02 14:02:50 -05:00
cjsoftuk
bc310cffec
WIP: Add support for memory monitoring on Firebrick platform (#15021)
* Add support for Firebrick memory monitoring.

* Add mempool testing for Firebrick.
2023-05-02 07:12:09 -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
Tony Murray
2f39917f3b
Fix up icr-os outdated test data (#15006)
* Fix up icr-os outdated test data

* fix sensor data too
2023-04-25 20:53:17 -05:00
Mathias Bøhn Grytemark
204abe0cf2
add advantech icr-os for advantech routers (#14171) 2023-04-25 07:54:41 -05:00
ollb
d40c3be75d
Fix cisco dbm sensors port link on discovery (NCS55A2) (#13965)
* Fix cisco dbm sensors port link on discovery (NCS55A2)

dBm sensors were not linked to port on Cisco NCS55A2 platform (iosxr)
causing false alarms triggered by optical modules in administratively shut down ports.

* Delete iosxr_ncs55a2.json

* Create iosxr_ncs55a2.json

* Renew test/data/iosxr_ncs55a2.json

* Delete and recreate test/data/iosxr_ncs55a2.json

With command :

  ./scripts/save-test-data.php -o iosxr -v ncs55a2 -m os,ports,processors,mempools,sensors

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 11:08: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
AdamB
519fc00367
Change ESXi port naming to be stable (#14639)
* Change ESXi port naming to be stable

Currently every time discovery runs against ESXi, the port names change generating a lot of log spam.

This is because ESXi uses this as the ifDescr:
```Device vmnic1000202 at 01:00.0 nmlx4_en```

The poller parses this, and extracts the interface name, whereas discovery does not, causing the interface names to flip every 6 hours.
https://github.com/librenms/librenms/blob/22.10.0/includes/polling/ports.inc.php#L578-L580

This change gives the discovery process the same behaviour, so the naming is now stable.

* Try to fix test data with a squash

* vcsa test data

* Synthesise VCSA ifName, use it in place of ifDescr

* Refresh test data

* Update ports.inc.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-16 12:58:38 -05:00
Tony Murray
52f5f10231
Fix some lint issues (#14962) 2023-04-15 09:02:41 -05:00
mtentilucci
b6572e0acc
Add support for Trellix ATD devices (#14965)
* Add support for Trellix ATD devices

- Add discovery for mlos ATD devices
- Monitor various OIDs related to ATD system health and status
- Add required MIBs
- Add test data

* add json test data

* Rename MCAFEE-SMI to MCAFEE-INTRUVERT-SMI

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 19:34:43 -05:00
Schylar Utley
056305c3c3
Add support for Alpha CXC HP Controller (#14829)
* add support for Alpha CXC HP Controller

* add num_oids, fix formatting

* fix typo

* Rename cxc_cxc.snmprec to cxc.snmprec

* Create ALPHA-RESOURCE-MIB

* Create ALPHA-RECTIFIER-SYS-MIB

* Create cxc.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 18:04:42 -05:00
Tony Murray
0cdda100e7
Fix Raisecom Processor (#14968)
* Fix Raisecom Processor
Had the same problem as ROS #14966

* Missed oid update
2023-04-14 17:12:35 -05:00
Tony Murray
cafdec6285
Remove unused port fields (#14963)
* Remove unused port fields
(and set vlan to default to null)

* Update test data for deleted fields

* update vlan to null

* missed field removals

* More correct migration

* Update new data

* restore accidental deletions
2023-04-14 16:47:26 -05:00
Tony Murray
49056da4a0
Fix Raisecom ROS processor collection (#14966)
Was origionally intended to use the 1 minute values, but was discovering the one second value and polling the twoHour value
Was also restricted to only one CPU.
Now discovers and polls all CPUs at the oneMin avg
2023-04-14 15:22:55 -05:00
mtentilucci
04217269a4
Expand discovery of gigavue os (#14933)
* Expand discovery of gigavue os

- Expand discovery so all Gigamon products are discovered
- Query for hardware version using GIGAMON-SNMP-MIB::model.0 OID if present
- Add more Gigamon gigavue test data

* Create gigavue_hc2.json

Looks like there was no json file before...

* update gigavue_hc2.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 07:12:44 -05:00
JStandiford
3362e0ee7b
fortivoice: add version, hardware and serial collection (#14956)
* Update fortivoice.yaml

Add in pulling in device hardware and software info

* Add files via upload

* Add files via upload

* merge test data

* Delete fortivoice_fortivoice.snmprec

* Update fortivoice.json

* Update fortivoice.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-12 10:11:49 -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
pjroehl
2b1f6a743d
Add discovery of NVT Phybridge FLEX24 (#14913)
* Add discovery of NVT Phybridge FLEX24

* Update phybridge-flex.yaml

Added FLEX-24 Switch under sysDescr

* Test Data phybridge-flex_flex-24 json and snmprec
2023-04-10 11:12:12 +02:00
mtentilucci
b09f5f63e4
Add Nutanix AOS discovery (#14950)
* Add Nutanix AOS Discovery

- Add basic discovery configuration
- Add Nutanix .svg icon and logo
- Add test data

* fix yaml style nutanix-aos.yaml
2023-04-07 13:02:41 -05:00
mtentilucci
698b9ee48c
Add Rubrik Discovery (#14951)
- Add basic discovery
- Add Rubrik .svg icon and logo
- Add test data
2023-04-07 13:01:30 -05:00
cjwbath
bbe752b24a
Add initial OS detection for LoadBalancer.org (#14902)
* Add initial OS detection for LoadBalancer.org

* Match on Linux sysObjectID first for efficiency

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Add test for loadbalancer OS detection

* Add test for loadbalancer OS detection - fix author

* Add test for loadbalancer OS detection

* Add test for loadbalancer OS detection - fix author

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Chris Ware <cjw26@bath.ac.uk>
2023-04-06 19:58:14 -05:00