go-graphite / graphite-clickhouse

Graphite cluster backend with ClickHouse support
MIT License
213 stars 52 forks source link

[IDEA] create CLI/web tool to manage metrics #64

Open G-regL opened 5 years ago

G-regL commented 5 years ago

I posted an issue to the carbon-clickhouse repo some time ago asking how to delete specific metrics.

I ended up finding a way using some SQL queries, but I think this project would greatly benefit from another tool to manage the metrics as a whole.

In the traditional Graphite use, you can rename and delete metrics easily by just renaming or deleting folders/files on disk, with the changes being almost instantly visible in any front-end.

With CH as the backend, you'd need to figure out how to do very specific SQL queries to the same thing.

Would it be possible to create a way to do this? I'm thinking either a standalone tool that talks directly to the CH instance, or maybe a REST API that works via graphite-clickhouse on a new URL (/metrics, or /api/metrics), which would allow for some typical management tasks.

G-regL commented 3 years ago

Is there any chance this will get implemented?

I'm having a hard time finding an easy way to purge old data from CH, without having to engineer some very complex queries. An API in GCH that's given a full metric path, and then handles the deletions would be an invaluable asset.