Influxdb,pie chart,grafana

Hi!

Im trying to use pie charts with influxdb queries, and use a global_tag to graph.

For example,

host_type = testservers (included global_tags in telegraf conf)

My purpose:

To have a pie chart with server names that only include that tag.

Is it possible? How can I do this? is it necessary add another type of tag?

Im trying to search about but I only found with other databases.

Thanks!!

Hi,

So you want to display a piechart split up on the tag host_type and the values for each slice will be number of servers belonging to/having that tag?

Marcus

I want to display the name of the host for each slice having that tag, for example:

hostname: test1 global_tag= test
hostname: test2 global_tag=test

In this case, choosing global_tag=test my pie should have one slice with test1 and another one with test2.

Is it possible?

thanks!!

I guess you need to group by hostname where global_tag=test, something like this:

SELECT count("value") FROM "<your measurement>" WHERE $timeFilter GROUP BY time($interval), "hostname"

Example in grafana:

Marcus

Hi,

So, I see with your example that, you cant have any string in “your measurement”.

The only way to use it , it is with values.

I was thinking something like pie chart in kibana, I have one there in that way.

Thanks!!

As far as I know that isn’t possible.

I suggest you create a feature request issue here if this is something that you really want to have.

Marcus