Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system tables for inner metrics #602

Closed
MichaelScofield opened this issue Nov 21, 2022 · 10 comments
Closed

system tables for inner metrics #602

MichaelScofield opened this issue Nov 21, 2022 · 10 comments
Labels
C-feature Category Features good first issue Good for newcomers
Milestone

Comments

@MichaelScofield
Copy link
Collaborator

MichaelScofield commented Nov 21, 2022

What problem does the new feature solve?

It's good to have a metrics table like the one in Databend or ClickHouse. Users can easily "select" on the metrics table to see db's important running status. With metrics table, we can integrate other visualization tools or dashboards that supports SQL like Grafana, to export some meaningful timeseries data.

What does the feature do?

Adds system tables for inner metrics.

Implementation challenges

  1. In datanode, create a new table called metrics, with schema like the MetricsTable in Databend. Register it into default catalog like our ScriptsTable do.
  2. Implement "select" for metrics table. Instead of actually storing the metrics, call the render() method of PROMETHEUS_HANDLE, and parse the result (prometheus lines) as table ouput. Refer to the code here in Databend for details.
  3. In frontend, create the same metrics table as well. Unlike DistTable, the metrics table does not do distributed query.
@MichaelScofield MichaelScofield added the C-feature Category Features label Nov 21, 2022
@azhsmesos
Copy link
Contributor

Can you describe it in more detail?

@killme2008
Copy link
Contributor

@azhsmesos Looks like the metrics table in clickhouse

https://clickhouse.com/docs/en/operations/system-tables/metrics/

@waynexia
Copy link
Member

This issue requests one or more table in system catalog that contains information about running status. E.g., load, how much memory is used, how many running queries, how many opened fds, etc. It exposes a convenient way to do system analysis and debugging

@MichaelScofield MichaelScofield added the good first issue Good for newcomers label Nov 25, 2022
@xtang xtang mentioned this issue Nov 30, 2022
24 tasks
@xtang xtang added this to the Release v0.1 milestone Nov 30, 2022
@fengjiachun fengjiachun modified the milestones: v0.3, v0.2 Feb 15, 2023
@paomian paomian self-assigned this Feb 16, 2023
@fengjiachun fengjiachun moved this to Todo in GreptimeDB v0.2 Mar 12, 2023
@fengjiachun fengjiachun modified the milestones: v0.2, v0.3 Apr 12, 2023
@fengjiachun fengjiachun moved this to Todo in GreptimeDB v0.3 Apr 25, 2023
@fengjiachun fengjiachun modified the milestones: v0.3, v0.4 Jun 12, 2023
@Lilit0x
Copy link
Contributor

Lilit0x commented Sep 15, 2023

I don't know if this has been implemented since I can't find any indication that it has been, but I find it interesting, and I'd like to work on it. I still have some pending PRs, so this is just like an indication of my interest.
I'll come back to outline my thought process for it coupled with the implementation details that have been described above.
Thanks

@MichaelScofield
Copy link
Collaborator Author

@Lilit0x Are you still interested on this issue?

@Lilit0x
Copy link
Contributor

Lilit0x commented Oct 17, 2023

Hi @MichaelScofield , yes, I am, but I just got assigned to another issue.
If it isn't urgent, I'll like to come back to it.

@MichaelScofield
Copy link
Collaborator Author

@Lilit0x Not urgent. Just a friendly ping. Come back to this issue when you have time, thx~

@waynexia
Copy link
Member

Hi @MichaelScofield , yes, I am, but I just got assigned to another issue. If it isn't urgent, I'll like to come back to it.

Thanks for your enthusiasm! This is not hurry, and we are making some changes related to our internal metrics #1906. Will update this issue when it's unblocked ❤️

@tisonkun tisonkun removed this from the v0.4 milestone Apr 9, 2024
@tisonkun tisonkun added this to the v0.8 milestone Apr 9, 2024
@tisonkun
Copy link
Collaborator

tisonkun commented Jun 3, 2024

@waynexia @killme2008 I think some of the features needed by this issue have been implemented in information_schema.

Perhaps we can close this issue and open a new issue if there is any ongoing items.

@killme2008
Copy link
Contributor

@waynexia @killme2008 I think some of the features needed by this issue have been implemented in information_schema.

Perhaps we can close this issue and open a new issue if there is any ongoing items.

Yes. We have runtime_metrics and try to implement xxx_stats etc. in information_schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features good first issue Good for newcomers
Projects
No open projects
Status: Todo
Development

No branches or pull requests

9 participants