-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clickhouse] Internal monitoring endpoint (#7114)
## Overview This commit adds an endpoint to retrieve timeseries from the `system` database. For the time being we will only add support for the `metric_log` and `asynchronous_metric_log` tables. This endpoint is still a bit bare bones, but will be a good start to begin monitoring the ClickHouse servers. ## Examples ### Queries per second ```console $ curl "http://[::1]:8888/timeseries/metric_log/ProfileEvent_Query/avg" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2883 100 2883 0 0 5912 0 --:--:-- --:--:-- --:--:-- 5907 [ { "time": "2024-11-20T04:09:00Z", "value": 0.0 }, { "time": "2024-11-20T04:10:00Z", "value": 0.0 }, { "time": "2024-11-20T04:11:00Z", "value": 0.06666666666666667 } ] ``` ### Disk usage ```console $ curl "http://[::1]:8888/timeseries/asynchronous_metric_log/DiskUsed_default/avg?interval=120&time_range=3600×tamp_format=unix_epoch" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1786 100 1786 0 0 3728 0 --:--:-- --:--:-- --:--:-- 3728 [ { "time": "1732513320", "value": 120491427254.85716 }, { "time": "1732513440", "value": 120382774033.06668 }, { "time": "1732513560", "value": 120364752622.93332 } ] ``` Related: #6953
- Loading branch information
Showing
8 changed files
with
658 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.