that looks right. I attempted to duplicate what you’ve done.
I used via Chronograf 1.8.6:
FROM "telegraf"."autogen"."cpu"
WHERE time > :dashboardTime: AND time < :upperDashboardTime:
GROUP BY time(30m), "host" FILL(null)
Subset of results looks like this:
time |
cpu.system |
cpu.user |
host |
2020-05-01T07:00:00.000Z |
0.992063492 |
2.610441765 |
ip-172-31-21-18.ec2.internal |
2020-05-01T07:00:00.000Z |
0 |
0 |
ip-172-31-27-248 |
2020-05-01T07:00:00.000Z |
0.5 |
1.901901902 |
ip-172-31-28-115 |
2020-05-01T07:00:00.000Z |
0.994035786 |
2.621359224 |
ip-172-31-44-100.ec2.internal |
2020-05-01T07:00:00.000Z |
0 |
0.1 |
ip-172-31-5-238 |
2020-05-01T07:00:00.000Z |
1.185770752 |
1.787394168 |
ip-172-31-93-202.ec2.internal |
2020-05-01T07:00:00.000Z |
1.178781925 |
2.689243026 |
telegraf-polling-service |
2020-05-01T07:30:00.000Z |
0.898203593 |
2.284011916 |
ip-172-31-21-18.ec2.internal |
2020-05-01T07:30:00.000Z |
0 |
0 |
ip-172-31-27-248 |
2020-05-01T07:30:00.000Z |
0.401606426 |
1.70682731 |
ip-172-31-28-115 |
2020-05-01T07:30:00.000Z |
1.197604791 |
2.087475151 |
ip-172-31-44-100.ec2.internal |
2020-05-01T07:30:00.000Z |
0 |
0.1001001 |
ip-172-31-5-238 |
2020-05-01T07:30:00.000Z |
0.701402806 |
2.004008016 |
ip-172-31-93-202.ec2.internal |
2020-05-01T07:30:00.000Z |
0.897308076 |
2.284011916 |
telegraf-polling-service |
2020-05-01T08:00:00.000Z |
0.796019901 |
2.279484639 |
ip-172-31-21-18.ec2.internal |
2020-05-01T08:00:00.000Z |
0 |
0 |
ip-172-31-27-248 |
2020-05-01T08:00:00.000Z |
0.401606426 |
1.606425702 |
ip-172-31-28-115 |
2020-05-01T08:00:00.000Z |
1.098901099 |
2.297702296 |
ip-172-31-44-100.ec2.internal |
2020-05-01T08:00:00.000Z |
0 |
0.2 |
ip-172-31-5-238 |
2020-05-01T08:00:00.000Z |
1.19760479 |
1.896207584 |
ip-172-31-93-202.ec2.internal |
2020-05-01T08:00:00.000Z |
0.798403194 |
2.186878728 |
telegraf-polling-service |
2020-05-01T08:30:00.000Z |
0.796812749 |
2.19123506 |
ip-172-31-21-18.ec2.internal |
2020-05-01T08:30:00.000Z |
0 |
0 |
ip-172-31-27-248 |
curl -XPOST 'https://my_influxdb:8086/query?u=my_username&p=my_password&pretty=true' --data-urlencode 'q=SELECT first("usage_system") AS "system",first("usage_user") AS "user" FROM "telegraf"."autogen"."cpu" WHERE time > now()-169d AND time < now()-138d GROUP BY time(30m), "host" FILL(null)'
(note: I didn’t add the LIMIT 10 here).
Results:
{
"results": [
{
"statement_id": 0,
"series": [
{
"name": "cpu",
"tags": {
"host": "ip-172-31-21-18.ec2.internal"
},
"columns": [
"time",
"system",
"user"
],
"values": [
[
"2020-05-01T02:30:00Z",
1.0989010981726326,
2.1999999997206032
],
[
"2020-05-01T03:00:00Z",
0.8937437930957314,
2.0854021842753934
],
[
"2020-05-01T03:30:00Z",
0.7007007006242959,
2.0100502513562315
],
[
"2020-05-01T04:00:00Z",
0.6951340616178079,
2.383316782359324
],
[
"2020-05-01T04:30:00Z",
0.7881773401777626,
2.385685884033873
],
...
So, this looks like the same output to me. I think perhaps what you are missing is that the series are returned by host (in my case…and “name” in yours). The description of the series and associated fields is provided in that header at the very top…and it repeats when the series key changes. So in my case, I see another series appear like this:
...
{
"name": "cpu",
"tags": {
"host": "telegraf-polling-service"
},
"columns": [
"time",
"system",
"user"
],
"values": [
[
"2020-05-01T02:30:00Z",
1.0999999998603016,
2.2044088164337197
],
...
Hopefully that helps!