Skip to content

Commit

Permalink
metrics: use jsonnet to generate resource control panel (pingcap#56320)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch authored and glorv committed Oct 29, 2024
1 parent 3c16157 commit 83c03f4
Show file tree
Hide file tree
Showing 4 changed files with 4,828 additions and 4,792 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,15 @@ dumpling_bins:

.PHONY: generate_grafana_scripts
generate_grafana_scripts:
@cd metrics/grafana && mv tidb_summary.json tidb_summary.json.committed && ./generate_json.sh && diff -u tidb_summary.json.committed tidb_summary.json && rm tidb_summary.json.committed
@cd pkg/metrics/grafana && \
mv tidb_summary.json tidb_summary.json.committed && \
mv tidb_resource_control.json tidb_resource_control.json.committed && \
./generate_json.sh && \
diff -u tidb_summary.json.committed tidb_summary.json && \
diff -u tidb_resource_control.json.committed tidb_resource_control.json && \
rm tidb_summary.json.committed && \
rm tidb_resource_control.json.committed


.PHONY: bazel_ci_prepare
bazel_ci_prepare:
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/grafana/generate_json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ git clone https://github.com/grafana/grafonnet-lib.git

export JSONNET_PATH=grafonnet-lib
jsonnet tidb_summary.jsonnet > tidb_summary.json
jsonnet tidb_resource_control.jsonnet > tidb_resource_control.json
rm -rf $JSONNET_PATH

Loading

0 comments on commit 83c03f4

Please sign in to comment.