Change that to select mean(used_percent) from mem where time > now() - 5m group by host. You’re already grouping by host so you don’t need to select it as well.
The grouped by tags are present in the JSON response under results.series.tags rather than results.series.values.
If that doesn’t work for you, there’s probably a way to make this work with subqueries. Off the top of my head, I’m not sure what that would look like.
E.g if I am running this:
rs = cli.query(“select mean(used_percent) from mem where time > now() - 5m group by host”)
mem_points = list(rs.get_points(measurement=‘men’))
print mem_points
I’m also hitting this problem, and although I gather that the grouped-by tag names might be available in the JSON results, I don’t think that helps me because I’m trying to use this form of query as a subquery. I want to use the tag name in the outer query, so I want to pass that name through to the outer query. Certainly the query has meaning, so it’s unfortunate that it isn’t supported. I’d like to lobby for its support.