Skip to content

Commit

Permalink
metrics: let resource group selector take effect to all panels (pingc…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Oct 30, 2024
1 parent ba10a69 commit 561dd71
Show file tree
Hide file tree
Showing 4 changed files with 5,074 additions and 4,791 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
8 changes: 7 additions & 1 deletion pkg/metrics/grafana/generate_json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@
# limitations under the License.

go install github.com/google/go-jsonnet/cmd/jsonnet@latest
git clone https://github.com/grafana/grafonnet-lib.git

# ref https://github.com/grafana/grafonnet-lib/issues/338, use the forked
# repo which implements the addOverride and addTransformation funtion for
# new table.
# TODO: update to https://github.com/grafana/grafonnet
git clone https://github.com/nolouch/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 561dd71

Please sign in to comment.