Postgres grafana setup

Hello; I’m new to grafana. I can’t get grafana to see my local postgres database. What does it want?

The database is localhost:5432
database name is clarion

gave it a working username and password, I’m using it in a python script that talks to postgres.

It’s complaining about 400 and the user should only have select permissions…which I don’t care about…this is just a test and it’s only me using it…but I don’t see anyway to change the permissions to make it stop complaining.

Can anyone point to me to a tutorial or help clear up what it wants?

I attached a screen shot the message it gives.

Thanks in advance!

Thanks for sharing @tjw74, and welcome!

The “User Permission” box I think is always there, as a notice about potential risks of allowing overly broad permissions. I’m pretty sure it’s unrelated to the error you’re experiencing.

I assume you’ve confirmed that you can connect to your local server in another way, for example via psql CLI, or pgAdmin or similar?

How are you running Grafana? Is it running on the same server as the database? Is it in a Docker container by any chance? (is it Grafana Cloud?)

Any more details on the error? If it’s a connection error, you should get a more detailed message in the top right corner of your screen. Or in your browser’s console.

Hi Svet; I can access the DB with pgAdmin and I have a python script that pulls data from an API and stores it in the DB…that is working also.

I’m running a local copy of Grafana, installed and started from terminal. I can log in and make dashboards,etc. When I add postgres as a data source I put in the info it asks for, including the username and password I use to run the script and it gives 400.

I’m a bit frustrated as you can tell. I really like the way Grafana looks and I would like to try it out and start using it. But it’s so deflating when the simplest thing…connect to the data base and read time series data from a plane old table requires a lot of gymnastics it’s a turn off and feels unnecessary.

But…if you can help me figure it out or point me to a step by step I will try to get it working.

Does it need anything else in addition to postrges as a data source?

I watched a bunch of tutorials and people are using postgres, influx, telegraf and all sorts of stuff that appears to do the same thing…but maybe not. It’s too confusing.

I don’t know what else it wants.

Hm ok… Do you have more info on the specific error you’re getting (from your browser console)? There should be something in the Grafana log also.

Your data source settings mostly look fine. Though can you confirm that you actually have SSL set up with a valid certificate on the server? Because having TLS/SSL set to “verify-full” will require that. It sounds like this was a pretty quick setup, so I suspect you might not actually have SSL set up on your server?

Svet; you’re a super hero my man. I disabled the TSL/SSL and I can now see my tables in the dashboard. Woohoo!

Thanks dude! Appreciate you replying to help out!


Nice one, glad to hear it’s working!

Yeah it’s very easy to gloss over those default settings and assume they’re actually right :slight_smile: