Skip to content

Commit

Permalink
chore(metric): disply actor count per CN in grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxa21 committed Jun 4, 2024
1 parent 3de4bda commit ded74ee
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-user-dashboard.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions grafana/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,9 @@ def timeseries_id(self, title, description, targets):
**self.common_options,
)

def table_info(self, title, description, targets, columns):
def table_info(self, title, description, targets, columns, excludeByName=dict.fromkeys(["Time", "Value"], True)):
gridPos = self.layout.next_half_width_graph()
column_indices = {column: index for index, column in enumerate(columns)}
excludeByName = dict.fromkeys(["Time", "Value"], True)
transformations = [
{"id": "organize", "options": {"indexByName": column_indices, "excludeByName": excludeByName}}
]
Expand Down
7 changes: 7 additions & 0 deletions grafana/risingwave-dev-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ def section_actor_info(outer_panels):
[panels.table_target(f"group({metric('table_info')}) by (table_id, table_name, table_type, materialized_view_id, fragment_id, compaction_group_id)")],
["table_id", "table_name", "table_type", "materialized_view_id", "fragment_id", "compaction_group_id"],
),
panels.table_info(
"Actor Count (Group By Compute Node)",
"Actor count per compute node",
[panels.table_target(f"count({metric('actor_info')}) by (compute_node)")],
["table_id", "table_name", "table_type", "materialized_view_id", "fragment_id", "compaction_group_id"],
dict.fromkeys(["Time"], True)
)
],
)
]
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions grafana/risingwave-user-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ def section_actor_info(outer_panels):
[panels.table_target(f"group({metric('table_info')}) by (table_id, table_name, table_type, materialized_view_id, fragment_id, compaction_group_id)")],
["table_id", "table_name", "table_type", "materialized_view_id", "fragment_id", "compaction_group_id"],
),
panels.table_info(
"Actor Count (Group By Compute Node)",
"Actor count per compute node",
[panels.table_target(f"count({metric('actor_info')}) by (compute_node)")],
["table_id", "table_name", "table_type", "materialized_view_id", "fragment_id", "compaction_group_id"],
dict.fromkeys(["Time"], True)
)
],
)
]
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-user-dashboard.json

Large diffs are not rendered by default.

0 comments on commit ded74ee

Please sign in to comment.