bundles/mosquitto: add telegraf stats for tasmota devices
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
eb6ae208cb
commit
32826ed131
6 changed files with 1256 additions and 1 deletions
|
@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue