bzon / clickhouse_exporter

This is a simple server that periodically scrapes ClickHouse(https://clickhouse.yandex/) stats and exports them via HTTP for Prometheus(https://prometheus.io/) consumption.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clickhouse Exporter for Prometheus

Build Status Go Report Card

This is a simple server that periodically scrapes ClickHouse(https://clickhouse.yandex/) stats and exports them via HTTP for Prometheus(https://prometheus.io/) consumption.

To run it:

./clickhouse_exporter [flags]

Flags are also configurable using environment variables. See the usage with:

./clickhouse_exporter --help
Usage of clickhouse-exporter:
  -insecure
    	Ignore server certificate if using https. Override environment (CLICKHOUSE_INSECURE) (default true)
  -password string
    	Clickhouse password. Override environment (CLICKHOUSE_PASSWORD)
  -scrape_uri string
    	URI to clickhouse http endpoint. Override environment (CLICKHOUSE_SCRAPE_URI) (default "http://localhost:8123/")
  -telemetry.address string
    	Address on which to expose metrics. Override environment (CLICKHOUSE_TELEMETRY_ADDRESS) (default ":9116")
  -telemetry.endpoint string
    	Path under which to expose metrics. Override environment (CLICKHOUSE_TELEMETRY_ENDPOINT) (default "/metrics")
  -user string
    	Clickhouse user. Override environment (CLICKHOUSE_USER)

Using Docker

docker run -d -p 9116:9116 f1yegor/clickhouse-exporter -scrape_uri=http://clickhouse.service.consul:8123/

Sample dashboard

Grafana dashboard could be a start for inspiration https://grafana.net/dashboards/882

About

This is a simple server that periodically scrapes ClickHouse(https://clickhouse.yandex/) stats and exports them via HTTP for Prometheus(https://prometheus.io/) consumption.

License:MIT License


Languages

Language:Go 94.6%Language:Dockerfile 3.6%Language:Makefile 1.8%