From aa446ab7a7235d7c464aa9146bc1aa388ff208f4 Mon Sep 17 00:00:00 2001 From: Jadson Santos Date: Thu, 15 Sep 2022 08:18:04 -0300 Subject: [PATCH] Home Assistant Template for Zabbix 6.2 --- .../template_homeassistant/6.2/README.md | 16 +++++++ .../6.2/zbx_export_templates.yaml | 48 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Applications/Others/template_homeassistant/6.2/README.md create mode 100644 Applications/Others/template_homeassistant/6.2/zbx_export_templates.yaml diff --git a/Applications/Others/template_homeassistant/6.2/README.md b/Applications/Others/template_homeassistant/6.2/README.md new file mode 100644 index 000000000..34c2eab04 --- /dev/null +++ b/Applications/Others/template_homeassistant/6.2/README.md @@ -0,0 +1,16 @@ +# Home Assistant + +## Description + +Template to monitor home assistant application api + +## Overview + +Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. + +## Macros used + +| Macro | Example | Description | +|--------------------------|-------------------------------|------------------| +| `{$HOMEASSISTANT_URL}` | http://192.168.0.50:8123 | URL Application | +| `{$HOMEASSISTANT_TOKEN}` | Bearer XxXxXxX.xXxXxXXx.XxXxX | Long Lived Token | \ No newline at end of file diff --git a/Applications/Others/template_homeassistant/6.2/zbx_export_templates.yaml b/Applications/Others/template_homeassistant/6.2/zbx_export_templates.yaml new file mode 100644 index 000000000..0fafcd4bb --- /dev/null +++ b/Applications/Others/template_homeassistant/6.2/zbx_export_templates.yaml @@ -0,0 +1,48 @@ +zabbix_export: + version: '6.2' + date: '2022-09-15T10:48:29Z' + template_groups: + - + uuid: 7df96b18c230490a9a0a9e2307226338 + name: Templates + templates: + - + uuid: a8be5b4f74a84f5cb7aae42144bfd730 + template: 'Home Assistant Service' + name: 'Home Assistant Service' + description: | + Hello friends, + + I created this zabbix template to monitor home assistant application api. + + ## Author + + gtjadsonsantos + groups: + - + name: Templates + items: + - + uuid: 70e9092bd1304ef4876a4218c48e4df3 + name: 'API Home Assistant' + type: HTTP_AGENT + key: api.homeassistant.service + trends: '0' + value_type: TEXT + url: '{$HOMEASSISTANT_URL}/api/' + posts: '{"message":"API running."}' + status_codes: 200-502 + headers: + - + name: Authorization + value: '{$HOMEASSISTANT_TOKEN}' + tags: + - + tag: Application + value: 'Home Assistant Service' + triggers: + - + uuid: c0bc008cf06c40989c1e0e1a8f447e56 + expression: 'last(/Home Assistant Service/api.homeassistant.service,#1)="\"\"" or last(/Home Assistant Service/api.homeassistant.service,#1)="Bad Gateway" or last(/Home Assistant Service/api.homeassistant.service,#1)="Unauthorized" ' + name: 'Home Assistant Unavailable' + priority: HIGH