Skip to content

Commit 41c1626

Browse files
committed
traefik readme
1 parent 1f91758 commit 41c1626

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

plugins/inputs/all/all.go

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import (
7676
_ "github.com/influxdata/telegraf/plugins/inputs/system"
7777
_ "github.com/influxdata/telegraf/plugins/inputs/tail"
7878
_ "github.com/influxdata/telegraf/plugins/inputs/tcp_listener"
79+
_ "github.com/influxdata/telegraf/plugins/inputs/traefik"
7980
_ "github.com/influxdata/telegraf/plugins/inputs/trig"
8081
_ "github.com/influxdata/telegraf/plugins/inputs/twemproxy"
8182
_ "github.com/influxdata/telegraf/plugins/inputs/udp_listener"

plugins/inputs/traefik/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Example Input Plugin
2+
3+
This plugin gather health check status from services registered in Traefik.
4+
5+
### Configuration:
6+
7+
```toml
8+
# Description
9+
[[inputs.traefik]]
10+
## Required Traefik server address (default: "127.0.0.1")
11+
server = "127.0.0.1"
12+
## Required Traefik port (default "8080")
13+
port = 8080
14+
## Required Traefik instance name (default: "default")
15+
instance = "default"
16+
```
17+
18+
### Measurements & Fields:
19+
20+
- all measurements have the following fields:
21+
- total_count (int)
22+
- average_response_time_sec (float64)
23+
- total_response_time_sec (float64)
24+
- Http Codes
25+
- 200 (int)
26+
- 400 (int)
27+
- 500 (int)
28+
- ...
29+
30+
### Tags:
31+
32+
- All measurements have the following tags:
33+
- instance
34+
35+
### Sample Queries:
36+
37+
```
38+
SELECT COUNT("200") FROM "traefik_healthchecks" WHERE time > now() - 24h // Count number of requests with response code 200
39+
```
40+
41+
### Example Output:
42+
43+
```
44+
$ ./telegraf -config telegraf.conf -input-filter traefik -test
45+
traefik_healthchecks,instance=prod-instance average_response_time_sec=0.001169439,total_count=13i,404=6i,200=7i,total_response_time_sec=0.015202713 1492169158000000000
46+
```

0 commit comments

Comments
 (0)