Grafana QuestDB plugin

Hello everyone
I tried using the new Grafana Plugin for QuestDB. and unfortunatly it wont work for me.
My setup is follwing: running Grafana local n my Laptop and QuestDB inside a Docker Container, everything on Windows.
When setting up the plugin according to this documentation it always says “Plugin health check failed”
I just changed the username to admin, because I dont have any other users.
When using the same settings on the PostgreSQL it works just fine.
Already tried asking the same question in the Grafana community, but no one could answer it there.
Thanks

Hi @Warzeeeee ,

I have just done a clean install of the Grafana in Docker, installed the plugin and set up the datasource in accordance with the documentation with the exception of using admin instead of user for the user name.

With the settings provided below I am able to connect and work with the database as intended:

Are these the exact settings you are using on your end?
Are your Docker ports exposed correctly?

Hey yes, i used exactly these settings. Different is the fact that i downloaded a self-managed version from grafana which runs locally on my Computer (No Docker).
I’m currently on working to install everything on a different Laptop, but this time Grafana and QuestDb inside a Container.
i just wondered why it wont work the way i have it currently, because Postgre works too

Are you using localhost or host.docker.internal for the hostname? If running outside of docker, as in your case, you should go with localhost.

Also, make sure you select “disable” on the dropdown for TLS/SSL.

In the past I’ve had issues with those two settings myself

i tried both. neither of them works.
in PostgreSQL i have it with localhost:8812 which works fine.
The QuestDB plugin says “Testing” for a few seconds when using host.docker.internal, and immediatly says “plugin healt check failed” when using localhost.
TlS/SSL is of course disabled

Could you please share which Grafana version you are using? I would like to try the same configuration to see if I can find something

Im using Grafana 10.4.0.
Thanks for your help so far

I also set up on another Laptop everything inside Docker with Grafana 11.1.0 and QuestDB 8.0.1. And this works.

Just downloaded that version and it is working for me. It might be the case that there is some misconfiguration.

For example, if I enter the wrong password (default is quest) then on the questdb logs I see this error
2024-07-15T14:23:25.026098Z I i.q.c.p.CleartextPasswordPgWireAuthenticator bad password for user [user=admin]
and on grafana I see the healtcheck issue.

If I enter the wrong user (defaults to admin), then I see this on questdb logs
2024-07-15T14:25:02.455134Z I i.q.c.p.CleartextPasswordPgWireAuthenticator bad password for user [user=user]

If I have the wrong host, then the error is not seen at QuestDB log, but at Grafana’s log ERROR[07-15|16:25:49] Internal server error logger=context userId=1 orgId=1 uname=admin error="[plugin.healthCheck] client: failed to check health: rpc error: code = Unknown desc = dial tcp: lookup host.docker.internal: no such host" remote_addr=[::1] traceID=

If I have the wrong port, or if I have the right port (defaults to 8812) but QuestDB is running on a container and the port is not exposed, then Grafana cannot connect and I see this at its log ERROR[07-15|16:27:23] Internal server error logger=context userId=1 orgId=1 uname=admin error="[plugin.healthCheck] client: failed to check health: rpc error: code = Unknown desc = dial tcp [::1]:8812: connect: connection refused" remote_addr=[::1] traceID= ERROR[07-15|16:27:23] Request Completed logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/uid/edru3f52bwtfka/health status=500 remote_addr=[::1] time_ms=3 duration=3.162667ms size=103 referer=http://localhost:3000/connections/datasources/edit/edru3f52bwtfka handler=/api/datasources/uid/:uid/health status_source=downstream

And, lastly, if TLS is not set to “disable” then on Grafana’s log I get ERROR[07-15|16:30:12] Internal server error logger=context userId=1 orgId=1 uname=admin error="[plugin.healthCheck] client: failed to check health: rpc error: code = Unknown desc = pq: SSL is not enabled on the server" remote_addr=[::1] traceID= ERROR[07-15|16:30:12] Request Completed logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/uid/ddru46udogm4gb/health status=500 remote_addr=[::1] time_ms=5 duration=5.592584ms size=103 referer=http://localhost:3000/connections/datasources/edit/ddru46udogm4gb handler=/api/datasources/uid/:uid/health status_source=downstream

Did you happen to see any error on QuestDB’s or Grafana’s stdout/logs?

Thanks!

1 Like

I dont know whats different today, but i started Grafana and QuestDb today tried the datasource without changing anything and it worked just fine.
Tried some suggestions you made, and with wrong username or password i got the same loggings in QuestDB.
Anyways it works fine now

Awesome! Great to hear. Please keep using community in case you find any other issues :slight_smile:

hi Javier,

I’m currently using PostgreSQL with Grafana for time-series data but recently came across the QuestDB plugin for Grafana. Does anyone have experience with it? Is it worth switching from the PostgreSQL method?

Thank you

In the end both plugins use the pgwire protocol to run the queries, so regarding performance, stability and so on, both are identical.

From a user point of view, the QuestDB plugin is more usable, as on the config page it has sensible defaults for QuestDB, and when using the query builder it can load metadata, such as table names and columns, so you can compose queries visually, rather than only writing SQL. Things like SAMPLE BY are also integrated on the query builder.

If you don’t care about the visual query builder, you can just keep using the postgresql plugin. My very personal rule of thumb these days is:

A) I am creating a new dashboard: I use the questdb plugin
B) I am maintaining an older dashboard that already used postgresql plugin. I don’t bother to change it

1 Like

Javier, many thanks for your response.

1 Like