diff --git a/includes/definitions/discovery/gaia.yaml b/includes/definitions/discovery/gaia.yaml index 0dce7418ea..f7296d0d60 100644 --- a/includes/definitions/discovery/gaia.yaml +++ b/includes/definitions/discovery/gaia.yaml @@ -16,6 +16,7 @@ modules: - voltageSensorName - fwLSConnName - mglsGWIP + - vsxStatusVsName state: data: - @@ -207,6 +208,16 @@ modules: states: - { value: 0, generic: 1, graph: 1, descr: 'Down' } - { value: 1, generic: 0, graph: 1, descr: 'Up' } + - + oid: vsxStatusHAState + num_oid: '.1.3.6.1.4.1.2620.1.16.22.1.1.9.{{ $index }}' + index: 'vsxStatusVSId.{{ $index }}' + descr: '{{ $vsxStatusVsName }}' + group: High Availability Status + states: + - { value: 0, generic: 0, graph: 1, descr: 'Active' } + - { value: 1, generic: 0, graph: 1, descr: 'Standby' } + - { value: 2, generic: 0, graph: 1, descr: 'Backup' } #Update Status - oid: advancedUrlFilteringUpdateStatus diff --git a/tests/data/gaia_23900.json b/tests/data/gaia_23900.json index 458392d075..e8187d25c7 100644 --- a/tests/data/gaia_23900.json +++ b/tests/data/gaia_23900.json @@ -430,6 +430,174 @@ "sensor_prev": null, "user_func": null, "state_name": "haState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.1.0", + "sensor_index": "vsxStatusVSId.1.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vsx10", + "group": "High Availability 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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.2.0", + "sensor_index": "vsxStatusVSId.2.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs1", + "group": "High Availability 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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.3.0", + "sensor_index": "vsxStatusVSId.3.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs2", + "group": "High Availability Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2, + "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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.4.0", + "sensor_index": "vsxStatusVSId.4.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs3", + "group": "High Availability 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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.5.0", + "sensor_index": "vsxStatusVSId.5.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs4", + "group": "High Availability 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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.6.0", + "sensor_index": "vsxStatusVSId.6.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs5", + "group": "High Availability Status", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2, + "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, + "state_name": "vsxStatusHAState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2620.1.16.22.1.1.9.7.0", + "sensor_index": "vsxStatusVSId.7.0", + "sensor_type": "vsxStatusHAState", + "sensor_descr": "vs6", + "group": "High Availability 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, + "state_name": "vsxStatusHAState" } ], "state_indexes": [ @@ -845,6 +1013,27 @@ "state_draw_graph": 1, "state_value": 3, "state_generic_value": 1 + }, + { + "state_name": "vsxStatusHAState", + "state_descr": "Active", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "vsxStatusHAState", + "state_descr": "Standby", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 0 + }, + { + "state_name": "vsxStatusHAState", + "state_descr": "Backup", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 0 } ] }, diff --git a/tests/snmpsim/gaia_23900.snmprec b/tests/snmpsim/gaia_23900.snmprec index 2735177e5b..cc580a3362 100644 --- a/tests/snmpsim/gaia_23900.snmprec +++ b/tests/snmpsim/gaia_23900.snmprec @@ -25,6 +25,20 @@ 1.3.6.1.4.1.2620.1.6.5.1.0|4|Gaia 1.3.6.1.4.1.2620.1.6.16.3.0|4|LR123456789 1.3.6.1.4.1.2620.1.6.16.7.0|4|Check Point 23900 +1.3.6.1.4.1.2620.1.16.22.1.1.3.1.0|4|vsx10 +1.3.6.1.4.1.2620.1.16.22.1.1.3.2.0|4|vs1 +1.3.6.1.4.1.2620.1.16.22.1.1.3.3.0|4|vs2 +1.3.6.1.4.1.2620.1.16.22.1.1.3.4.0|4|vs3 +1.3.6.1.4.1.2620.1.16.22.1.1.3.5.0|4|vs4 +1.3.6.1.4.1.2620.1.16.22.1.1.3.6.0|4|vs5 +1.3.6.1.4.1.2620.1.16.22.1.1.3.7.0|4|vs6 +1.3.6.1.4.1.2620.1.16.22.1.1.9.1.0|4|Active +1.3.6.1.4.1.2620.1.16.22.1.1.9.2.0|4|Active +1.3.6.1.4.1.2620.1.16.22.1.1.9.3.0|4|Backup +1.3.6.1.4.1.2620.1.16.22.1.1.9.4.0|4|Standby +1.3.6.1.4.1.2620.1.16.22.1.1.9.5.0|4|Standby +1.3.6.1.4.1.2620.1.16.22.1.1.9.6.0|4|Backup +1.3.6.1.4.1.2620.1.16.22.1.1.9.7.0|4|Standby 1.3.6.1.4.1.2620.1.39.1.1.0|4|valid 1.3.6.1.4.1.2620.1.39.2.1.0|4|up-to-date 1.3.6.1.4.1.2620.1.43.1.1.0|4|valid