readyset
readyset copied to clipboard
Create SHOW READYSET METRICS to display all metrics
Description
Currently we have a command SHOW READYSET STATUS
that displays some information about the status:
readyset> SHOW READYSET STATUS;
+----------------------------+--------------------------------------+
| Variable_name | Value |
+----------------------------+--------------------------------------+
| Database Connection | Connected |
| Connection Count | 76 |
| Snapshot Status | Completed |
| Maximum Replication Offset | mysql-bin-changelog.089135:126772593 |
| Minimum Replication Offset | mysql-bin-changelog.089135:126611220 |
| Last started Controller | 2024-08-15 15:49:50 UTC |
| Last completed snapshot | 2024-08-15 15:51:30 UTC |
| Last started replication | 2024-08-15 15:51:30 UTC |
+----------------------------+--------------------------------------+
8 rows in set (0.00 sec)
We also have an entire module dedicated to metrics status, but those are only available via http endpoint, which export the metrics using prometheus. In order to make it easier for external integration/monitoring tools to consume this metrics, we should create a SQL command to expose the metrics.
Ideally we should allow for query expressions, to filter which metric we want to fetch in case we don't want all the metrics, something like SHOW READYSET METRICS WHERE metric = 'some_metric'
or SHOW READYSET METRICS WHERE metric LIKE 'some_%'
Change in user-visible behavior
Requires documentation change