forked from mutability/dump1090-tools
-
Notifications
You must be signed in to change notification settings - Fork 5
/
collectd.conf
107 lines (93 loc) · 2.21 KB
/
collectd.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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# collectd configuration file
#
# ted.sluis@gmail.com
#
# Based on https://github.com/mutability/dump1090-tools, Copyright (c) 2015, Oliver Jowett <oliver@mutability.co.uk> and Xforce30164
Hostname "localhost"
Interval 60
Timeout 2
ReadThreads 5
WriteThreads 1
# Enable collectd event logging
LoadPlugin "logfile"
<Plugin "logfile">
LogLevel "info"
File "/var/log/collectd.log"
Timestamp true
</Plugin>
LoadPlugin rrdtool
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
</Plugin>
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>
# Ensure that the base Python plugin is loaded:
<LoadPlugin python>
Globals true
</LoadPlugin>
# Load the dump1090 types and the regular types just to be sure:
TypesDB "/home/pi/dump-tools/collectd/dump1090.db" "/usr/share/collectd/types.db"
# Configure the dump1090 python module.
# Each Instance block collects statistics from a separate named dump1090.
# The URL should be the base URL of the webmap, i.e. in the examples below,
# statistics will be loaded from http://localhost/dump1090/data/stats.json etc.
<Plugin python>
ModulePath "/home/pi/dump-tools/collectd"
LogTraces true
Import "dump1090"
<Module dump1090>
<Instance rpi>
URL "http://localhost/dump1090"
</Instance>
</Module>
</Plugin>
# CPU temperature
LoadPlugin "table"
<Plugin table>
<Table "/sys/class/thermal/thermal_zone0/temp">
Instance rpi
Separator " "
<Result>
Type gauge
InstancePrefix "cpu_temp"
ValuesFrom 0
</Result>
</Table>
</Plugin>
# Ethernet interface usage
LoadPlugin "interface"
<Plugin "interface">
Interface "eth0"
#Interface "wlan0"
</Plugin>
# Disk usage
LoadPlugin "disk"
<Plugin "disk">
Disk "mmcblk0"
IgnoreSelected false
</Plugin>
# Memory usage
LoadPlugin "memory"
# Cpu usage
LoadPlugin "cpu"
LoadPlugin "match_regex"
<Chain "PostCache">
<Rule>
<Match regex>
Plugin "^cpu$"
PluginInstance "^[0-9]+$"
</Match>
Target stop
</Rule>
Target "write"
</Chain>
# Disk space file system usage
LoadPlugin "df"
<Plugin "df">
MountPoint "/"
IgnoreSelected false
ReportReserved true
ReportInodes false
</Plugin>