Commit Graph

28 Commits

Author SHA1 Message Date
Tony Murray
881d581448
Fix existing, oops (#14332) 2022-09-09 15:12:02 -05:00
Tony Murray
6b1ae1dbf0
Do not allow sysDescr to be fetched in os module yaml (#14331)
It has already been fetched, use sysDescr_regex
2022-09-09 15:05:37 -05:00
Tony Murray
b8f2002150
Procurve hardware description cleanup (#14007)
* Procurve hardware description cleanup
Include part number and other details where available
Covers 100% of known sysDescr
Adds Aruba Instant On parsing
adds string replacements for OS fields

Could use hardware: ENTITY-MIB::entPhysicalDescr.1, but strings contain a lot of fluff and some are just "HP", I leave that for another PR

* restore .gitignore.........

* less specific

* Change regex cosmetically
2022-06-07 09:27:32 +02:00
Josh Jameson
0b85bceb34
Fix Temperature Sensor for AirOS 8.7.4+ (#13655)
* Fix Temperature Sensor for AirOS 8

* Update airos_airos8.json

* Update airos.json

* Add new skip_values feature to deal with Ubiquiti nonsense.
Tweak test data to test the change
fix not_regex

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-01-26 16:02:57 -06:00
TheGreatDoc
82d008ca95
Added support for Himoinsa gensets status state sensors (#13456)
* Fix missing mib_dir in definition

* Added state sensors

* snmprec data

* json data

* delete unused snmprec

* License and Author

* remove unused json data

* Fix style issues

* Fix more style issues coz im blind

* Fix more style issues coz im blind last

* Refactored

* Why do we loop?

* Fix style issues

* Update polling

* Refactor to use methods

* Fix a pair of style issues

* Updated test files

* Convert to yaml

* Wrong description on Mode

* Added another state + fixed some indexes

* Dunno what happened

* Fix for phpstan level 6

* Fix forstyleci

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-26 01:18:49 -06:00
Jellyfrog
4f50c3c05d
Rename nobulk -> snmp_bulk (#13098) 2021-09-01 19:01:41 -05:00
paulierco
4ee1abb1d4
Alcatel-Lucent Aos7 sensors nobulk (#12935)
* first commit

* fix style

* fix style

* fix style

* fix style

* fix style

* fix style

* fix style

* change local_port_id

* fix style

* fix style

* fix style

* first commit

* fid disc

* tests?

* fix "nobulk" test-check

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2021-06-09 00:39:21 +02:00
Tony Murray
143765ced8
Add 'nobulk' setting in sensors yaml (#12833)
* nobulk setting in sensors yaml
* silly python
2021-05-30 00:08:20 +02:00
PipoCanaja
07900ccc08
Discovery - Refactor num_oid computing (#12576)
* Test the num_oid generation

* Refactor num_oid discovery

* cnt

* Cache the value to avoid unnecessary snmptranslate

* desc of function

* typo

* Negative caching as well

* Negative caching

* style

* Str::before

* Str::before

* Str::before

* Fix key,  and model Devices

* types

* types

* doc update

* re-run tests

* Use Cache class

* Simplify caching and do it into oidToNumeric

* Simplify caching and do it into oidToNumeric

* style

* Extend to 3 hours

* and not ->cache_time

* force re-run tests

* only one OID for num_oid test

* rerun tests

* typo in MD

* restore

* Exemple

* Exemple

* light change

* test

* test

* test

* back to PR

* phpstan + suggestions from Tony

* fix firebrick num_oid

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-04-22 14:40:45 -05:00
PipoCanaja
c0060dc6ed
DynamicDiscovery - Guess num_oid if not provided in YAML file (#12570)
* Guess num_oid if not provided in YAML file
* Discover Processor num_oid if necessary
* num_oid is now optional

* documentation upgrade
2021-03-01 16:54:29 +01:00
Tony Murray
8b105ba162
GPS coordinates from device (#12521)
* GPS coords from device
in yaml or php
define for epmp, airos, and airos-af-ltu
quirk for airos bug with - in the middle of the number

* style fixes

* revert airos-af-ltu mempool change

* fix imports

* add epmp test data... more improvements to come there.

* don't stagger geocoding now that this is moved to discovery
also, no need to check OSDiscovery since the base implements it.

* fix json data

* fixed
2021-02-14 20:36:55 -06:00
Tony Murray
f2f169ae78
Modernize mempools (#12282)
* mempools to modern module
quick hacky hrstorage port

* port ucd-snmp-mib to Mempools

* Populate DB for ucd
Prep for yaml

* initial yaml attempt

* more complex conversions
fixes to YamlDiscovery, make leading $ optional and allow mib::oid format

* walk full tables and skip values
normalize percentages above 100

* handle precent only ones (specify total as 100)

* Move default polling out of YamlMempoolsDiscovery

* fixes

* Update test data hrstorage should be correct.

* perc_warn for hrstorage

* Host Resources, record buffer, cached, and shared

* Host Resources is always better, don't do both HR and UCD

* fix unix, include warning levels

* variable size

* consolidate skip_values

* define mempools schema

* number instead of integer

* more schema refactor

* one more skip_values reference

* throw error for invalid oid translation
aos6

* a*  and Cisco

* updated test data

* update almost all hrstorage data files

* b*

* c* with test data
use standard cache for hrStorage

* use cache for storage module too

* hand bsnmp properly

* bdcom

* exclude total oid from yaml so it is not polled
May add a way to ignore this behavior and poll it, but I don't know if that is needed.

* automatically handle percent only values

* ciscowlc

* only poll used or free if we have used, free, and total.

* fix skipping

* the dlinkoning
fix find value when value "name" is numeric

* support numeric oids

* dnos/ftos attempt

* I guess we can't filter on total > 0

* edgecos

* e*

* f WIP

* f*

* gwd (aka g*)

* h* + procurve

* i*

* j*

* m*

* support 0% used memory (however unlikely)

* n*

* CISCO-PROCESS-MIB memory, share cache with processors module

* ignore mempools with invalid total

* p*

* quanta

* r*
fix raisecom mibs terribly broken

* s-z

* style fixes

* Move VRP back to PHP and make it actually work

* fix zynos

* update schema

* Update Cisco processor data for description bug fixes

* fix comware processors

* comware mempools with memory size
default precision to 1

* sophos-xg updated data

* hrstorage use ram size for buffers, cache, and shared

* Show memory available instead of free in device overview

* UCD, use same rrd format, store available instead of free in the db.

* Calculate availability for HOST-RESOURCES-MIB

* Convert UCD to standard polling

* rename old rrd files

* initial graph work

* graph WIP

* Graph looking decent

* Graph looking decent for hr

* remove old ucd_graph code

* handle availability mempool
more graph cleanup

* color adjustments

* remove accidental free calculation

* Update test data and fix corner cases

* fis pfsense

* update schema

* add default value for mempool_class

* fix whitespace

* update schema

* update schema correctly

* one more time

* fortigate_1500d-sensors missing oids

* Update docs.

* fix indent

* add implements MempoolsDiscovery explicitly to OS

* remove ucd_memory graph references
remove unused device_memory graph

* remove unused functions

* set devices with mempools to rediscover to prevent/minimize gaps

* use a subquery

* add overview graph

* port health mempools table

* Update device mempool

* only show overview if multiple

* Don't override user set warn percentages in discovery

* fix missed usage

* fix style

* Safety check to not rename rrd files incorrectly if migration has not been run.

* Fix overview percent bar and represent available and used on the bar

* missed an item to convert to mempool_class

* percent on the wrong side
2020-11-23 15:35:35 -06:00
Tony Murray
210be6266e
Yaml support to translate sysObjectID to get hardware (#12187)
* Yaml support to translate sysObjectID to get hardware

* restore ironware behavior

* ...
2020-10-05 13:50:28 +02: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
Tony Murray
fde6ef5f3f
fix skip_value_lt plurality confusion (#12056)
* fix skip_value_lt plurality confusion

* Update atenpdu.yaml
2020-09-12 23:26:20 +02:00
PipoCanaja
15fe63d6b1
Feature: skip_value can check OID existance (#11822)
* exists for skip_values

* AR routers are using another logic for SFPs Power

* schemas

* tests
2020-06-14 09:21:22 -05:00
Kevin Zink
4e18e8b5c1
Added rittal-cmc (LCP Plus) (#11091)
* Added rittal-cmc (LCP Plus)

skip_values opperand 'not_in_array' returns an error in pre-commit but in principal it's running. Can someone help?

1) LibreNMS\Tests\YamlTest::testDiscoveryDefinitionSchema
rittal-cmc.yaml does not validate. Violations:
[modules.sensors.fanspeed.data[0].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[0].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[1].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[2].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[3].skip_values[0].value] Array value found, but an integer or a string is required

* fix  Scrutinizer Inspection

* fix  codeclimate

* fix typo

* Update discovery_schema.json

To allow arrays in comparisons

* Control structures

* fix the pre-fix issues

* Typo in copy/paste

* Update rittal-cmc.json

* Unit1,2,3,4 and new snmprec, json have not changed

* Update rittal-cmc.json

Correct JSON data

* typo copy paste

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-05 13:23:54 +01:00
PipoCanaja
f8fb0496b5 Updated device support for Chatsworth-PDU (#10769)
* chatsworth-pdu extension

* tests

* allow snmp_flags in pre-cache

allow snmp_flags in precache

allow snmp_flags in precache
2019-11-06 21:43:27 +00:00
Vitali Kari
2825a7f7ec add discovery of mempool percent warning limit (#10618)
* add ability to discover percent warning on mempools discovery

* remove wierd charachters from json

* remove database defaults, add defaults for Linux and Vmware

* update db schema

* update test data

* adapt hrstorage mempools

* rebase
2019-09-30 13:22:55 +00:00
PipoCanaja
71da38cdf5 Added skip_values operator and documentation (#10419)
* more operators

* os_schema

* discovery_schema

* doc

* doc
2019-07-09 15:47:02 +01:00
PipoCanaja
d4f32a250e Support for Alcatel OmniPCX (#9375)
* device: support for Alcatel OmniPCX Server

* device: support for Alcatel OmniPCX Server - add test data

* rename

* Add a new versatile type of sensor, without unit - doc extension

* tests data updated for omnipcx

* new count test after funny rebase

* clean

* tests

* index in yaml file ...

* Update omnipcx.json

* try to add pbx state

* Change function snmpwalk_cache_oid to allow snmpvalue without index

* testdata

* Adapt the discovery_schema (to allow a non_indexed oid)

* Update snmp.inc.php
2019-01-22 17:34:45 -06:00
Martijn Schmidt
e0da083f5c New OS: Schleifenbauer, entity-physical improvements, various html page fixes (#9471)
* Fix some comment and documentation typos.

* Fix various entphysical page display issues.

- Resolve flickering during loading (missing liClosed for nested items).
- Clicking a sensor actually takes you to the matching graph now.

* Add a few nicecase() calls to clean up html page display.

* Create discover_entity_physical() function

- Add discover_entity_physical() function into includes/discovery/functions.inc.php
- This allows for an easy implementation of OS-specific entity-physical discovery.
- Update includes/discovery/entity-physical/entity-physical.inc.php to use the new function.

* Add power_consumed and power_factor sensors.

* Two new icons, make more entPhysical data visible.

* Pre-commit fix: blank line found at end of control structure.

* Add Schleifenbauer OS support.

* Now really fix the comment typo.

* Fix parsing mistakes.

* Add a generic count sensor.

* Make the Schleifenbauer discovery use count instead of state sensors.

* Don't place count sensor at the top, add sane limits for Schleifenbauer

* Finetuning the rrd_options, changing Schleifenbauer sensor names.

* Update schleifenbauer.svg

* optimize logo too

* add test data

* fix sensor value display (spaces break it)

* update entPhysicalIndex
2019-01-20 12:24:11 -06:00
PipoCanaja
8e80121c33 Add group to sensor 1st discovery + template syntax {{ $xxx }} (#9667)
* add group to sensor initial discovery and use dynamic_discovery_get_value template syntax on them

* spaces

* switching to YamlDiscovery::replaceValues

* testdata from ibmc

* testdata from nxos

* testdata from omnitron-iconverter

* testdata from vrp

* adapt discovery_schema to accept variables

* remove pattern

* Update discovery_schema.json
2019-01-15 20:56:30 -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
5620d1bd1b
Allow strings for skip value comparisons (#9635) 2019-01-09 22:20:05 -06:00
Tony Murray
fad0bffc43 Escape SNMP & IPMI shell commands (#9537)
hopefully doesn't break anything
Mostly issues with snmp oids and options containing spaces.  Try to remove all of those.

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.
2018-12-16 13:42:50 +00:00
Tony Murray
1d48cf7db2 Discovery YAML. Do not implicitly append $index (#9315)
Require it explicitly. Makes it easier to understand and matches the style of other values

Questionable YAML changes (either broken before or now broken):
secureplatform: haStatCode
ptp600: receiveModulationMode

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.
2018-11-10 23:45:24 +00:00
Tony Murray
e736f5efec Updated YAML schema validation (#8808)
Changed some values to be explicitly boolean


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`
2018-06-15 09:45:20 +01:00