mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-04-30 08:17:35 +00:00
Add documentation for publish state changes to Zabbix (#15130)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
77a4bfbc06
commit
d153e47bfd
@ -11,7 +11,9 @@ ha_domain: zabbix
|
|||||||
|
|
||||||
The `zabbix` integration is the main integration to connect to a [Zabbix](https://www.zabbix.com/) monitoring instance via the Zabbix API.
|
The `zabbix` integration is the main integration to connect to a [Zabbix](https://www.zabbix.com/) monitoring instance via the Zabbix API.
|
||||||
|
|
||||||
There is currently support for the following device types within Home Assistant:
|
It is possible to publish Home Assistant state changes to Zabbix. In Zabbix a host has to be created which will contain the Home Assistant states as individual items. These items are automatically created using Zabbix Low-Level Discovery (LLD). In order to make setup in Zabbix easy, you can use this [template](/assets/integrations/zabbix/zbx_template_home_assistant.xml) for the host.
|
||||||
|
|
||||||
|
There is currently also support for the following device types within Home Assistant:
|
||||||
|
|
||||||
- [Sensor](#sensor)
|
- [Sensor](#sensor)
|
||||||
|
|
||||||
@ -48,6 +50,44 @@ password:
|
|||||||
description: Your Zabbix password.
|
description: Your Zabbix password.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
publish_states_host:
|
||||||
|
description: The host that will receive the state changes from Home Assistant. It needs to be manually created in Zabbix first and have the template associated with it (see above).
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
exclude:
|
||||||
|
type: list
|
||||||
|
description: Configure which integrations should be excluded from being published to Zabbix. ([Configure Filter](#configure-filter))
|
||||||
|
required: false
|
||||||
|
keys:
|
||||||
|
entities:
|
||||||
|
type: [string, list]
|
||||||
|
description: The list of entity ids to be excluded from being published to Zabbix.
|
||||||
|
required: false
|
||||||
|
entity_globs:
|
||||||
|
type: [string, list]
|
||||||
|
description: Exclude all entities matching a listed pattern.
|
||||||
|
required: false
|
||||||
|
domains:
|
||||||
|
type: [string, list]
|
||||||
|
description: The list of domains to be excluded from being published to Zabbix.
|
||||||
|
required: false
|
||||||
|
include:
|
||||||
|
type: list
|
||||||
|
description: Configure which integrations should be included in being published to Zabbix. If set, all other entities will not be published to Zabbix. ([Configure Filter](#configure-filter))
|
||||||
|
required: false
|
||||||
|
keys:
|
||||||
|
entities:
|
||||||
|
type: [string, list]
|
||||||
|
description: The list of entity ids to be included in being published to Zabbix.
|
||||||
|
required: false
|
||||||
|
entity_globs:
|
||||||
|
type: [string, list]
|
||||||
|
description: Include all entities matching a listed pattern.
|
||||||
|
required: false
|
||||||
|
domains:
|
||||||
|
type: [string, list]
|
||||||
|
description: The list of domains to be included in being published to Zabbix.
|
||||||
|
required: false
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Full configuration
|
### Full configuration
|
||||||
@ -60,8 +100,55 @@ zabbix:
|
|||||||
ssl: false
|
ssl: false
|
||||||
username: USERNAME
|
username: USERNAME
|
||||||
password: PASSWORD
|
password: PASSWORD
|
||||||
|
publish_states_host: homeassistant
|
||||||
|
exclude:
|
||||||
|
domains:
|
||||||
|
- device_tracker
|
||||||
|
entities:
|
||||||
|
- sun.sun
|
||||||
|
- sensor.time
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configure Filter
|
||||||
|
|
||||||
|
By default, no entity will be excluded. To limit which entities are being published to Zabbix, you can use the `include` and `exclude` parameters.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example filter to include specified domains and exclude specified entities
|
||||||
|
zabbix:
|
||||||
|
include:
|
||||||
|
domains:
|
||||||
|
- alarm_control_panel
|
||||||
|
- light
|
||||||
|
entity_globs:
|
||||||
|
- binary_sensor.*_occupancy
|
||||||
|
exclude:
|
||||||
|
entities:
|
||||||
|
- light.kitchen_light
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
Filters are applied as follows:
|
||||||
|
|
||||||
|
1. No includes or excludes - pass all entities
|
||||||
|
2. Includes, no excludes - only include specified entities
|
||||||
|
3. Excludes, no includes - only exclude specified entities
|
||||||
|
4. Both includes and excludes:
|
||||||
|
- Include domain and/or glob patterns specified
|
||||||
|
- If domain is included, and entity not excluded or match exclude glob pattern, pass
|
||||||
|
- If entity matches include glob pattern, and entity does not match any exclude criteria (domain, glob pattern or listed), pass
|
||||||
|
- If domain is not included, glob pattern does not match, and entity not included, fail
|
||||||
|
- Exclude domain and/or glob patterns specified and include does not list domains or glob patterns
|
||||||
|
- If domain is excluded and entity not included, fail
|
||||||
|
- If entity matches exclude glob pattern and entity not included, fail
|
||||||
|
- If entity does not match any exclude criteria (domain, glob pattern or listed), pass
|
||||||
|
- Neither include or exclude specifies domains or glob patterns
|
||||||
|
- If entity is included, pass (as #2 above)
|
||||||
|
- If entity include and exclude, the entity exclude is ignored
|
||||||
|
|
||||||
## Sensor
|
## Sensor
|
||||||
|
|
||||||
The `zabbix` sensor platform let you monitor the current count of active triggers for your [Zabbix](https://www.zabbix.com/) monitoring instance.
|
The `zabbix` sensor platform let you monitor the current count of active triggers for your [Zabbix](https://www.zabbix.com/) monitoring instance.
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<zabbix_export>
|
||||||
|
<version>5.0</version>
|
||||||
|
<date>2020-06-10T16:13:32Z</date>
|
||||||
|
<groups>
|
||||||
|
<group>
|
||||||
|
<name>Templates</name>
|
||||||
|
</group>
|
||||||
|
</groups>
|
||||||
|
<templates>
|
||||||
|
<template>
|
||||||
|
<template>Template Home Assistant</template>
|
||||||
|
<name>Template Home Assistant</name>
|
||||||
|
<groups>
|
||||||
|
<group>
|
||||||
|
<name>Templates</name>
|
||||||
|
</group>
|
||||||
|
</groups>
|
||||||
|
<discovery_rules>
|
||||||
|
<discovery_rule>
|
||||||
|
<name>Floats Discovery</name>
|
||||||
|
<type>TRAP</type>
|
||||||
|
<key>homeassistant.floats_discovery</key>
|
||||||
|
<delay>0</delay>
|
||||||
|
<item_prototypes>
|
||||||
|
<item_prototype>
|
||||||
|
<name>{#KEY}</name>
|
||||||
|
<type>TRAP</type>
|
||||||
|
<key>homeassistant.float[{#KEY}]</key>
|
||||||
|
<delay>0</delay>
|
||||||
|
<history>1095d</history>
|
||||||
|
<trends>0</trends>
|
||||||
|
<value_type>FLOAT</value_type>
|
||||||
|
<preprocessing>
|
||||||
|
<step>
|
||||||
|
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
|
||||||
|
<params>14400</params>
|
||||||
|
</step>
|
||||||
|
</preprocessing>
|
||||||
|
</item_prototype>
|
||||||
|
</item_prototypes>
|
||||||
|
</discovery_rule>
|
||||||
|
</discovery_rules>
|
||||||
|
</template>
|
||||||
|
</templates>
|
||||||
|
</zabbix_export>
|
Loading…
x
Reference in New Issue
Block a user