rischan
rischan

Reputation: 1585

Prometheus for monitoring docker containers on multi servers

I am new in prometheus.

I want to monitor all docker containers inside many servers. The case is like this:

  1. I have 3 servers -> server A, B, and C (all running with Ubuntu).
  2. Each server has many docker containers for difference project.
  3. I will add one server (server D) and I want to install Prometheus on this server.

My questions:

  1. is it possible, If I want to install Prometheus to server D and monitor all docker containers in server A, B, and C?
  2. is it possible if I want to monitor all containers sorted by project? for example I use Gravana dashborad. Can I have one gravana dashboard for each project?

Upvotes: 0

Views: 4122

Answers (2)

rischan
rischan

Reputation: 1585

There is very nice project which I found and now I can solved my problem.

I used dockprom which created by stefan you can visit this github link .

These are streps that I used:

I use one server as a master (I deploy dockprom project on this server).

There are two ways to monitor another server by using this project;

  1. You can only deploy cadvisor and nodeexporter containers on another server then connect to prometheus master, but you need to add some configurations.

  2. The second way which I used was more simple, I deploy dockprom to all servers then I added datasource on master server (I filled the data source IP with IP server which I want to monitor plus prometheus port).

enter image description here

Upvotes: 2

brian-brazil
brian-brazil

Reputation: 34112

Yes, Prometheus can monitor them. You'll need to let Prometheus know what's running where, either by hand in the config or by using service discovery such as Consul.

On the Grafana side if you've got Prometheus labels setup to distinguish the projects, then the Grafana templates feature will let you do that.

Upvotes: 2

Related Questions