简体   繁体   中英

Grafana Templating

I am wondering if there is a way to limit the number of rows generated from grafana templating.

I can have a drop down variable "$x"on my grafana page and I can select the row editor and say repeat row for every value under $x.

Based on different criteria, I can have x anywhere between 1 and like 160 rows. I need to only be looking at about 10 at a time. I am wondering if I can control the number of rows shown/change the rows shown somewhere in grafana.

I can manually select items from the $x drop down to show only a few items of course, but its a matter of selecting only say.. 10 items right when the page loads.

Please let me know if I am not describing the problem correctly or if I need to clarify more.

Thanks, Karan

As far as I know there is no direct option for this but there are some ways you may be able to achieve what you want.

  1. You could select your ~10 default entries and then save the dashboard this will save the selected ones in the dashboards JSON. (or modify the JSON of the dashboard directly)
  2. You could use the regex field in the template settings to filter some of your values and split them in groups this way. (one variable per regex group)
  3. You could change your data in elasticsearch in order to use multiple fields where you can split on.
  4. see PR #5616 as @Daniel Lee mentioned

In general I think you get a faster response to this in grafana directly at github.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM