bundles/mosquitto: add telegraf stats for tasmota devices
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit

This commit is contained in:
Franzi 2021-05-15 08:52:37 +02:00
parent eb6ae208cb
commit 32826ed131
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 1256 additions and 1 deletions

View file

@ -40,3 +40,32 @@ def iptables(metadata):
'port_rules': result,
},
}
@metadata_reactor.provides(
'telegraf/input_plugins/builtin/execd',
)
def telegraf(metadata):
topic = metadata.get('mosquitto/tasmota-telegraf-topic', None)
if not topic:
return {}
return {
'telegraf': {
'input_plugins': {
'execd': {
'tasmota': {
'command': [
'/usr/local/bin/tasmota-telegraf-plugin',
'127.0.0.1',
topic
],
'signal': 'none',
'restart_delay': '1s',
'data_format': 'influx',
},
},
},
},
}