Best way to monitor mariadb/postgres in a docker container?

Hey, I set up the mk_mysql plugins for all hosts that have mariadb installed.
Because we got some applications with databases in docker (like bookstack or netbox), I was unsure if its the best way to monitor them with mk_mysql or mk_postgres.py from the host.
With mysql its not a real problem, I just copy the mk_mysql script, add host, user & password to /etc/check_mk/mysql.cfg. Then the checks get added to my host:

But with mk_postgres.py its a little different. I added PGDATABASE, PGPORT & PGVERSION to /etc/check_mk/main.env and the line ( hostname:port:database:username:password) to main.pgpass, with the ipv4 of the docker container. Like described on https://checkmk.atlassian.net/wiki/spaces/KB/pages/16646145/How-to+monitor+PostgreSQL.
But now I get those checks with 2 Crit, which makes sence because there is no psql process on the docker host, so I disabled those 2 services:

My question: Whats the best way to monitor a DB inside a docker container? Since mysql works just fine, should i just not monitor postgresql at all? Or am I doing sth wrong?

Thx!

Use robotmk to check if the db delivers results as expected.
You need a webinterface for these checks.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.