2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-12 00:48:46 +01:00

initial commit

This commit is contained in:
Christian Schnidrig
2016-11-29 00:08:10 +01:00
parent 8643000910
commit 3a665afb54
30 changed files with 533 additions and 1 deletions

View File

@@ -0,0 +1,51 @@
[defaults]
hostname = 'localhost'
port = 1883
clientid = 'mqttwarn'
; logging
logformat = '%(asctime)-15s %(levelname)-5s [%(module)s] %(message)s'
logfile = 'mqttwarn.log'
; one of: CRITICAL, DEBUG, ERROR, INFO, WARN
;loglevel = DEBUG
loglevel = ERROR
; name the service providers you will be using.
launch = file, log, carbon
[config:file]
append_newline = True
targets = {
'f01' : ['/tmp/f.01'],
'log-me' : ['/tmp/log.me'],
'mqttwarn' : ['/tmp/mqttwarn.err'],
}
[config:log]
targets = {
'debug' : [ 'debug' ],
'info' : [ 'info' ],
'warn' : [ 'warn' ],
'crit' : [ 'crit' ],
'error' : [ 'error' ]
}
; special config for 'failover' events
[failover]
targets = log:error, file:mqttwarn
[config:carbon]
targets = {
'openhab' : [ '{{graphite_server}}',2003 ],
}
[/openhab/graphite/#]
targets = carbon:openhab
;targets = log:info, file:f01, carbon:openhab
# instead of logging run `mosquitto_sub -t openhab/graphite/#`

View File

@@ -0,0 +1,13 @@
[Unit]
Description=MQTTwarn
[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/opt/mqttwarn
ExecStart=/opt/mqttwarn/mqttwarn.py
[Install]
WantedBy=default.target