diff --git a/zbx_export_templates.json b/zbx_export_templates.json index 1f7ab37..d826cc7 100644 --- a/zbx_export_templates.json +++ b/zbx_export_templates.json @@ -1,7 +1,7 @@ { "zabbix_export": { "version": "5.4", - "date": "2021-08-25T21:27:52Z", + "date": "2021-08-30T22:33:56Z", "groups": [ { "uuid": "15155c95a3d048f4856272ae12fd42c5", @@ -3395,6 +3395,7 @@ "name": "mca-dump-feature-discovery", "type": "EXTERNAL", "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"SWITCH_FEATURE_DISCOVERY\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\" ]", + "delay": "15m", "history": "0", "trends": "0", "value_type": "TEXT", @@ -3634,6 +3635,57 @@ } ], "discovery_rules": [ + { + "uuid": "c63e03a538104cdebad4f428337e2952", + "name": "Fan Discovery", + "type": "DEPENDENT", + "key": "fan_discovery", + "delay": "0", + "item_prototypes": [ + { + "uuid": "b84302d8102645eb882c4cec6131dddc", + "name": "Fan Level", + "type": "DEPENDENT", + "key": "_[{#FAN_LEVEL_KEY_NAME}]", + "delay": "0", + "units": "%", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.fan_level" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"SWITCH\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\" ]" + }, + "tags": [ + { + "tag": "Application", + "value": "Power" + } + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"SWITCH_FEATURE_DISCOVERY\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\" ]" + }, + "lld_macro_paths": [ + { + "lld_macro": "{#FAN_LEVEL_KEY_NAME}", + "path": "$.fan_level_key_name" + } + ], + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$[?(@.has_fan==\"true\")]" + ] + } + ] + }, { "uuid": "3440ec98490a4b40bcc1dddca0955cb8", "name": "POE Discovery", diff --git a/zbx_export_templates.xml b/zbx_export_templates.xml index 016b766..4b82470 100644 --- a/zbx_export_templates.xml +++ b/zbx_export_templates.xml @@ -1,7 +1,7 @@ 5.4 - 2021-08-25T21:27:50Z + 2021-08-30T22:33:54Z 15155c95a3d048f4856272ae12fd42c5 @@ -3426,6 +3426,7 @@ Additionally,. this will fill the OS version and the MAC address in the inventor mca-dump-feature-discovery EXTERNAL mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH_FEATURE_DISCOVERY", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ] + 15m 0 0 TEXT @@ -3665,6 +3666,57 @@ Additionally,. this will fill the OS version and the MAC address in the inventor + + c63e03a538104cdebad4f428337e2952 + Fan Discovery + DEPENDENT + fan_discovery + 0 + + + b84302d8102645eb882c4cec6131dddc + Fan Level + DEPENDENT + _[{#FAN_LEVEL_KEY_NAME}] + 0 + % + + + JSONPATH + + $.fan_level + + + + + mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ] + + + + Application + Power + + + + + + mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH_FEATURE_DISCOVERY", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ] + + + + {#FAN_LEVEL_KEY_NAME} + $.fan_level_key_name + + + + + JSONPATH + + $[?(@.has_fan=="true")] + + + + 3440ec98490a4b40bcc1dddca0955cb8 POE Discovery diff --git a/zbx_export_templates.yaml b/zbx_export_templates.yaml index d9028aa..c72b48e 100644 --- a/zbx_export_templates.yaml +++ b/zbx_export_templates.yaml @@ -1,6 +1,6 @@ zabbix_export: version: '5.4' - date: '2021-08-25T21:27:47Z' + date: '2021-08-30T22:33:51Z' groups: - uuid: 15155c95a3d048f4856272ae12fd42c5 @@ -2579,6 +2579,7 @@ zabbix_export: name: mca-dump-feature-discovery type: EXTERNAL key: 'mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH_FEATURE_DISCOVERY", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ]' + delay: 15m history: '0' trends: '0' value_type: TEXT @@ -2752,6 +2753,42 @@ zabbix_export: name: '{HOST.NAME} SSH has not been available for more than {$UNIFI_ALERT_PERIOD}' expression: 'nodata(/Unifi SSH Host/load_avg_1mn,{$UNIFI_ALERT_PERIOD})=1' discovery_rules: + - + uuid: c63e03a538104cdebad4f428337e2952 + name: 'Fan Discovery' + type: DEPENDENT + key: fan_discovery + delay: '0' + item_prototypes: + - + uuid: b84302d8102645eb882c4cec6131dddc + name: 'Fan Level' + type: DEPENDENT + key: '_[{#FAN_LEVEL_KEY_NAME}]' + delay: '0' + units: '%' + preprocessing: + - + type: JSONPATH + parameters: + - $.fan_level + master_item: + key: 'mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ]' + tags: + - + tag: Application + value: Power + master_item: + key: 'mca-dump-short.sh["-d","{HOST.CONN}", "-u", "{$UNIFI_USER}", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "SWITCH_FEATURE_DISCOVERY", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}" ]' + lld_macro_paths: + - + lld_macro: '{#FAN_LEVEL_KEY_NAME}' + path: $.fan_level_key_name + preprocessing: + - + type: JSONPATH + parameters: + - '$[?(@.has_fan=="true")]' - uuid: 3440ec98490a4b40bcc1dddca0955cb8 name: 'POE Discovery'