Commit Graph

1122 Commits

Author SHA1 Message Date
JP
e22a9fe5aa Add new sysobjectid for Arbor ArbOS TMS appliances (#11711)
* Add new sysObjectID for Arbor ArbOS TMS appliances

Arbor ArbOS TMS appliances use a sysobjectID of SNMPv2-SMI::enterprises.9694.1.5. Currently the arbos.yaml file only has 9694.1.4 so Arbor TMS appliances are not getting detected correctly as ArbOS devices.

netnms01:/opt/librenms# snmpwalk -v2c -cdeleted arbortms01.dal
SNMPv2-MIB::sysDescr.0 = STRING: Peakflow TMS 8.4 Model: TMS-HD1000 Serial: XXXXXXXXXX
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9694.1.5

* New sysobjectid for Arbor ArbOS TMS appliances

* New sysobjectid for Arbor ArbOS TMS appliances

* Update arbos.json

* Create arbos_tms.snmprec

* Update arbos.snmprec

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-27 11:09:13 -05:00
Tony Murray
e292cc98cc Wrong snmpsim endpoint for TravisCI pre-start (#11706)
* Wrong snmpsim endpoint for TravisCI pre-start

* Fix full check parsing
2020-05-26 13:18:27 -05:00
Bukowski
bb2ac27a1d Add Papouch Quido Device (#11605)
* Create QUIDOQ-MIB

* Rename QUIDOQ-MIB to QUIDOS-MIB

* Create papouch-quido.yaml

* Create papouch-quido.yaml

* Add additional match data and over graph

* Create papouch-quido.snmprec

* Create papouch-quido.json

* Update papouch-quido.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-26 12:02:49 -05:00
Dragan Savic
79ca57ed28 Fix cisco sensor thresholds (#11547)
* Update functions.inc.php

Skip changing the high limit threshold to low limit threshold value when high limit threshold doesn't exist for a sensor. If low limit threshold value was set by discovery process or manually, the same value would be also set for high limit threshold.

* Update cisco-entity-sensor.inc.php

Skip invalid sensor threshold values, which some Cisco ASR devices (probably other families too) return.

* Add snmprec data for Cisco ASR9010

* Create iosxr_asr9010.josr

* Create iosxr_asr9010.json

* Delete iosxr_asr9010.josr

* Update iosxr_asr9010.json

* Update iosxr_asr9010.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-05-25 13:53:38 +02:00
PipoCanaja
a44cdc2f45 Add WAN (3/4g-LTE) support on Huawei AR family (#11619)
* 3g-LTE WAN stats

* Get HW name on AR16x family

* serial for AR

tests

* enable snmpsim log

* Update bootstrap.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-24 15:57:06 -05:00
Adam Bishop
3acbd72ab1 OS Detection for Mobileiron Core, Sentry appliances (#11510)
* Detection for MobileIron appliances

* Test data

* Remove references for GANDI-MIB

Turns out these aren't actually needed for Linux-likes

* Remove module filters
2020-05-24 15:53:17 -05:00
footstep86
91c04a1d54 Added FortiMail support (#10895)
* Added FortiMail support

* Added FortiMail support

* Update fortimail.inc.php

* optimized discovery

* Syntax change

* Added test data

Co-authored-by: Neil Lathwood <gh+n@laf.io>
2020-05-24 15:45:14 -05:00
Tony Murray
ee13299a77 Testing cleanup (#11677)
All tests use transactions
One test isn't a db test...
2020-05-24 13:49:01 -05:00
footstep86
06c991ef57 Added FortiAuthenticator support (#11633) 2020-05-24 11:55:54 -05:00
footstep86
9f82079e2c Added FortiSandbox support (#11593) 2020-05-23 21:41:02 -05:00
PipoCanaja
b8c6769049 New corner cases for Huawei VRP BGP (#11663)
* vrp-improve

* add bgp4 data, and get errors

* Fix WRONG Type error on bgpPeerRemoteAs + handle ErrorSubCode in  a generic way

* fixing tests

* clean

* improve state backup to BGP4-MIB

* tests with corrected data

* tests

* restore original tests/data/vrp_5720.json
2020-05-23 21:11:55 -05:00
Tony Murray
e7d954d7df Fix dev:check fail-fast not returning error (#11672)
Fix dantherm definition
2020-05-23 14:43:41 -05:00
Jellyfrog
b09bc07f8f Laravel 6.x (#11397)
* Update Laravel core files

Fix app/Http/Kernel.php

* Use RouteServiceProvider::HOME

* Sync Laravel default config files

* Update composer dependencies to Laravel 6

* fix resources/lang/en/validation.php

* Manually fixing tests

required by travis, fails locally???

* Update wpb/string-blade-compiler

* Add new viewany() authorization policies

* Update minimum PHP version to 7.2

* Re-generate our json test-dumps

Due to:
https://github.com/laravel/framework/pull/16069
https://github.com/laravel/framework/pull/31100

* update truenas data

* fix truenas

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-23 12:05:18 -05:00
Maikel de Boer
b3f78ec510 Vendor Dantherm (#11603)
* Build support for Dantherm CC3000 Cooling Controller

* add missing files + test data

* Create dantherm-os.json

* Update dantherm-os.json

* Update dantherm-os.yaml

* Update dantherm-os.yaml

* Update dantherm-os.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-05-23 18:51:34 +02:00
Tony Murray
ce21011aff Rewrite development helper to lnms dev:check (#11650)
* Refactor pre-commit to class

* docs build

* dusk check

* ci mode for checks

* full checks

* other mysql

* make other lint checks actually work
fix pylint finding

* ci is a long opt

* fix undefined index

* dusk fully working

* ask for forgiveness, not permission

* fix whitespace

* skip dusk sometimes

* Handle 3com and other os with digits

* flags instead of if else spaghetti

* convert to command

* cleanup

* missed check

* fixes

* case

* self-check :D

* argument now

* fix bugs from refactors

* another fix

* adjust file change parsing

* refactor execut a bit

* fallback to global quiet when unknown type.

* allow quiet override for specific commands

* output cleanup

* check flow

* start of tests

* file categorizer tests and fixes

* fixes and cleanup

* skipable not implemented...

* more tests, fix bugs

* more tests and cleanup

* wrong command

* fix canCheck and set env properly

* full env fix

* don't allow dusk on user's run as it will erase their db.

* fix os option

* fix whitespace

* don't need to start server

* ci doesn't like that
2020-05-22 20:27:48 -05:00
Tony Murray
5fc3fcb9e8 Make migrations work in SQLite (#11643)
* WIP Sqlite

Down methods don't work either, avoid them with refresh for now.

WIP persistent support

WIP db_schema

WIP db_schema 2

Update new migrations...

revert dump_db_schema changes for now, too much difference.

fix migrations on mysql

fix up some more items, this should be our target schema
lots of index renames and a two misc changes

index rename WIP

index rename WIP

another round

fix up new schema changes

try case insensitive fix

Trying tests WIP

fix down methods

DBSetupTest working (uses mysql)

Test sqlite migrations work

* Properly validate sqlite output

* revert glue changes, should be separate PR

* remove dusk workaround

* remove unused variables

* import

* sqlite capitalization

* Revert some refresh tests

* testing_mysql back to testing
2020-05-22 16:49:21 -05:00
Heath Barnhart
e414352356 OSPF SNMP Trap Handlers (#11647)
* Intitial push working tests

* Adding unit tests

* created interface state unit tests

* started ospf nbr unit tests

* finished nbr change unit tests

* precommit checks pass

* removed uneccsarry relationship
2020-05-21 15:15:39 -05:00
footstep86
b71d933ac9 Updated FortiWeb support (#11632) 2020-05-21 15:14:56 -05:00
Adam Bishop
3838549748 Fix test behaviour with PHP 7.4 on Fedora 32 (#11648)
* Handle cases where the data type is hex encoded, but the data is
not actually hex encoded.

* Test data claims 4x, but is not hex encoded

* Encode the private string

* Replace 4x|<private> with 3C707269766174653E

* Re-run save test data.

Seems some of these files might have been hand edited at some point
as fields seem out of order

* Have a trap test use a mock instead of a db query
2020-05-21 08:22:55 -05:00
Tony Murray
f1320b6510 Speed up tests by skipping pings (#11642)
* Mock fping for module tests, there is no need.
Removes some wait time.

* fixup some rrd disabling code

* oops
2020-05-19 22:08:41 -05:00
Dan Baker
cbb0b5219e Added support for Ciena service delivery switch family (#11636) 2020-05-19 14:37:58 -05:00
joseUPV
abd9600ba4 Fix unit state sensor oid for aos6 (#11639)
* Fix unit state sensor oid for aos6

* added fixed aos6 test data
2020-05-19 14:36:20 -05:00
Tony Murray
d5a52ca4eb Fix various issues with loading os definitions (#11640)
* Ping only device doesn't display
if os was set to something, ping os wasn't loaded and we try to get overview graphs from it.

* Fix snmp_disable device page load error
When other os is set.

* Revamp os setting loading
the only safe way to access is Config::getOsSetting()

* Remove getOsSetting fallback behavior
Most instances don't use it and it can have unexpected results Config::getOsSetting('blah', 'group') == 'librenms'

* refactor and remove unneeded load_os/loadOs calls now since getOsSetting automatically loads it.

* restore unix overview graphs, they are different
small cleanups

* fix
2020-05-19 14:35:32 -05:00
Jellyfrog
3985ce74ce Update PHPUnit to 8.x (#11635)
* Shift return type of base TestCase methods

From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html

* Update PHPUnit to 8.x

Part of Laravel 6 upgrade

* Bump php versions

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-19 16:31:50 +02:00
joseUPV
9ac05f48b8 AOS Advanced Support. (#11500)
* Comes from PR11322.

* Code changes to solve github-apply warnings. Removed aos tests.

* Added new aos tests.
2020-05-18 07:50:13 -05:00
KingJ
7bc2f9621a Extend processor polling to Dell Powerconnect N1100 and N1500 series (#11631)
* Extend processor polling to Dell Powerconnect N1100 and N1500 series

* SNMP test data for Dell Powerconnect N1124T-ON

* SNMP test data for Dell Powerconnect N1148T-ON

* SNMP test data for Dell Powerconnect N1524P
2020-05-17 21:15:39 +02:00
PipoCanaja
b9c2f75092 Riedo E3Meter PDU (#11624)
* e3meter

* display

* tests
2020-05-16 10:14:46 +02:00
Facundo Caselles
2869a33ba5 Update Airos.php to match with Airos 8.x.x (#11400)
* Update Airos.php to match with Airos 8.x.x

Oid changed from AirMaxQuality (not used anymore), to Airtime

* Update Airos.php

* update airos.php to use wirelessUtilization

Using OID for UBNT-AirMMAX-MIB::ubntAirMaxAirtime.1 for wireless sensor utilization.

* Removed Airtime from quality

* Tests

* Update airos.json

* airos.snmprec reverted to previous state, and uploaded airos_airos8.snmprec

* Added airos8 snmprec

* Create airos_airos8.json

* Update airos.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-14 23:14:59 -05:00
Jellyfrog
ec57d3b669 Run artisan optimize after composer install (#11465)
* Remove unused routes

Prevents route:cache from working also

* Run artisan optimize after composer install

Helps cleaning up issues with upgrades, and also makes laravel a bit
faster

* Update composer.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-14 21:10:03 -05:00
Tony Murray
b573c9ef73 Implement OS specific information discovery (#11446)
* Implement OS specific information discovery
That way it doesn't have to be fetched during polling
Also improve discovery process, os is only detected once, in the core module.
EXA is the test os, a couple improvements there.

* Use local variable, then unset it so we don't pollute.

* fix style issues

* test and other fixes

* attribute update fixes

* Update exa data, need new source data

* null missing "os" values

* fix ftos odd character

* fix ftos odd character

* only null for new style or we will reset to null every discovery

* Move device observer to own class

* Handle location, relocate event logging

* update exa e7-2 data

* update ird test data, apparently unicode is now working.

* update Linux ntc, now uses correct icon

* Only load all os on the web, also, we can't load existing the the database isn't connected.

* only for devices that have a location

* revert ftos test data apparently

* revert ird
2020-05-14 11:27:59 -05:00
Tony Murray
f80ff5266d Fix Papouch detection too generic (#11540) 2020-05-13 23:38:00 -05:00
PipoCanaja
804bb22a5a Correct options for IBMC version polling (#11587)
* Correct options for version polling

* Update ibmc.json
2020-05-12 16:09:18 -05:00
Alexander Moisseev
0900f9513e Add serial for QTECH QSW-3400 (#11569) 2020-05-10 22:08:07 +02:00
Jozef Rebjak
3b79ca0e79 Added warmStart trap handler (#11583)
* Added warmStart Trap

* Added warmStart Trap Test
2020-05-10 21:50:19 +02:00
Jozef Rebjak
44f3dea8e8 Fixed issues with IMCO Power (#11559)
* Fixed Issues with IMCO Power

* Fixed TRAVIS
2020-05-10 21:48:34 +02:00
Tony Murray
73ac93d729 Fix errors for some devices loading components (#11527)
* Test WIP

* WIP

* port getComponents to Eloquent

* port more

* simpler creation

* change to explicit arrays

* add missed file

* restore commented code

* fix inserting null value for component prefs

* Fix some bugs in setCompenentPrefs
Can't create tests without fixing bugs first :D

* another test

* another test

* Modernize setComponentPrefs

* Test for event log entries

* Fix delete event

* fix invalid values for component toggles

* status log too

* Use Setters to work around bad data, $casts doesn't do what we want.
2020-05-08 00:30:56 -05:00
Alexander Moisseev
25330646f6 New OS: QTECH (#11556)
* New OS: QTECH

https://www.qtech.ru/en/catalog/

* QTECH: Add hardware, version and serial support

* QTECH: Fix platform and software version detection

* QTECH: Add test for QSW-3450
2020-05-06 23:34:02 +02:00
arrmo
280e010286 Updates to Brother Printer (#11532)
Fixes issues observed in LibreNMS (timeouts, missing data)
Manual snmpwalk vs. snmpbulkwalk confirmed no bulk support
Missing toner, network, etc. information now seen in LibreNMS!
2020-05-06 23:30:35 +02:00
Damon Reed
53b75b289e Added bgpPeerDescr for Arista OS (#11495) 2020-05-06 00:51:39 +02:00
Vitali Kari
1108f7d530 MPLS updates and bugfixing (#11468)
* MPLS updates and bugfixing

* Tests

* tests

* code climate, tests

* tests

* tests

* remove nokiaIfName(), fetch ifName from the database instead

* restore from messed rebase

* tests

* btw, fix travis about the missing docs

* tests

* tests

* clean the messed up test data an generate new for timos

* rebase
2020-05-01 23:05:51 -05:00
Tony Murray
0e9cd8fbc4 SIAE Radio: add additional sensors and data (#11498)
* SIAE add additional sensors and data
Improved labels
Modulation
Rate
Serial Number
Hardware name

* Add total rates

* was supposed to be divisor

* Short array syntax
2020-05-01 22:11:35 -05:00
Adam Bishop
ce8de5cb18 Support FreeNAS/TrueNAS 11.3 (#11494)
* Support FreeNAS/TrueNAS 11.3

Seems the latest release changes the SysObjectID from FreeBSD to
their own enterprise number.

I've left the old FreeBSD enterprise number in place, so both
older and newer releases will be detected.

* Test data
2020-04-28 15:50:00 +02:00
Adam Bishop
83dd1f0a16 Detection, sensors and zpool/dataset usage for FreeNAS, TrueNAS (#11474)
It's also possible to do zpool IO from the MIB, but diskIO on
LibreNMS makes a lot of assumptions about it coming from the UCD
MIB.

This changeset adds detection for FreeNAS and TrueNAS - despite
having their own enterprise number, the snmpd uses the FreeBSD
one.

The naming is a bit all over the place, because this reflects
reality - IXSystems produce FreeNAS and TrueNAS, the product lines
have merged to eliminate FreeNAS, but TrueNAS still calls itself
FreeNAS everywhere except the GUI.
2020-04-27 17:23:44 +02:00
gonzocrazy
eb76218127 Opengear add mempool discovery+polling (#11491)
* opengear MemPools

Discovery and Polling of opengear mempools - opengear Detail Memory Usage is already collected however that can not be used to trigger rules.

* add test

opengear mempools tests

* remove newline
2020-04-27 09:04:57 +02:00
Jurrian van Iersel
d61cfb5688 Added sensors for outlets on Schleifenbauer devices. (#10949)
* Added sensors for outlets on Schleifenbauer devices. Also use the outlet name when configured.

* Updated tests for Schleifenbauer

* Fixed on test for Schleifenbauer

* Optimized polling by retriving only outlets from the device with the network connection, not all devices on the data-bus.

* Fixed code styling

* Use shorthand comparisons for names

* Fix for conflicting $entPhysicalIndex
2020-04-27 00:35:00 +02:00
Adam Bishop
3690ca4928 Add OS detection for Greenbone appliances (#11464)
* Add OS detection for Greenbone appliances

They don't expose anything fancy over SNMP, but this makes them
display interface names correctly. Under the hood they're unix-y.

Greenbone logo is from the AGPLv3 gsa, which is GPL compatible:
https://github.com/greenbone/gsa/blob/master/gsa/public/img/greenbone.svg

The mib is included for completeness, but it doesn't expose any
graphable values.

* Fix the vendor's logo
2020-04-26 13:11:49 +02:00
Tony Murray
d4225806a8 Run docs tests when only docs are modified. (#11483) 2020-04-25 21:43:03 -05:00
Mathieu Poussin
fc391090e1 BGP Polling: Add error code management (#11424)
* BGP Polling: Add error code polling

* Rework describe_bgp_error_code and fix bgp error fields migration

* Add real test data for IOS-XR and Arista EOS
2020-04-24 22:47:20 -05:00
Adam Bishop
b7b298806f OS detection and sensors for Dell Compellent (#11467)
* OS detection and sensors for Dell Compellent

... or Dell storage as it is now known. Under the hood it's
referred to as Compellent, so I've named it as that to avoid
confusion.

It is not part of the Dell group or using the Dell MIB folder -
Dell have doubled up on some OID definitions, which means the MIB
here and a couple of the existing ones conflict.

The change adds OS detection and a frankly ludicrous amount of
sensors. I have access to a relatively low end device, so at the
moment everything under *ctlr* is my best guess based on the other
table layouts.

* Set sensor state_name to avoid collisions

* Regenerate test data
2020-04-23 22:58:22 -05:00
arrmo
e3c1a3bbef Add OS version to asuswrt-merlin (#11438)
* Add OS version to asuswrt-merlin

* Add test data, for latest asuswrt-merlin updates

* Updated / corrected test files, snmprec and json
2020-04-23 22:50:30 -05:00