Commit Graph

16 Commits

Author SHA1 Message Date
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
PipoCanaja
8e3fe223ef
Sensors - Allow changing RRD type in YAML and PHP sensor discovery (#14208)
* new row variant

* syntax

* syntax

* DB

* syntax

* schema

* test

* allAdvaTests

* Tests

* Tests

* Tests

* missingMigration

* missingMigration

* Tests

* Tests

* Tests

* Tests

* tests

* tests

* tests

* tests

* tests

* test

* fix_Aos7

* fix snmprec arista

* fix snmprec arista

* fix snmprec arista

* tests

* merge_fix

* aos7 backslash

* aos7

* more

* more

* defaultValue

* arista

* typehint

* tests

* tests

* voss

* aos7

* aos7

* aos7

* testWithoutarista-mos_metamux48-c-0-16.json

* tests

* ciscosb

* new tests with 2004 and only sensors module

* adding wireless module again

* adding wireless module again (cont)

* airos

* aos7

* arista

* arista

* bdcom

* fortigate

* fortigate

* fortigate

* ftos

* ftos

* tests on 1804

* tests once more

* tests once more, cont

* tests once more, cont

* tests once more, cont

* tests once more, cont

* tests once more, cont

* more

* bdcom

* comware

* edgeosolt

* enexus

* arista-mos

* removeAristaAgain

* ies500_manual_edit

* ies500_manual_edit

* mni

* volius

* zywal

* manually imported arista-mos

* manually imported arista-mos

* arista-mos test is triggering something ...

* restoreArista

* tests

* tests

* aristamos

* ies52xxM_4206.json

* revert linux_supermicro.json

* revert linux_supermicro.json

* benuos

* fortiadc

* rnx-updu
2022-10-25 08:31:02 -05:00
Tony Murray
d372844aea
OS test data update (#14417)
* OS test data update

* edfamux case

* restore ftos

* revert ird.json
2022-10-03 10:22:03 -05:00
Tony Murray
d74bb37971
Show port speed on port graphs, optionally set scale (#11858)
* Show ifSpeed on Graph
Drop ifHighSpeed, we really don't want to store that value.

* safer truth check

* Allow global setting and per-graph variable

* match surrounding case

* Style fixes

* Remove old function usage

* update schema

* remove some old usages

* cleanup more ifHighSpeed references

* update test data to remove ifHighSpeed

* fix down migration

* Add button on graph page
Change default
tweak wording
2021-08-23 06:47:44 -05:00
Jellyfrog
e876299f09
Move sysContact polling to discovery (#12524)
* Move sysContact polling to discovery

* Update tests

* fixup

* fixup

* fixup

* fixup

* fixup
2021-02-11 19:04:45 -06:00
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
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
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
LEV82
9ce7c83caa Add bad_ifoperstatus for filtering interfaces having a status for example 'notPresent' (#10977)
* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent
2020-01-24 05:58:01 -06: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
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
de7ce7c757
Fix ifName and ifAlias being blanked by discovery (#9589)
* Fix ifName and ifAlias being blanked by discovery
on devices that have blank ifName or ifAlias

* Update test data

* work around net-snmp bug
2018-12-24 10:29:02 -06:00
PipoCanaja
b67634bc5a Fixed ifType being removed when a port is down (#9493)
* Adding ifType to base_oids

* Improve discovery (update ifType) and polling (save ifType)

* Updated test data

* Updated json test data

* vlan isn't filtered by default :P

* With default ignored ports

* Update newer test data
2018-12-11 21:07:56 -06: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
vivia11
94693b0d9e Use CISCO-VRF-MIB for vrfs on non MPLS cisco devices (#8756)
* Add vrf for non mpls cisco devices, add mib and test data

* Fix custom_where in vrf module

* Better VRF module test data collection

* Update ios_6500.json

* don't include ifVrf in ports

* update all ports add dependencies to pre-commit.php

* new json files
2018-05-25 23:27:54 -05:00
Paul Heinrichs
098c948a04 device: Added Last Mile CTM support (#8478)
* Add Listmile mibs

Created custom lastmile mib

* Add Lastmile CTM support

* Update test description and remove wireless sensor

* Requested changes

Renamed OS

* json test data

* Updated test data
2018-04-08 09:32:41 +01:00