Просмотр исходного кода

Describe and document prometheus integration

tags/0.15^2^2
9seconds 7 лет назад
Родитель
Сommit
a9d0ca1e90
1 измененных файлов: 12 добавлений и 0 удалений
  1. 12
    0
      README.md

+ 12
- 0
README.md Просмотреть файл

160
 | `MTG_STATSD_PREFIX`      | `--statsd-prefix`      | `mtg`                             | Which bucket prefix we should use. For example, if you set `mtg`, then metric `traffic.ingress` would be send as `mtg.traffic.ingress`.                                                                                                                                    |
160
 | `MTG_STATSD_PREFIX`      | `--statsd-prefix`      | `mtg`                             | Which bucket prefix we should use. For example, if you set `mtg`, then metric `traffic.ingress` would be send as `mtg.traffic.ingress`.                                                                                                                                    |
161
 | `MTG_STATSD_TAGS_FORMAT` | `--statsd-tags-format` |                                   | Which tags format we should use. By default, we are using default vanilla statsd tags format but if you want to send directly to InfluxDB or Datadog, please specify it there. Possible options are `influxdb` and `datadog`.                                              |
161
 | `MTG_STATSD_TAGS_FORMAT` | `--statsd-tags-format` |                                   | Which tags format we should use. By default, we are using default vanilla statsd tags format but if you want to send directly to InfluxDB or Datadog, please specify it there. Possible options are `influxdb` and `datadog`.                                              |
162
 | `MTG_STATSD_TAGS`        | `--statsd-tags`        |                                   | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs.                                                                                                                                                                            |
162
 | `MTG_STATSD_TAGS`        | `--statsd-tags`        |                                   | Which tags should we send to statsd with our metrics. Please specify them as `key=value` pairs.                                                                                                                                                                            |
163
+| `MTG_PROMETHEUS_PREFIX`  | `--prometheus-prefix`  | `mtg`                             | Which namespace should be used for prometheus metrics.                                                                                                                                                                                                                     |
163
 | `MTG_BUFFER_WRITE`       | `-w`, `--write-buffer` | `65536`                           | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram.                                                                                                                                                    |
164
 | `MTG_BUFFER_WRITE`       | `-w`, `--write-buffer` | `65536`                           | The size of TCP write buffer in bytes. Write buffer is the buffer for messages which are going from client to Telegram.                                                                                                                                                    |
164
 | `MTG_BUFFER_READ`        | `-r`, `--read-buffer`  | `131072`                          | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client.                                                                                                                                                                      |
165
 | `MTG_BUFFER_READ`        | `-r`, `--read-buffer`  | `131072`                          | The size of TCP read buffer in bytes. Read buffer is the buffer for messages from Telegram to client.                                                                                                                                                                      |
165
 | `MTG_SECURE_ONLY`        | `-s`, `--secure-only`  | `false`                           | Support only clients with secure mode (i.e only clients with dd-secrets).                                                                                                                                                                                                  |
166
 | `MTG_SECURE_ONLY`        | `-s`, `--secure-only`  | `false`                           | Support only clients with secure mode (i.e only clients with dd-secrets).                                                                                                                                                                                                  |
235
 All metrics are prefixed with given prefix. Default prefix is `mtg`.
236
 All metrics are prefixed with given prefix. Default prefix is `mtg`.
236
 With such prefix metric name `traffic.ingress`, for example, would be
237
 With such prefix metric name `traffic.ingress`, for example, would be
237
 `mtg.traffic.ingress`.
238
 `mtg.traffic.ingress`.
239
+
240
+
241
+# Prometheus integration
242
+
243
+[Prometheus](https://prometheus.io) integration comes out of
244
+the box, you do not need to setup anything special. Prometheus
245
+scrape endpoint lives on the same IP/port where generic stats
246
+service (`http://${MTG_STATS_IP}:${MTG_STATS_PORT}`) but on
247
+`/prometheus` path. So, if you access http stats service as `curl
248
+http://localhost:3129/`, then your prometheus endpoint is `curl
249
+http://localhost:3129/prometheus/`.

Загрузка…
Отмена
Сохранить