Files
librenms-librenms/misc/discovery_schema.json
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

564 lines
24 KiB
JSON

{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"mib": {
"type": "string"
},
"modules": {
"type": "object",
"properties": {
"mempools": {
"type": "object",
"properties": {
"pre-cache": {"$ref": "#/definitions/pre-cache"},
"data": {
"type": "array",
"items": {
"properties": {
"descr": {
"type": "string"
},
"free": {
"type": "string"
},
"index": {
"type": [
"integer",
"string"
]
},
"oid": {
"type": "string"
},
"percent_used": {
"type": "string"
},
"precision": {
"type": [
"integer",
"string"
]
},
"skip_values": {
"$ref": "#/definitions/skip_values"
},
"snmp_flags": {
"type": "string"
},
"total": {
"type": [
"integer",
"string"
]
},
"type": {
"type": "string"
},
"class": {
"type": "string"
},
"used": {
"type": "string"
},
"warn_percent": {
"type": [
"integer",
"string"
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"os": {
"type": "object",
"properties": {
"version": {
"type": ["string", "array"]
},
"hardware": {
"type": ["string", "array"]
},
"features": {
"type": ["string", "array"]
},
"serial": {
"type": ["string", "array"]
},
"location": {
"type": ["string", "array"]
},
"sysDescr_regex": {
"type": ["string", "array"]
},
"version_regex": {
"type": "string"
},
"hardware_mib": {
"type": "string"
},
"hardware_regex": {
"type": "string"
},
"features_regex": {
"type": "string"
},
"serial_regex": {
"type": "string"
},
"location_regex": {
"type": "string"
},
"version_template": {
"type": "string"
},
"hardware_template": {
"type": "string"
},
"features_template": {
"type": "string"
},
"serial_template": {
"type": "string"
},
"location_template": {
"type": "string"
}
},
"additionalProperties": false
},
"processors": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"num_oid": {
"type": "string"
},
"index": {
"type": [
"integer",
"string"
]
},
"descr": {
"type": "string"
},
"precision": {
"type": "integer"
},
"value": {
"type": "string"
},
"type": {
"type": "string"
},
"skip_values": {
"$ref": "#/definitions/skip_values"
},
"entPhysicalIndex": {
"type": "string"
},
"warn_percent": {
"type": "string"
},
"snmp_flags": {
"type": [
"string",
"array"
]
}
},
"additionalProperties": false,
"required": [
"num_oid",
"oid"
]
}
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"sensors": {
"type": "object",
"properties": {
"state": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"value": {
"type": "string"
},
"group": {
"type": "string"
},
"low_limit": {
"type": ["number", "string"]
},
"low_warn_limit": {
"type": ["number", "string"]
},
"warn_limit": {
"type": ["number", "string"]
},
"high_limit": {
"type": ["number", "string"]
},
"skip_value_lt": {
"type": "number"
},
"skip_value_gt": {
"type": "number"
},
"num_oid": {
"type": "string",
"pattern": "^(\\.\\d+)+(\\.?\\{\\{ \\$index \\}\\})?(\\.\\d+)*$"
},
"descr": {
"type": "string"
},
"index": {
"type": [
"integer",
"string"
]
},
"states": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"descr": {
"type": "string"
},
"graph": {
"type": "integer"
},
"generic": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"descr",
"generic",
"graph",
"value"
]
}
},
"state_name": {
"type": "string"
},
"skip_values": {
"$ref": "#/definitions/skip_values"
},
"snmp_flags": {
"type": [
"string",
"array"
]
},
"entPhysicalIndex": {
"type": ["integer", "string"]
},
"entPhysicalIndex_measured": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"descr",
"num_oid",
"oid",
"states"
]
}
},
"options": {"$ref": "#/definitions/options"}
},
"required": [
"data"
]
},
"voltage": {"$ref": "#/definitions/sensor"},
"fanspeed": {"$ref": "#/definitions/sensor"},
"temperature": {"$ref": "#/definitions/sensor"},
"pre-cache": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"oid": {
"type": "array",
"items": {
"type": "string"
}
},
"snmp_flags": {
"type": [
"string",
"array"
]
}
},
"additionalProperties": false,
"required": [
"oid"
]
}
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"humidity": {"$ref": "#/definitions/sensor"},
"airflow": {"$ref": "#/definitions/sensor"},
"current": {"$ref": "#/definitions/sensor"},
"frequency": {"$ref": "#/definitions/sensor"},
"power": {"$ref": "#/definitions/sensor"},
"pressure": {"$ref": "#/definitions/sensor"},
"cooling": {"$ref": "#/definitions/sensor"},
"charge": {"$ref": "#/definitions/sensor"},
"runtime": {"$ref": "#/definitions/sensor"},
"dbm": {"$ref": "#/definitions/sensor"},
"load": {"$ref": "#/definitions/sensor"},
"chromatic_dispersion": {"$ref": "#/definitions/sensor"},
"delay": {"$ref": "#/definitions/sensor"},
"quality_factor": {"$ref": "#/definitions/sensor"},
"snr": {"$ref": "#/definitions/sensor"},
"waterflow": {"$ref": "#/definitions/sensor"},
"eer": {"$ref": "#/definitions/sensor"}
}
}
}
}
},
"additionalProperties": false,
"required": [
"modules"
],
"definitions": {
"pre-cache": {
"type": "object",
"properties": {
"oids": {
"type": "array",
"items": {
"type": "string"
}
},
"snmp_flags": {
"type": [
"string",
"array"
]
}
},
"additionalProperties": false,
"required": [
"oids"
]
},
"sensor": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"num_oid": {
"type": "string",
"pattern": "^(\\.\\d+)+\\.?\\{\\{ \\$index \\}\\}(\\.\\d+)*$"
},
"index": {
"type": ["integer", "string"]
},
"descr": {
"type": "string"
},
"divisor": {
"type": "integer"
},
"multiplier": {
"type": "integer"
},
"value": {
"type": "string"
},
"group": {
"type": "string"
},
"low_limit": {
"type": ["number", "string"]
},
"low_warn_limit": {
"type": ["number", "string"]
},
"warn_limit": {
"type": ["number", "string"]
},
"high_limit": {
"type": ["number", "string"]
},
"skip_value_lt": {
"type": "number"
},
"skip_value_gt": {
"type": "number"
},
"skip_values": {
"$ref": "#/definitions/skip_values" },
"snmp_flags": {
"type": [
"string",
"array"
]
},
"entPhysicalIndex": {
"type": ["integer", "string"]
},
"entPhysicalIndex_measured": {
"type": "string"
},
"user_func": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"descr",
"num_oid",
"oid"
]
}
},
"options": {
"$ref": "#/definitions/options"
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"skip_values": {
"anyOf": [
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"op": {
"$ref": "#/definitions/comparison"
},
"value": {
"type": ["boolean", "number", "string", "array"],
"items": {
"type": ["number", "string"]
}
}
},
"additionalProperties": false,
"required": [
"oid",
"op",
"value"
]
}
]
}
}
]
},
"options": {
"type": "object",
"properties": {
"divisor": {
"type": "integer"
},
"skip_values": {
"$ref": "#/definitions/skip_values"
},
"skip_value_gt": {
"type": "integer"
},
"skip_value_lt": {
"type": "integer"
}
},
"additionalProperties": false
},
"comparison": {
"type": "string",
"enum": [
"=",
"!=",
"==",
"!==",
"<=",
">=",
"<",
">",
"starts",
"ends",
"contains",
"regex",
"not_starts",
"not_ends",
"not_contains",
"not_regex",
"in_array",
"not_in_array",
"exists"
]
}
}
}