forked from asg1612/dockerfile-mqttwarn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mqttwarn.ini
executable file
·64 lines (53 loc) · 1.4 KB
/
mqttwarn.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[defaults]
hostname = 'localhost' ; default
port = 1883
username = None
password = None
clientid = 'mqttwarn'
lwt = 'clients/mqttwarn'
skipretained = False
cleansession = False
# MQTTv31 = 3 (default)
# MQTTv311 = 4
protocol = 3
; logging
logformat = '%(asctime)-15s %(levelname)-5s [%(module)s] %(message)s'
logfile = 'mqttwarn.log'
; one of: CRITICAL, DEBUG, ERROR, INFO, WARN
loglevel = DEBUG
; path to file containing self-defined functions for formatmap and datamap
; omit the '.py' extension
functions = 'samplefuncs'
; name the service providers you will be using.
launch = file, log
[config:file]
append_newline = True
targets = {
'f01' : ['/tmp/f.01'],
'log-me' : ['/tmp/log.me'],
'mqttwarn' : ['/tmp/mqttwarn.err'],
}
[config:log]
targets = {
'info' : [ 'info' ],
'warn' : [ 'warn' ],
'crit' : [ 'crit' ],
'error' : [ 'error' ]
}
; special config for 'failover' events
[failover]
targets = log:error, file:mqttwarn
[hello/1]
targets = log:info
format = u'{name}: {number} => {_dthhmm}'
[owntracks-location]
topic = owntracks/+/+
targets = log:info, file:f01
datamap = OwnTracksTopic2Data()
format = OwnTracksConvert()
[owntracks-battery]
topic = owntracks/+/+
targets = log:info, file:f01
datamap = OwnTracksTopic2Data()
filter = OwnTracksBattFilter()
format = {username}'s phone battery is getting low ({batt}%)