promcasa

command module
v0.0.0-...-b5dcede Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

README

PromCasa

Query, Aggregate and Publish anything from ClickHouse to Prometheus metrics in zero time

Unlike other exporters limited to internal metrics, PromCasa is designed to unleash data from any query


⭐ Functionality
  • Execute recurring Clickhouse queries
  • Exctract mapped labels and values
  • Aggregate results using metric buckets
  • Publish as prometheus metrics

Instructions

Download a binary release or build from source

📦 Download Binary
curl -fsSL github.com/metrico/promcasa/releases/latest/download/promcasa -O && chmod +x promcasa
📄 Configuration

PromCasa acts according to the query bucket parameters configured in /etc/promcasa.json


▶️ Query Buckets

To provision and publish a new metrics bucket, extend the configuration with a query set:

{
   "_info": "Custom Metrics from Clickhouse",
   "name": "my_status", // must be unique
   "help": "My Status",
   "query": "SELECT status, group, count(*) as counter FROM my_index FINAL PREWHERE (datetime >= toDateTime(now()-60)) AND (datetime < toDateTime(now()) ) group by status, group",
   "labels": ["status","group"], // must match columns
   "counter_name": "counter",
   "refresh": "60s", //  Refesh takes unit sign: (ns, ms, s, m, h)
   "type":"gauge" // gauge, histogram, counter
}

For a complete usage example, check out the wiki


License

©️ qxip/metrico Licensed under AGPLv3 as part of qryn

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL