I’ve installed the grafana agent on my ubuntu server and recording the node metrics correctly.
I’ve also installed the relevant docker connection and have metrics being recorded from my docker-compose managed containers.
One of the containers on this server is a postgre database. I’m going around in circles trying to work out how I can monitor this using grafana cloud.
I’ve found some quite old instructions which suggests installing postgres-exporter as a container in my compose stack and connecting to the database from here to export metrics/logs.
I’m now not quite sure though how to get this outputting either a) Directly to grafana cloud api b) to the local grafana agent to use the inbuilt postgres collection to cloud.
I’ve thought about just exposing a postgres port from the docker network to the host but I don’t overly want to expose ports if I dont need to. I also guess I could run the grafana agent within a container to be able to connect to the postgres db on the same network but unsure on the config for that and if it would have any clashes with the local agent on the host.