How to export Docker container metrics

0 votes

Hi Guys,

I want to export docker metrics and want to connect with monitoring tool like grafana. So that I can monitor my containers from anywhere. Can someone help me how can I do this?

Thank You

May 28, 2020 in Docker by akhtar
• 38,260 points
1,106 views

1 answer to this question.

0 votes

Hi@akhtar,

By default, docker will not allow you to monitor its metrics. For that you have to configure your docker. You can use the below code to configure your docker engine.

  • Go to your /etc/docker folder and create one file named daemon.json. Inside this file write down these below lines.
{
  "metrics-addr" : "0.0.0.0:9323",
  "experimental" : true
}
  • After that restart your docker engine.
$ systemctl restart docker.
  • Now you can browse your docker metrics.
$ localhost:9323/metrics

Hope this is helpful.

answered May 28, 2020 by MD
• 95,460 points

Related Questions In Docker

+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 34,135 views
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,620 points
3,517 views
0 votes
2 answers

How to execute docker exec commande inside a docker container ?

You need to get inside the container ...READ MORE

answered Aug 13, 2019 in Docker by Sirajul
• 59,230 points
3,794 views
0 votes
1 answer

How to continue running a docker container which is already exited?

Restart an existing container after you exited ...READ MORE

answered Jul 19, 2018 in Docker by Sophie may
• 10,620 points
2,536 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,714 views
0 votes
1 answer

How can I connect a docker container to two docker networks that I have created?

Hi@akhtar, It's correct that the network argument of ...READ MORE

answered Mar 23, 2020 in Docker by MD
• 95,460 points
10,845 views
0 votes
1 answer

How to expose my docker container?

Hi@akhtar, To expose you container from outside you ...READ MORE

answered Apr 6, 2020 in Docker by MD
• 95,460 points
914 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP