# Grafana, influxdb query problem

**URL:** <https://community.grafana.com/t/grafana-influxdb-query-problem/25285>\
**Category:** InfluxDB\
**Created:** [January 29, 2020, 4:11pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285 "2020-01-29T16:11:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![damirsvegovic](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@damirsvegovic](https://community.grafana.com/u/damirsvegovic)\
**Post date:** [January 29, 2020, 4:11pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/1 "2020-01-29T16:11:04Z")

</div>

Hi,  
Can aynbody tell me what I need to do to see data on Grafana dashboard…  
I’m using influxdb and node red to store values from sensors.  
Using cli influx commands I see values stored in database.  
example

> select count(\*) from kc\_temp  
> name: kc\_temp  
> time count\_value

* * *

0 11515

or

> SELECT \* FROM “kc\_temp” limit 5  
> name: kc\_temp  
> time value

* * *

1580046175568791639 18.00  
1580046194152744473 18.00  
1580046215556226509 18.00  
1580046224216724661 18.00  
1580046240434540744 18.00

I watched several tutorials on youtube, but I don’t know where is the problem.  
Dataset is OK, by pressing SAVE & Test everything is OK.

Can anyone help, how should I fill Query to work with my example ???

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/b/b8f36b6c66077d68e970ec0742910468a4b3015e.png)

---

<div class="post-metadata">

**Author:** ![meruem](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/meruem/32/6501_2.png) [@meruem](https://community.grafana.com/u/meruem)\
**Post date:** [January 29, 2020, 7:47pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/2 "2020-01-29T19:47:20Z")

</div>

Hi,

Can you show your InfluxDB database configuration in Grafana.

Are you sure your Grafana server is allow to access to your InfluxDB server ?

Regards,

---

<div class="post-metadata">

**Author:** ![damirsvegovic](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@damirsvegovic](https://community.grafana.com/u/damirsvegovic)\
**Post date:** [January 29, 2020, 7:59pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/3 "2020-01-29T19:59:05Z")

</div>

I’m not 100% sure…grafana said that is ok…is there any CLI command to test it ?

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/e/e0685ab439d8aee928a23fe5c1a502d1ab463f61.png)

![image](https://us1.discourse-cdn.com/grafana/original/2X/0/0bd1da15ee8fa4088c68e98e17978648ab941286.png)

---

<div class="post-metadata">

**Author:** ![meruem](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/meruem/32/6501_2.png) [@meruem](https://community.grafana.com/u/meruem)\
**Post date:** [January 29, 2020, 8:06pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/4 "2020-01-29T20:06:42Z")

</div>

Try this

- Change your url with : [http://127.0.0.1:8086](http://127.0.0.1:8086)

- Access: Server (default)

- Auth : all disable

---

<div class="post-metadata">

**Author:** ![damirsvegovic](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@damirsvegovic](https://community.grafana.com/u/damirsvegovic)\
**Post date:** [January 29, 2020, 8:17pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/5 "2020-01-29T20:17:13Z")

</div>

hi…  
it’s working finally…many THX

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/e/e2cf17abeb97770acecd7c4ec1a620fb6857f2ab.png)

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 9:23am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/6 "2020-01-30T09:23:52Z")

</div>

I am also getting similar error. But unable to resolve it using above mentioned configuration.  
Please view the my below attached configurations.

 ![grafana-DB](https://us1.discourse-cdn.com/grafana/original/2X/9/9ed8e528023407d6c818b63bb869461475144cf4.png)

Can anyone please ![grafana-query](https://us1.discourse-cdn.com/grafana/original/2X/7/78f500a8d7253537b03aab1e52ee1f2d06d964d0.png) help, how should I fill Query to work with my example ???

---

<div class="post-metadata">

**Author:** ![damirsvegovic](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@damirsvegovic](https://community.grafana.com/u/damirsvegovic)\
**Post date:** [January 30, 2020, 10:01am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/7 "2020-01-30T10:01:04Z")

</div>

hi,  
did you edited influxdb.conf ??? if not try to follow Youtube video where guys shows how to do it…  
Try to check if your tables have numeric values, if is number stored as string it will not show … This is my 1 day experience with Grafana.

```auto

```

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 10:03am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/8 "2020-01-30T10:03:52Z")

</div>

Hi, thanks for the comment. I am able to get the data if I manually fill the query. But the query section does not automatically show me the available options of fields and measurements.

---

<div class="post-metadata">

**Author:** ![meruem](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/meruem/32/6501_2.png) [@meruem](https://community.grafana.com/u/meruem)\
**Post date:** [January 30, 2020, 10:11am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/9 "2020-01-30T10:11:31Z")

</div>

Try to restant grafana. I also face toi this issue.

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 10:16am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/10 "2020-01-30T10:16:11Z")

</div>

Hi, restart the server multiple times but error still persists.

---

<div class="post-metadata">

**Author:** ![malamgir](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/malamgir/32/9479_2.png) [@malamgir](https://community.grafana.com/u/malamgir)\
**Post date:** [January 30, 2020, 10:37am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/11 "2020-01-30T10:37:12Z")

</div>

Share error log file

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 10:44am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/12 "2020-01-30T10:44:00Z")

</div>

Hi, thanks for the comment. There is no error logged, please see my above comments, I am unable to view my measurements and fields on the selection of the database, in the query panel.

---

<div class="post-metadata">

**Author:** ![meruem](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/meruem/32/6501_2.png) [@meruem](https://community.grafana.com/u/meruem)\
**Post date:** [January 30, 2020, 1:47pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/13 "2020-01-30T13:47:02Z")

</div>

Go to your InfluxDB database and show de fieldType of your data

```
show field keys from cpu
name: cpu
fieldKey fieldType
-------- ---------
usage_guest float
usage_guest_nice float
usage_idle float
usage_iowait float
usage_irq float
usage_nice float
usage_softirq float

```

Your InfluDB server and Grafana server are in the same server ?

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 1:51pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/14 "2020-01-30T13:51:55Z")

</div>

> [@meruem](#):
>
> show de fieldType of your data

yes both are locally hosted on my machine  
 ![influx-keys](https://us1.discourse-cdn.com/grafana/original/2X/9/9ed593ca171aaf543b1ae72e3c0c475598f3fd64.png)

---

<div class="post-metadata">

**Author:** ![malamgir](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/malamgir/32/9479_2.png) [@malamgir](https://community.grafana.com/u/malamgir)\
**Post date:** [January 30, 2020, 1:58pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/15 "2020-01-30T13:58:48Z")

</div>

Share your config file of telegraf

---

<div class="post-metadata">

**Author:** ![meruem](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/meruem/32/6501_2.png) [@meruem](https://community.grafana.com/u/meruem)\
**Post date:** [January 30, 2020, 2:00pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/16 "2020-01-30T14:00:02Z")

</div>

![image](https://us1.discourse-cdn.com/grafana/original/2X/d/d597fed5f33faa413e2f5707675ea7e686c2da2e.png)

use the command below and post the result

---

<div class="post-metadata">

**Author:** ![malamgir](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/malamgir/32/9479_2.png) [@malamgir](https://community.grafana.com/u/malamgir)\
**Post date:** [January 30, 2020, 2:03pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/17 "2020-01-30T14:03:13Z")

</div>

Can you please share will be the config file how did you get other metrics in your telegaf config file.

Like by default these metrics are stored.

[[inputs.win\_perf\_counters]]  
[[inputs.win\_perf\_counters.object]]  
# Processor usage, alternative to native, reports on a per core.  
ObjectName = “Processor”  
Instances = ["_"]  
Counters = [  
“% Idle Time”,  
“% Interrupt Time”,  
“% Privileged Time”,  
“% User Time”,  
“% Processor Time”,  
“% DPC Time”,  
]  
Measurement = “win\_cpu”  
# Set to true to include \_Total instance when querying for all (_).  
IncludeTotal=true

[[inputs.win\_perf\_counters.object]]  
# Disk times and queues  
ObjectName = “LogicalDisk”  
Instances = ["_"]  
Counters = [  
“% Idle Time”,  
“% Disk Time”,  
“% Disk Read Time”,  
“% Disk Write Time”,  
“% Free Space”,  
“Current Disk Queue Length”,  
“Free Megabytes”,  
]  
Measurement = “win\_disk”  
# Set to true to include \_Total instance when querying for all (_).  
#IncludeTotal=false

[[inputs.win\_perf\_counters.object]]  
ObjectName = “PhysicalDisk”  
Instances = ["\*"]  
Counters = [  
“Disk Read Bytes/sec”,  
“Disk Write Bytes/sec”,  
“Current Disk Queue Length”,  
“Disk Reads/sec”,  
“Disk Writes/sec”,  
“% Disk Time”,  
“% Disk Read Time”,  
“% Disk Write Time”,  
]  
Measurement = “win\_diskio”

[[inputs.win\_perf\_counters.object]]  
ObjectName = “Network Interface”  
Instances = ["\*"]  
Counters = [  
“Bytes Received/sec”,  
“Bytes Sent/sec”,  
“Packets Received/sec”,  
“Packets Sent/sec”,  
“Packets Received Discarded”,  
“Packets Outbound Discarded”,  
“Packets Received Errors”,  
“Packets Outbound Errors”,  
]  
Measurement = “win\_net”

[[inputs.win\_perf\_counters.object]]  
ObjectName = “System”  
Counters = [  
“Context Switches/sec”,  
“System Calls/sec”,  
“Processor Queue Length”,  
“System Up Time”,  
]  
Instances = ["------"]  
Measurement = “win\_system”  
# Set to true to include \_Total instance when querying for all (\*).  
#IncludeTotal=false

[[inputs.win\_perf\_counters.object]]  
# Example query where the Instance portion must be removed to get data back,  
# such as from the Memory object.  
ObjectName = “Memory”  
Counters = [  
“Available Bytes”,  
“Cache Faults/sec”,  
“Demand Zero Faults/sec”,  
“Page Faults/sec”,  
“Pages/sec”,  
“Transition Faults/sec”,  
“Pool Nonpaged Bytes”,  
“Pool Paged Bytes”,  
“Standby Cache Reserve Bytes”,  
“Standby Cache Normal Priority Bytes”,  
“Standby Cache Core Bytes”,  
]  
# Use 6 x - to remove the Instance bit from the query.  
Instances = ["------"]  
Measurement = “win\_mem”  
# Set to true to include \_Total instance when querying for all (\*).  
#IncludeTotal=false

[[inputs.win\_perf\_counters.object]]  
# Example query where the Instance portion must be removed to get data back,  
# such as from the Paging File object.  
ObjectName = “Paging File”  
Counters = [  
“% Usage”,  
]  
Instances = ["\_Total"]  
Measurement = “win\_swap”

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 30, 2020, 2:15pm UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/18 "2020-01-30T14:15:51Z")

</div>

I am using windows environment. I’ll try to find equivalent commands.

---

<div class="post-metadata">

**Author:** ![malamgir](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/malamgir/32/9479_2.png) [@malamgir](https://community.grafana.com/u/malamgir)\
**Post date:** [January 31, 2020, 5:14am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/19 "2020-01-31T05:14:22Z")

</div>

@aalishrana Hi Ali Aslam can you please share your config file as i shared mine i want to see how did you add others metrics

---

<div class="post-metadata">

**Author:** ![aalishrana](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aalishrana](https://community.grafana.com/u/aalishrana)\
**Post date:** [January 31, 2020, 7:10am UTC](https://community.grafana.com/t/grafana-influxdb-query-problem/25285/20 "2020-01-31T07:10:37Z")

</div>

Hi, I can’t find the configuration file you shared above. Can you please specify the path ?  
Secondly, I only changed these two configuration files on path

1. grafana\conf\custom.ini
2. grafana\conf\provisioning\datasources\sample.yaml

[Next page](https://community.grafana.com/t/grafana-influxdb-query-problem/25285.md?page=2)
