Live data from Hacker News

We Built a 19 PiB Logging Platform with ClickHouse and Saved Millions

clickhouse.com

11–13 of 13 posts

Re: We Built a 19 PiB Logging Platform with ClickHouse and Saved Millions

#11
Interesting post.

How do you apply restrictions on your queries? Otherwise a few concurrent queries scanning huge data or being slow due to groupby, etc can slowdown the system.

Also, I see a sorting key of `ORDER BY (PodName, Timestamp)`. While debugging, filtering by service_name, deployment_name, env, region, etc is probably going to be slow?

Re: We Built a 19 PiB Logging Platform with ClickHouse and Saved Millions

#12
post #5

Earlier quoted context omitted.

Very cool write up. I'm curious about any challenges you had using Grafana? Also, do you think this sort of system would work as an alternative to Splunk as well?

Grafana works really well out of the box for most use-cases. Initially the LogHouse UI was built using the out-of-the-box Grafana tools (along with the ClickHouse data source plugin which we maintain) You can get a really long way with the zero code dashboarding tools, especially with the latest plugin release (4.0) which comes with a completely rebuilt query builder which has an opinionated mode specifically for Ope…

Can you share some details of how you implemented the cross region routing in Grafana? I think the article mentioned that you created your own plugin, is that plugin open sourced?

We would like to do something similar, but not sure where to start.

Re: We Built a 19 PiB Logging Platform with ClickHouse and Saved Millions

#13

Earlier quoted context omitted.

Grafana works really well out of the box for most use-cases. Initially the LogHouse UI was built using the out-of-the-box Grafana tools (along with the ClickHouse data source plugin which we maintain) You can get a really long way with the zero code dashboarding tools, especially with the latest plugin release (4.0) which comes with a completely rebuilt query builder which has an opinionated mode specifically for Ope…

Can you share some details of how you implemented the cross region routing in Grafana? I think the article mentioned that you created your own plugin, is that plugin open sourced? We would like to do something similar, but not sure where to start.

Sure, the plugin is built on top of Scenes https://grafana.com/developers/scenes

Add all of your required data sources will well known UIDs https://grafana.com/docs/grafana/latest/administration/provi... Then you can create a query panel and update the state with the desired query SQL and data source ID like so;

    const logsQuery = new SceneQueryRunner({queries: []});
    logsQuery.setState({
        datasource: { uid: dataSourceID},
        queries: [
            {
                "datasource": {
                    "type": "grafana-clickhouse-datasource",
                    "uid": dataSourceID,
                },
                "queryType": "sql",
                "rawSql": logsQuerySQL,
    ...
        ],
    });
Post reply on HN