mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:36 +02:00
update collectd
This commit is contained in:
parent
e0166b7ffb
commit
dc7b50337f
@ -9,7 +9,7 @@ in RRD files.
|
||||
|
||||
```
|
||||
~/fig/collectd/
|
||||
├── collectd/
|
||||
├── data/
|
||||
│ ├── collectd.conf
|
||||
│ └── conf.d/
|
||||
│ └── network.conf
|
||||
@ -20,7 +20,7 @@ in RRD files.
|
||||
|
||||
collectd.conf
|
||||
|
||||
```
|
||||
```apache
|
||||
Hostname "localhost"
|
||||
|
||||
FQDNLookup false
|
||||
@ -39,7 +39,7 @@ Include "/etc/collectd/conf.d/*.conf"
|
||||
|
||||
network.conf
|
||||
|
||||
```
|
||||
```apache
|
||||
LoadPlugin network
|
||||
|
||||
<Plugin "network">
|
||||
@ -47,13 +47,40 @@ LoadPlugin network
|
||||
</Plugin>
|
||||
```
|
||||
|
||||
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>
|
||||
```
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```
|
||||
collectd:
|
||||
image: vimagick/collectd
|
||||
volumes:
|
||||
- ./collectd:/etc/collectd
|
||||
- ./data:/etc/collectd
|
||||
pid: host
|
||||
net: host
|
||||
restart: always
|
||||
|
22
collectd/data/conf.d/weather.conf
Normal file
22
collectd/data/conf.d/weather.conf
Normal file
@ -0,0 +1,22 @@
|
||||
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>
|
@ -1,7 +1,7 @@
|
||||
collectd:
|
||||
image: vimagick/collectd
|
||||
volumes:
|
||||
- ./collectd:/etc/collectd
|
||||
- ./data:/etc/collectd
|
||||
pid: host
|
||||
net: host
|
||||
restart: always
|
||||
|
Loading…
Reference in New Issue
Block a user