Home > Net >  Request URI too large for Grafana - kubernetes dashboard
Request URI too large for Grafana - kubernetes dashboard

Time:07-02

We are running nearly 100 instances in Production for kubernetes cluster and using prometheus server to create Grafana dashboard. To monitor the disk usage , below query is used

(sum(node_filesystem_size_bytes{instance=~"$Instance"}) - sum(node_filesystem_free_bytes{instance=~"$Instance"})) / sum(node_filesystem_size_bytes{instance=~"$Instance"})

As Instance ip is getting replaced and we are using nearly 80 instances, I am getting error as "Request URI too large".Can someone help to fix this issue

CodePudding user response:

You only need to specify the instances once and use the on matching operator to get their matching series:

(sum(node_filesystem_size_bytes{instance=~"$Instance"})
  - on(instance) sum(node_filesystem_free_bytes))
/ on(instance) sum(node_filesystem_size_bytes)

Consider also adding a unifying label to your time series so you can do something like ...{instance_type="group-A"} instead of explicitly specifying instances.

  • Related