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