-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8a0d07
commit de39ff9
Showing
24 changed files
with
681 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,95 @@ | ||
# Telegraf Plugin: Burrow | ||
|
||
Collect Kafka topics and consumers status | ||
from [Burrow](https://github.com/linkedin/Burrow) HTTP API. | ||
Collect Kafka topic, consumer and partition status | ||
via [Burrow](https://github.com/linkedin/Burrow) HTTP [API](https://github.com/linkedin/Burrow/wiki/HTTP-Endpoint). | ||
|
||
### Configuration: | ||
Supported Burrow version: `1.x` | ||
|
||
### Configuration | ||
|
||
``` | ||
[[inputs.burrow]] | ||
## Burrow endpoints in format "sheme://[user:password@]host:port" | ||
## e.g. | ||
## servers = ["http://localhost:8080"] | ||
## servers = ["https://example.com:8000"] | ||
## servers = ["http://user:[email protected]:8000"] | ||
## | ||
servers = [ "http://127.0.0.1:8000" ] | ||
## Prefix all HTTP API requests. | ||
#api_prefix = "/v2/kafka" | ||
## Burrow API endpoints in format "schema://host:port". | ||
## Default is "http://localhost:8000". | ||
servers = ["http://localhost:8000"] | ||
## Maximum time to receive response. | ||
#timeout = "5s" | ||
## Override Burrow API prefix. | ||
## Useful when Burrow is behind reverse-proxy. | ||
# api_prefix = "/v3/kafka" | ||
## Optional, gather info only about specific clusters. | ||
## Default is gather all. | ||
#clusters = ["clustername1"] | ||
## Maximum time to receive response. | ||
# response_timeout = "5s" | ||
## Optional, gather stats only about specific groups. | ||
## Default is gather all. | ||
#groups = ["group1"] | ||
## Limit per-server concurrent connections. | ||
## Useful in case of large number of topics or consumer groups. | ||
# concurrent_connections = 20 | ||
## Optional, gather info only about specific topics. | ||
## Default is gather all | ||
#topics = ["topicA"] | ||
## Filter out clusters by providing list of glob patterns. | ||
## Default is no filtering. | ||
# clusters = [] | ||
## Concurrent connections limit (per server), default is 4. | ||
#max_concurrent_connections = 10 | ||
## Filter out consumer groups by providing list of glob patterns. | ||
## Default is no filtering. | ||
# groups = [] | ||
## Internal working queue adjustments (per measurement, per server), default is 4. | ||
#worker_queue_length = 5 | ||
## Filter out topics by providing list of glob patterns. | ||
## Default is no filtering. | ||
# topics = [] | ||
## Credentials for basic HTTP authentication. | ||
#username = "" | ||
#password = "" | ||
# username = "" | ||
# password = "" | ||
## Optional SSL config | ||
#ssl_ca = "/etc/telegraf/ca.pem" | ||
#ssl_cert = "/etc/telegraf/cert.pem" | ||
#ssl_key = "/etc/telegraf/key.pem" | ||
## Use SSL but skip chain & host verification | ||
#insecure_skip_verify = false | ||
# ssl_ca = "/etc/telegraf/ca.pem" | ||
# ssl_cert = "/etc/telegraf/cert.pem" | ||
# ssl_key = "/etc/telegraf/key.pem" | ||
# insecure_skip_verify = false | ||
``` | ||
|
||
Due to the nature of Burrow API (REST), each topic or consumer metric | ||
collection requires an HTTP request, so, in order to keep things running | ||
smooth, consider two parameters: | ||
### Partition Status mappings | ||
|
||
1. `max_concurrent_connection` - limit maximum number of concurrent HTTP | ||
requests (per server). | ||
2. `worker_queue_length` - number of concurrent workers processing | ||
each measurement (per measurement, per server). | ||
* `OK` = 1 | ||
* `NOT_FOUND` = 2 | ||
* `WARN` = 3 | ||
* `ERR` = 4 | ||
* `STOP` = 5 | ||
* `STALL` = 6 | ||
|
||
Just keep in mind, each worker in queue requires an HTTP connection, | ||
so keep `max_concurrent_connection` and `worker_queue_length` balanced | ||
in ratio 2:1. | ||
> unknown value will be mapped to 0 | ||
### Partition Status mappings | ||
### Fields | ||
|
||
* OK = 1 | ||
* NOT_FOUND = 2 | ||
* WARN = 3 | ||
* ERR = 4 | ||
* STOP = 5 | ||
* STALL = 6 | ||
* `burrow_group` (one event per each consumer group) | ||
- status (string, see Partition Status mappings) | ||
- status_code (int, `1..6`, see Partition status mappings) | ||
- parition_count (int, `number of partitions`) | ||
- total_lag (int64, `totallag`) | ||
- lag (int64, `maxlag.current_lag || 0`) | ||
|
||
### Measurements & Fields: | ||
* `burrow_partition` (one event per each topic partition) | ||
- status (string, see Partition Status mappings) | ||
- status_code (int, `1..6`, see Partition status mappings) | ||
- lag (int64, `current_lag || 0`) | ||
- offset (int64, `end.timestamp`) | ||
- timestamp (int64, `end.timestamp`) | ||
|
||
- burrow_topic (one event for each topic offset) | ||
* `burrow_topic` (one event per topic offset) | ||
- offset (int64) | ||
|
||
- burrow_consumer | ||
- start.offset (int64) | ||
- start.lag (int64) | ||
- start.timestamp (int64) | ||
- end.offset (int64) | ||
- end.lag (int64) | ||
- end.timestamp (int64) | ||
- status (1..6, see Partition status mappings) | ||
|
||
### Tags | ||
|
||
- burrow_topic | ||
- cluster | ||
- topic | ||
- partition | ||
* `burrow_group` | ||
- cluster (string) | ||
- group (string) | ||
|
||
* `burrow_partition` | ||
- cluster (string) | ||
- group (string) | ||
- topic (string) | ||
- partition (int) | ||
|
||
- burrow_consumer | ||
- cluster | ||
- group | ||
- topic | ||
- partition | ||
* `burrow_topic` | ||
- cluster (string) | ||
- topic (string) | ||
- partition (int) |
Oops, something went wrong.