1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 00:08:49 +00:00
dockerfiles/collectd/README.md

88 lines
1.7 KiB
Markdown
Raw Normal View History

2015-06-24 10:48:29 +00:00
collectd
========
`collectd` is a daemon which collects system performance statistics periodically
and provides mechanisms to store the values in a variety of ways, for example
in RRD files.
2015-06-24 11:51:35 +00:00
## directory tree
```
~/fig/collectd/
2017-03-23 08:49:18 +00:00
├── data/
2015-06-24 11:51:35 +00:00
│   ├── collectd.conf
│   └── conf.d/
│   └── network.conf
└── docker-compose.yml
```
## config files
collectd.conf
2017-03-23 08:49:18 +00:00
```apache
2015-06-24 11:51:35 +00:00
Hostname "localhost"
FQDNLookup false
Interval 10
Timeout 2
ReadThreads 5
WriteThreads 5
LoadPlugin cpu
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
Include "/etc/collectd/conf.d/*.conf"
```
network.conf
2017-03-23 08:49:18 +00:00
```apache
2015-06-24 11:51:35 +00:00
LoadPlugin network
<Plugin "network">
2015-06-24 12:43:07 +00:00
Server "influxdb" "25826"
2015-06-24 11:51:35 +00:00
</Plugin>
```
2017-03-23 08:49:18 +00:00
weather.conf
```apache
LoadPlugin curl_json
<Plugin curl_json>
<URL "https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%3D2151330%20and%20u%3D'c'&format=json">
Instance "Beijing"
<Key "query/results/channel/item/condition/temp">
Type "gauge"
</Key>
</URL>
<URL "https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%3D2151849%20and%20u%3D'c'&format=json">
Instance "Shanghai"
<Key "query/results/channel/item/condition/temp">
Type "gauge"
</Key>
</URL>
<URL "https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%3D23511745%20and%20u%3D'c'&format=json">
Instance "Silicon_Valley"
<Key "query/results/channel/item/condition/temp">
Type "gauge"
</Key>
</URL>
</Plugin>
```
2015-06-24 10:48:29 +00:00
## docker-compose.yml
```
collectd:
image: vimagick/collectd
volumes:
2017-03-23 08:49:18 +00:00
- ./data:/etc/collectd
2015-06-24 11:51:35 +00:00
pid: host
2015-06-24 14:43:17 +00:00
net: host
2015-06-24 10:48:29 +00:00
restart: always
```