From b27dfa5891abc224f8b7c8e3e9408f46baa6b1a3 Mon Sep 17 00:00:00 2001 From: AdamB Date: Sat, 8 Jul 2023 05:35:53 +0100 Subject: [PATCH] Add support for PrimeKey Software Appliance (#15059) * Add PK-SOFTWARE-APPLIANCE-V2 MIB * Add support for PrimeKey Software Appliance * Move file to correct path * Make the OS detection more specific * Thanks vscode * Sync filename with osname * Not supported * Track SQL database size as volume * Two fixes --- .../definitions/discovery/primekey-sw.yaml | 274 ++++++ includes/definitions/primekey-sw.yaml | 18 + .../discovery/storage/primekey-sw-sql.inc.php | 18 + .../polling/storage/primekey-sw-sql.inc.php | 7 + mibs/primekey/PK-SOFTWARE-APPLIANCE-V2 | 428 +++++++++ tests/data/primekey-sw.json | 885 ++++++++++++++++++ tests/snmpsim/primekey-sw.snmprec | 31 + 7 files changed, 1661 insertions(+) create mode 100644 includes/definitions/discovery/primekey-sw.yaml create mode 100644 includes/definitions/primekey-sw.yaml create mode 100644 includes/discovery/storage/primekey-sw-sql.inc.php create mode 100644 includes/polling/storage/primekey-sw-sql.inc.php create mode 100644 mibs/primekey/PK-SOFTWARE-APPLIANCE-V2 create mode 100644 tests/data/primekey-sw.json create mode 100644 tests/snmpsim/primekey-sw.snmprec diff --git a/includes/definitions/discovery/primekey-sw.yaml b/includes/definitions/discovery/primekey-sw.yaml new file mode 100644 index 0000000000..b5bfd21740 --- /dev/null +++ b/includes/definitions/discovery/primekey-sw.yaml @@ -0,0 +1,274 @@ +mib: PK-SOFTWARE-APPLIANCE-V2 +modules: + os: + version: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-systemVersion.0 + sensors: + percent: + options: + skip_value_lt: 0 + data: + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-internal-databaseUsage + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-internal-databaseUsage + num_oid: '.1.3.6.1.4.1.22408.1.4.1.3.1.4.{{ $index }}' + descr: 'Internal Database Usage %' + group: 'Database' + index: pk-SAV2-internal-databaseUsage + warn_limit: 80 + high_limit: 95 + state: + options: + skip_value_lt: 0 + data: + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-authentication-service-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-authentication-service-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.1.{{ $index }}' + descr: 'Authentication' + group: 'Service Status' + index: pk-SAV2-authentication-service-status + state_name: pk-SAV2-authentication-service-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-crs-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-crs-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.2.{{ $index }}' + descr: 'Container Runtime' + group: 'Service Status' + index: pk-SAV2-crs-status + state_name: pk-SAV2-crs-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-documentation-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-documentation-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.3.{{ $index }}' + descr: 'Documentation' + group: 'Service Status' + index: pk-SAV2-documentation-status + state_name: pk-SAV2-documentation-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-monitoring-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-monitoring-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.4.{{ $index }}' + descr: 'Monitoring' + group: 'Service Status' + index: pk-SAV2-monitoring-status + state_name: pk-SAV2-monitoring-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-persistence-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-persistence-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.5.{{ $index }}' + descr: 'Persistent Data Store' + group: 'Service Status' + index: pk-SAV2-persistence-status + state_name: pk-SAV2-persistence-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-snmp-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-snmp-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.6.{{ $index }}' + descr: 'SNMP' + group: 'Service Status' + index: pk-SAV2-snmp-status + state_name: pk-SAV2-snmp-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-spc-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-spc-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.7.{{ $index }}' + descr: 'Support Package Creator' + group: 'Service Status' + index: pk-SAV2-spc-status + state_name: pk-SAV2-spc-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vs-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vs-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.8.{{ $index }}' + descr: 'Valuestore' + group: 'Service Status' + index: pk-SAV2-vs-status + state_name: pk-SAV2-vs-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vsapi-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vsapi-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.9.{{ $index }}' + descr: 'Valuestore API' + group: 'Service Status' + index: pk-SAV2-vsapi-status + state_name: pk-SAV2-vsapi-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-webconf-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-webconf-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.10.{{ $index }}' + descr: 'Webconf' + group: 'Service Status' + index: pk-SAV2-webconf-status + state_name: pk-SAV2-webconf-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vault-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-vault-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.1.11.{{ $index }}' + descr: 'Vault' + group: 'Service Status' + index: pk-SAV2-vault-status + state_name: pk-SAV2-vault-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-networkLink-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-networkLink-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.2.1.{{ $index }}' + descr: 'Network Link' + group: 'Network Status' + index: pk-SAV2-networkLink-status + state_name: pk-SAV2-networkLink-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-internal-database-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-internal-database-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.3.1.1.{{ $index }}' + descr: 'Internal Database' + group: 'Service Status' + index: pk-SAV2-internal-database-status + state_name: pk-SAV2-internal-database-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-ejbca-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-ejbca-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.5.1.1.{{ $index }}' + descr: 'EJBCA' + group: 'Application Status' + index: pk-SAV2-ejbca-status + state_name: pk-SAV2-ejbca-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-ejbcaHealthCheck + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-ejbcaHealthCheck + num_oid: '.1.3.6.1.4.1.22408.1.4.1.5.1.3.{{ $index }}' + descr: 'EJBCA Health Check' + group: 'Application Status' + index: pk-SAV2-ejbcaHealthCheck + state_name: pk-SAV2-ejbcaHealthChecks + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-signserver-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-signserver-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.5.2.1.{{ $index }}' + descr: 'SignServer' + group: 'Application Status' + index: pk-SAV2-signserver-status + state_name: pk-SAV2-signserver-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-signserverHealthCheck + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-signserverHealthCheck + num_oid: '.1.3.6.1.4.1.22408.1.4.1.5.2.3.{{ $index }}' + descr: 'SignServer Health Check' + group: 'Application Status' + index: pk-SAV2-signserverHealthCheck + state_name: pk-SAV2-signserverHealthCheck + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-luna7-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-luna7-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.6.2.{{ $index }}' + descr: 'Luna 7 HSM' + group: 'HSM Status' + index: pk-SAV2-hsm-driver-luna7-status + state_name: pk-SAV2-hsm-driver-luna7-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-softhsm-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-softhsm-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.6.1.{{ $index }}' + descr: 'SoftHSM' + group: 'HSM Status' + index: pk-SAV2-hsm-driver-softhsm-status + state_name: pk-SAV2-hsm-driver-softhsm-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-utimaco-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-utimaco-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.6.3.1.{{ $index }}' + descr: 'Utimaco' + group: 'HSM Status' + index: pk-SAV2-hsm-driver-utimaco-status + state_name: pk-SAV2-hsm-driver-utimaco-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } + - + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-ncipher-status + value: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-hsm-driver-ncipher-status + num_oid: '.1.3.6.1.4.1.22408.1.4.1.6.4.{{ $index }}' + descr: 'nCipher' + group: 'HSM Status' + index: pk-SAV2-hsm-driver-ncipher-status + state_name: pk-SAV2-hsm-driver-ncipher-status + states: + - { value: 0, generic: 0, graph: 0, descr: 'OK' } + - { value: 1, generic: 2, graph: 1, descr: 'Fault' } + - { value: -1, generic: 3, graph: 1, descr: 'Internal Error' } diff --git a/includes/definitions/primekey-sw.yaml b/includes/definitions/primekey-sw.yaml new file mode 100644 index 0000000000..230fafe867 --- /dev/null +++ b/includes/definitions/primekey-sw.yaml @@ -0,0 +1,18 @@ +os: primekey-sw +text: "Software Appliance" +type: appliance +icon: primekey +group: primekey +mib_dir: primekey +snmp_bulk: false +discovery_modules: + bgp-peers: false + cisco-vrf-lite: false + stp: false +discovery: + - sysObjectID: + - .1.3.6.1.4.1.8072.3.2.10 + snmpget: + oid: PK-SOFTWARE-APPLIANCE-V2::pk-SAV2-systemVersion.0 + op: "!=" + value: false diff --git a/includes/discovery/storage/primekey-sw-sql.inc.php b/includes/discovery/storage/primekey-sw-sql.inc.php new file mode 100644 index 0000000000..ca553ecc9b --- /dev/null +++ b/includes/discovery/storage/primekey-sw-sql.inc.php @@ -0,0 +1,18 @@ +", + "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", + "sysDescr": "Linux snmp 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Tue Feb 21 04:20:52 EST 2023 x86_64", + "sysContact": "", + "version": "2.3.3", + "hardware": null, + "features": null, + "location": "", + "os": "primekey-sw", + "type": "appliance", + "serial": null, + "icon": "primekey.svg" + } + ] + }, + "poller": "matches discovery" + }, + "sensors": { + "discovery": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "percent", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.3.1.4.0", + "sensor_index": "pk-SAV2-internal-databaseUsage", + "sensor_type": "primekey-sw", + "sensor_descr": "Internal Database Usage %", + "group": "Database", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 1, + "sensor_limit": 95, + "sensor_limit_warn": 80, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.1.0", + "sensor_index": "pk-SAV2-authentication-service-status", + "sensor_type": "pk-SAV2-authentication-service-status", + "sensor_descr": "Authentication", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-authentication-service-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.2.0", + "sensor_index": "pk-SAV2-crs-status", + "sensor_type": "pk-SAV2-crs-status", + "sensor_descr": "Container Runtime", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-crs-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.3.0", + "sensor_index": "pk-SAV2-documentation-status", + "sensor_type": "pk-SAV2-documentation-status", + "sensor_descr": "Documentation", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-documentation-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.5.1.1.0", + "sensor_index": "pk-SAV2-ejbca-status", + "sensor_type": "pk-SAV2-ejbca-status", + "sensor_descr": "EJBCA", + "group": "Application Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-ejbca-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.5.1.3.0", + "sensor_index": "pk-SAV2-ejbcaHealthCheck", + "sensor_type": "pk-SAV2-ejbcaHealthChecks", + "sensor_descr": "EJBCA Health Check", + "group": "Application Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-ejbcaHealthChecks" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.6.2.0", + "sensor_index": "pk-SAV2-hsm-driver-luna7-status", + "sensor_type": "pk-SAV2-hsm-driver-luna7-status", + "sensor_descr": "Luna 7 HSM", + "group": "HSM Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 1, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-hsm-driver-luna7-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.6.1.0", + "sensor_index": "pk-SAV2-hsm-driver-softhsm-status", + "sensor_type": "pk-SAV2-hsm-driver-softhsm-status", + "sensor_descr": "SoftHSM", + "group": "HSM Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-hsm-driver-softhsm-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.6.3.1.0", + "sensor_index": "pk-SAV2-hsm-driver-utimaco-status", + "sensor_type": "pk-SAV2-hsm-driver-utimaco-status", + "sensor_descr": "Utimaco", + "group": "HSM Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 1, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-hsm-driver-utimaco-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.3.1.1.0", + "sensor_index": "pk-SAV2-internal-database-status", + "sensor_type": "pk-SAV2-internal-database-status", + "sensor_descr": "Internal Database", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-internal-database-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.4.0", + "sensor_index": "pk-SAV2-monitoring-status", + "sensor_type": "pk-SAV2-monitoring-status", + "sensor_descr": "Monitoring", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-monitoring-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.2.1.0", + "sensor_index": "pk-SAV2-networkLink-status", + "sensor_type": "pk-SAV2-networkLink-status", + "sensor_descr": "Network Link", + "group": "Network Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-networkLink-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.5.0", + "sensor_index": "pk-SAV2-persistence-status", + "sensor_type": "pk-SAV2-persistence-status", + "sensor_descr": "Persistent Data Store", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-persistence-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.6.0", + "sensor_index": "pk-SAV2-snmp-status", + "sensor_type": "pk-SAV2-snmp-status", + "sensor_descr": "SNMP", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-snmp-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.7.0", + "sensor_index": "pk-SAV2-spc-status", + "sensor_type": "pk-SAV2-spc-status", + "sensor_descr": "Support Package Creator", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-spc-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.11.0", + "sensor_index": "pk-SAV2-vault-status", + "sensor_type": "pk-SAV2-vault-status", + "sensor_descr": "Vault", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-vault-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.8.0", + "sensor_index": "pk-SAV2-vs-status", + "sensor_type": "pk-SAV2-vs-status", + "sensor_descr": "Valuestore", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-vs-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.9.0", + "sensor_index": "pk-SAV2-vsapi-status", + "sensor_type": "pk-SAV2-vsapi-status", + "sensor_descr": "Valuestore API", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-vsapi-status" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.22408.1.4.1.1.10.0", + "sensor_index": "pk-SAV2-webconf-status", + "sensor_type": "pk-SAV2-webconf-status", + "sensor_descr": "Webconf", + "group": "Service Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "pk-SAV2-webconf-status" + } + ], + "state_indexes": [ + { + "state_name": "pk-SAV2-authentication-service-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-authentication-service-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-authentication-service-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-crs-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-crs-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-crs-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-documentation-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-documentation-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-documentation-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-ejbca-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-ejbca-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-ejbca-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-ejbcaHealthChecks", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-ejbcaHealthChecks", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-ejbcaHealthChecks", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-hsm-driver-luna7-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-hsm-driver-luna7-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-hsm-driver-luna7-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-hsm-driver-softhsm-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-hsm-driver-softhsm-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-hsm-driver-softhsm-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-hsm-driver-utimaco-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-hsm-driver-utimaco-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-hsm-driver-utimaco-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-internal-database-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-internal-database-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-internal-database-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-monitoring-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-monitoring-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-monitoring-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-networkLink-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-networkLink-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-networkLink-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-persistence-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-persistence-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-persistence-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-snmp-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-snmp-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-snmp-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-spc-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-spc-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-spc-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-vault-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-vault-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-vault-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-vs-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-vs-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-vs-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-vsapi-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-vsapi-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-vsapi-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "pk-SAV2-webconf-status", + "state_descr": "Internal Error", + "state_draw_graph": 1, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "pk-SAV2-webconf-status", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "pk-SAV2-webconf-status", + "state_descr": "Fault", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + } + ] + }, + "poller": "matches discovery" + } +} diff --git a/tests/snmpsim/primekey-sw.snmprec b/tests/snmpsim/primekey-sw.snmprec new file mode 100644 index 0000000000..f818b8d253 --- /dev/null +++ b/tests/snmpsim/primekey-sw.snmprec @@ -0,0 +1,31 @@ +1.3.6.1.2.1.1.1.0|4|Linux snmp 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Tue Feb 21 04:20:52 EST 2023 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|503754 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.25.1.1.0|67|4195757 +1.3.6.1.4.1.22408.1.4.1.1.1.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.2.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.3.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.4.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.5.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.6.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.7.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.8.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.9.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.10.0|2|0 +1.3.6.1.4.1.22408.1.4.1.1.11.0|2|0 +1.3.6.1.4.1.22408.1.4.1.2.1.0|2|0 +1.3.6.1.4.1.22408.1.4.1.3.1.1.0|2|0 +1.3.6.1.4.1.22408.1.4.1.3.1.2.0|2|1898247 +1.3.6.1.4.1.22408.1.4.1.3.1.3.0|2|1998634 +1.3.6.1.4.1.22408.1.4.1.3.1.4.0|2|1 +1.3.6.1.4.1.22408.1.4.1.4.1.0|4|2.3.3 +1.3.6.1.4.1.22408.1.4.1.5.1.1.0|2|0 +1.3.6.1.4.1.22408.1.4.1.5.1.3.0|2|0 +1.3.6.1.4.1.22408.1.4.1.5.2.1.0|2|-1 +1.3.6.1.4.1.22408.1.4.1.5.2.3.0|2|-1 +1.3.6.1.4.1.22408.1.4.1.6.1.0|2|0 +1.3.6.1.4.1.22408.1.4.1.6.2.0|2|1 +1.3.6.1.4.1.22408.1.4.1.6.3.1.0|2|1 \ No newline at end of file