summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/snmp/config_schema.json
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/go/collectors/go.d.plugin/modules/snmp/config_schema.json379
1 files changed, 379 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/snmp/config_schema.json b/src/go/collectors/go.d.plugin/modules/snmp/config_schema.json
new file mode 100644
index 000000000..a83a2da36
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/modules/snmp/config_schema.json
@@ -0,0 +1,379 @@
+{
+ "jsonSchema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "update_every": {
+ "title": "Update every",
+ "description": "Data collection interval, measured in seconds.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 1
+ },
+ "hostname": {
+ "title": "Hostname",
+ "description": "The hostname or IP address of the SNMP-enabled device.",
+ "type": "string"
+ },
+ "community": {
+ "title": "SNMPv1/2 community",
+ "description": "The SNMP community string for SNMPv1/v2c authentication.",
+ "type": "string",
+ "default": "public"
+ },
+ "options": {
+ "title": "Options",
+ "description": "Configuration options for SNMP monitoring.",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "version": {
+ "title": "SNMP version",
+ "type": "string",
+ "enum": [
+ "1",
+ "2c",
+ "3"
+ ],
+ "default": "2c"
+ },
+ "port": {
+ "title": "Port",
+ "description": "The port number on which the SNMP service is running.",
+ "type": "integer",
+ "exclusiveMinimum": 0,
+ "default": 161
+ },
+ "retries": {
+ "title": "Retries",
+ "description": "The number of retries to attempt for SNMP requests.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 161
+ },
+ "timeout": {
+ "title": "Timeout",
+ "description": "The timeout duration in seconds for SNMP requests.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 1
+ },
+ "max_request_size": {
+ "title": "Max OIDs in request",
+ "description": "The maximum number of OIDs allowed in a single SNMP request.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 60
+ }
+ },
+ "required": [
+ "version",
+ "port",
+ "retries",
+ "timeout",
+ "max_request_size"
+ ]
+ },
+ "user": {
+ "title": "SNMPv3 configuration",
+ "description": "Configuration options for SNMPv3 authentication and encryption.",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "name": {
+ "title": "Username",
+ "description": "The username for SNMPv3 authentication.",
+ "type": "string"
+ },
+ "level": {
+ "title": "Security level",
+ "description": "Controls the security aspects of SNMPv3 communication, including authentication and encryption.",
+ "type": "string",
+ "enum": [
+ "none",
+ "authNoPriv",
+ "authPriv"
+ ],
+ "default": "authPriv"
+ },
+ "auth_proto": {
+ "title": "Authentication protocol",
+ "type": "string",
+ "enum": [
+ "none",
+ "md5",
+ "sha",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha512"
+ ],
+ "default": "sha512"
+ },
+ "auth_key": {
+ "title": "Authentication passphrase",
+ "type": "string"
+ },
+ "priv_proto": {
+ "title": "Privacy protocol",
+ "type": "string",
+ "enum": [
+ "none",
+ "des",
+ "aes",
+ "aes192",
+ "aes256",
+ "aes192c"
+ ],
+ "default": "aes192c"
+ },
+ "priv_key": {
+ "title": "Privacy passphrase",
+ "type": "string"
+ }
+ }
+ },
+ "charts": {
+ "title": "Charts configuration",
+ "type": [
+ "array",
+ "null"
+ ],
+ "uniqueItems": true,
+ "minItems": 1,
+ "items": {
+ "title": "Chart",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "id": {
+ "title": "ID",
+ "description": "Unique identifier for the chart.",
+ "type": "string"
+ },
+ "title": {
+ "title": "Title",
+ "description": "Title of the chart.",
+ "type": "string"
+ },
+ "units": {
+ "title": "Units",
+ "description": "Unit label for the vertical axis on charts.",
+ "type": "string"
+ },
+ "family": {
+ "title": "Family",
+ "description": "Subsection on the dashboard where the chart will be displayed.",
+ "type": "string"
+ },
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "enum": [
+ "line",
+ "area",
+ "stacked"
+ ],
+ "default": "line"
+ },
+ "priority": {
+ "title": "Priority",
+ "description": "Rendering priority of the chart on the dashboard. Lower priority values will cause the chart to appear before those with higher priority values.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 90000
+ },
+ "multiply_range": {
+ "title": "OID index range",
+ "description": "Specifies the range of indexes used to create multiple charts. If set, a chart will be created for each index in the specified range. Each chart will have the index appended to the OID dimension.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "title": "Index",
+ "type": "integer",
+ "minimum": 0
+ },
+ "uniqueItems": true,
+ "maxItems": 2
+ },
+ "dimensions": {
+ "title": "Dimensions",
+ "description": "Configuration for dimensions of the chart.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "uniqueItems": true,
+ "minItems": 1,
+ "items": {
+ "title": "Dimension configuration",
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "oid": {
+ "title": "OID",
+ "description": "SNMP OID.",
+ "type": "string"
+ },
+ "name": {
+ "title": "Dimension",
+ "description": "Name of the dimension.",
+ "type": "string"
+ },
+ "algorithm": {
+ "title": "Algorithm",
+ "description": "Algorithm of the dimension.",
+ "type": "string",
+ "enum": [
+ "absolute",
+ "incremental"
+ ],
+ "default": "absolute"
+ },
+ "multiplier": {
+ "title": "Multiplier",
+ "description": "Value to multiply the collected value.",
+ "type": "integer",
+ "not": {
+ "const": 0
+ },
+ "default": 1
+ },
+ "divisor": {
+ "title": "Divisor",
+ "description": "Value to divide the collected value.",
+ "type": "integer",
+ "not": {
+ "const": 0
+ },
+ "default": 1
+ }
+ },
+ "required": [
+ "oid",
+ "name",
+ "algorithm",
+ "multiplier",
+ "divisor"
+ ]
+ }
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "units",
+ "family",
+ "type",
+ "priority",
+ "dimensions"
+ ]
+ }
+ }
+ },
+ "required": [
+ "hostname",
+ "community",
+ "options",
+ "charts"
+ ],
+ "additionalProperties": false,
+ "patternProperties": {
+ "^name$": {}
+ }
+ },
+ "uiSchema": {
+ "uiOptions": {
+ "fullPage": true
+ },
+ "options": {
+ "version": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ }
+ },
+ "user": {
+ "level": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ },
+ "auth_proto": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ },
+ "priv_proto": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ }
+ },
+ "charts": {
+ "items": {
+ "ui:collapsible": true,
+ "type": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ },
+ "multiply_range": {
+ "ui:listFlavour": "list"
+ },
+ "dimensions": {
+ "items": {
+ "ui:collapsible": true,
+ "algorithm": {
+ "ui:widget": "radio",
+ "ui:options": {
+ "inline": true
+ }
+ }
+ }
+ }
+ }
+ },
+ "ui:flavour": "tabs",
+ "ui:options": {
+ "tabs": [
+ {
+ "title": "Base",
+ "fields": [
+ "update_every",
+ "hostname",
+ "community",
+ "options"
+ ]
+ },
+ {
+ "title": "SNMPv3",
+ "fields": [
+ "user"
+ ]
+ },
+ {
+ "title": "Charts",
+ "fields": [
+ "charts"
+ ]
+ }
+ ]
+ }
+ }
+}