-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmqttutil.conf
39 lines (34 loc) · 1.07 KB
/
mqttutil.conf
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
# values set in the default section are used as default in all tasks
[DEFAULT]
scheduling_interval = "5s"
requires = ["psutil"]
qos = 1
# topic_prefix = "<hostname>"
# A task at minimal consists of a topic, e.g. unixtime and a function, which is
# evaluated on schedule and can be any python statement
[unixtime]
func = "time.time()"
requires = ["time"]
# mqttutil by default publishes primitive types; lists, dicts, tuples are unpacked
# in this example two values will be published at <hostname>/constants/pi and
# <hostname>/constants/e
[constants]
func = "{'pi': math.pi, 'e': math.e}"
requires = ["math"]
# the defaults above can be overwritten per task
[announce]
func = "platform.node()"
scheduling_interval = "1s"
topic_prefix = ""
requires = ["platform"]
# be aware that no additional security checks are performed, hence the configuration
# should in no case be world-writable
[passwd]
func = "open('/etc/passwd').read()"
# useful examples might be those of psutil
[load]
func = "psutil.getloadavg()"
[memory]
func = "psutil.virtual_memory()"
[ifaddr]
func = "psutil.net_if_addrs()"