Commit Graph

9 Commits

Author SHA1 Message Date
Tony Murray
941037e44e
Convert OS discovery to new style (#12099)
* terra

* airos

* port cisco os polling
old wwan polling was broken and deprecated anyway

* enterasys

* Brother, a few changes

* AW Plus

* Fabos

* set expected test data

* 3com

* Adva FSP150

* advantech

* airos-af

* aix

* akcp

* allied

* allworx and missed mibs

* anyos

* fixup some zyxel shared stuffs
zywall graph polling

* aos

* apc

* apex

* apsoluteos

* fix copyrights

* arris

* arris

* aruba-instant

* ArubaOS

* Ascom

* asuswrt-merlin, ats

* audiocodes

* avocent

* avtech

* barracuda

* binox

* boss

* canonprinter

* cdata

* ceraos

* ciena-waveserver

* fix 3com

* fix airos

* fix brother yaml?

* fix aos more

* fix and improve apc

* fix arista test data

* yaml discovery (basic)

* cimc

* mib not used

* remove old discovery file

* ciscosat

* ciscosb fixes + improvements

* comware

* ctm

* cumulus

* cxr-ts

* cyberoam-utm

* cyberpower

* dahua-nvr

* dasan-nos

* datadomain

* dcn-software and fallback oids

* dd-wrt

* dell-laser

* d*

* e* and location

* forti, post processing, oid coalescing

* Freebsd array of sysDescr regex

* finish f*

* g*

* h*

* i* WIP

* i*

* Junos

* j*

* k*

* unix refactor previous to yaml more
inject $device

* fixes

* fixes

* l*

* m*

* n* ability to set other fields in regex
tnmsne polling to eloquent

* o*

* p*

* q* + bonus calix

* r*

* s* WIP

* s*

* t*

* u*

* v*
rework vrp to yaml (hybrid)

* w*

* x*

* z*

* a* easy no-data

* fixes

* style fixes

* missed ApexPlus

* fix signature

* Add missing location data

* rename getDevice functions

* add new cisco ftd data

* update docs

* revert sill snmp format

* fix snmp options

* update for new smartax test data

* rebase dsm

* fix voss
2020-09-18 15:12:07 +02: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
SourceDoctor
7dfb4ef1df
Adding Column ifSpeed_prev, ifHighSpeed_prev to Ports Table (#11348)
* adding Column ifSpeed_prev, ifHighSpeed_prev to Ports table

* grammar fix

* rename migration class

* tests

* .

* .
2020-04-01 10:50:33 +02:00
Martijn Schmidt
048fd0f6ed Remove guessed limits for some health sensors, documentation for sensor classes (#10327)
* Default to null for group yaml discovery.

* Update test data for a154bda yaml group null fix.

* Changes to guessed limit functions for sensors.

Original behaviour
===================

The file `includes/discovery/functions.inc.php` contains
`sensor_limit_low()` and `sensor_limit()` which both attempt to
guess a sane value for sensors when no explicitly defined
low_limit or high_limit can be found during discovery.

Both switch control structures used in those two functions
have empty case statements which means that if one of those matches,
it's going to fall through and run the code for each subsequent
case until a `break` is reached.

For example, when we call `function sensor_low_limit(dbm, -13.036)`
it will return the value `-12.3842` instead of `null`. That is
because there will be a match at `case 'dbm':` which falls through
all the way to `case 'cooling':`, where it performs
`$limit = -13.036 * 0.95` before hitting a `break`.

Changed behaviour
===================

Removed `power_consumed` and `count` guessed low_limit and
high_limit, I personally added those sensor classes in PR #9471
when I didn't understand that a switch control structure has
fall-through behaviour so I can guarantee that guessing limits for
those is a mistake on my behalf. It should not be there, only
power_factor can have guessed limits. Apologies for the issue,
I'm still a beginning programmer!

Furthermore, I removed guessed high_limit values for `current`
and `power` because these are supposed to draw higher values as
more devices or components are installed on for example a PDU or
a chassis.

Finally, I removed guessed low_limit and high_limit for `dbm`
sensors, there is a much too large variance in power budget on
commercially available optical transceivers for there to be a
sensible window where you can guess these values.

* Documentation on adding sensor classes.

* Update test data - sensor limit changes @ 30212d2
2019-06-21 09:03:27 -05:00
priiduonu
489666ae74 Add support for Moxa EDS-G512E-8PoE (#9857)
* Add support for MOXA EDSG512E8-PoE

* Add support for MOXA EDS-G512E-8PoE

* Add support for MOXA EDS-G512E-8PoE

* Remove whitespace

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Update moxa-etherdevice.yaml

* Create moxa-etherdevice_edsg512epoe.snmprec

* Create moxa-etherdevice_edsg512epoe.json

* Add support for MOXA EDSG512E8-PoE

* Add support for MOXA EDS-G512E-8PoE

* Add support for MOXA EDS-G512E-8PoE

* Remove whitespace

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Update moxa-etherdevice.yaml

* Revert "Add Moxa EDS-G512E-8PoE test data"

* Add test data for Moxa EDS-G512E-8PoE

* Removed whitespace

* Update moxa-etherdevice_edsg512epoe.json

* Update moxa-etherdevice_edsp510a8poe.json
2019-03-05 00:19:16 -06:00
Tony Murray
63c85429ae Added support for grouping sensors (#9606)
Improves visual identification for sensors

 - [x] Docs

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2019-01-11 22:42:56 +00:00
Tony Murray
4d9924242f
Database schema cleanup (#9064)
* target db_schema

* Database schema cleanup
Remove several inconsistencies (mostly with data types and lengths)
Make things a bit nicer to implement with Laravel database migrations.
poller* tables had f'd up indexes

* Update tests, extra noise because db returns numeric types now.

* Update test data again.

* fix 253 migration for mysql 5.3
2018-09-05 07:34:50 -05:00
Tony Murray
2f25d11747 More complete query builder parsing (#8422)
* fix like and is null operators

* Add between operator support

* Can't have one if ($expand) clause

* fix up empty, add tests

* Use single quotes for strings

* Fix moxa sensors order

* Fixed travis
2018-03-20 10:54:02 +00:00
priiduonu
f68f4b2240 newdevice: Added support for Moxa EDS-P510A-8PoE (#8384)
* newdevice: add support for Moxa EDS-P510A-8PoE

Support PoE port consumption, SFP module monitoring and power input statuses for Moxa EDS-P510A-8PoE industrial switch.

* Add Moxa EDS-P510A-8PoE MIB

* Rename MOXA-EDSP510A_8POE-V3.7-MIB.my to MOXA-EDSP510A_8POE-V3.7-MIB

* Update moxa-etherdevice.yaml

Moved MIB definitions to the top as proposed by @laf

* Create moxa-etherdevice_edsp510a8poe.snmprec

* Create moxa-etherdevice_edsp510a8poe.json

* Rename MOXA-EDSP510A_8POE-V3.7-MIB to MOXA-EDSP510A8POE-MIB
2018-03-19 20:58:41 +00:00