Skip to content

Conversation

@ccxhwmy
Copy link
Contributor

@ccxhwmy ccxhwmy commented Jul 24, 2022

update grafana json for nginx shared dict in prometheus

Description

update grafana json to add nginx shared dict, which default config is internal-status|upstream-healthcheck|worker-events|lrucache-lock|balancer-ewma|balancer-ewma-locks|balancer-ewma-last-touched-at|etcd-cluster-health-check.

Fixes # (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

modify grafana json for nginx shared dict in prometheus
@ccxhwmy ccxhwmy changed the title feat(grafana json): modify grafana json for nginx shared dict in prometheus feat(grafana json): update grafana json for nginx shared dict in prometheus Jul 24, 2022
@ccxhwmy ccxhwmy marked this pull request as ready for review July 24, 2022 02:30
@spacewander spacewander requested a review from soulbird July 24, 2022 11:59
@soulbird
Copy link
Contributor

image
We can't see the change of apisix_shared_dict_free_space_bytes through the ordinate, can you adjust the unit? That would be more intuitive. Please note that we cannot determine the size of the shared memory in the actual environment, it may be 1MB or 100MB, so pay attention to the generality of the unit.

@ccxhwmy ccxhwmy requested a review from spacewander August 1, 2022 05:36
"steppedLine": false,
"targets": [
{
"expr": "(apisix_shared_dict_free_space_bytes * 100) / on (name) apisix_shared_dict_capacity_bytes",
Copy link
Member

@spacewander spacewander Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are worried about showing instances will make the graph too complex, maybe we can add a comment that people can modify this query to show per-instance graph?

We can't add comment to a JSON file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are worried about showing instances will make the graph too complex, maybe we can add a comment that people can modify this query to show per-instance graph?

Does you mean add a comment like # we can modify the expr to show per-instance graph in json file?

Copy link
Member

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, LGTM

@spacewander spacewander merged commit 2fd97ba into apache:master Aug 1, 2022
@ccxhwmy ccxhwmy deleted the feat_grafana_json branch August 2, 2022 15:23
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants