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

534 lines
24 KiB
JSON

{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"mib": {
"type": "string"
},
"modules": {
"type": "object",
"properties": {
"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_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": {
"anyOf": [
{
"type": "integer"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"op": {
"$ref": "#/definitions/comparison"
},
"value": {
"type": ["boolean", "integer", "string", "array"],
"items": {
"type": ["integer", "string"]
}
}
},
"additionalProperties": false,
"required": [
"oid",
"op",
"value"
]
}
]
}
}
]
},
"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": {
"anyOf": [
{
"type": "integer"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"op": {
"$ref": "#/definitions/comparison"
},
"value": {
"type": ["boolean", "integer", "string", "array"],
"items": {
"type": ["integer", "string"]
}
}
},
"required": [
"oid",
"op",
"value"
]
}
}
]
},
"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": {
"sensor": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/data"
},
"options": {
"$ref": "#/definitions/options"
}
},
"additionalProperties": false,
"required": [
"data"
]
},
"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": {
"type": ["number", "array"],
"items": {
"type": "object",
"properties": {
"oid": {
"type": "string"
},
"op": {
"$ref": "#/definitions/comparison"
},
"value": {
"type": ["boolean", "integer", "string", "array"],
"items": {
"type": ["integer", "string"]
}
}
},
"additionalProperties": false,
"required": [
"oid",
"op",
"value"
]
}
},
"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": {
"type": "object",
"properties": {
"divisor": {
"type": "integer"
},
"skip_values": {
"anyOf": [
{
"type": "integer"
},
{
"type": "array",
"items": {
"type": "integer"
}
}
]
},
"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"
]
}
}
}