Find Memory consumption of the container by using commands inside the container

0 votes

I am trying to use Healthcheck in the container. Want to make the container unhealthy when the memory consumption reaches 90%. Is there anyway to do that.


Shibi K
Jul 28, 2020 in DevOps & Agile by Shibi
• 120 points

1 answer to this question.

0 votes


You can use any monitoring tools like ELK or Grafana. This will give you a user-friendly graph in real-time. Or you can retrieve the metrics of your docker container. By default it is disabled. But you can enable this by using the below-given steps.

  • Go to your /etc/docker folder and create one file named daemon.json. Inside this file write down these below lines.
  "metrics-addr" : "",
  "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 Jul 28, 2020 by MD
• 95,320 points

Related Questions In DevOps & Agile

0 votes
1 answer

Run Tests within Container using the Bluemix DevOps service

Try these steps: Step 1- sett up a ...READ MORE

answered Aug 3, 2018 in DevOps & Agile by Kalgi
• 52,370 points
0 votes
1 answer
0 votes
1 answer

Get the Ip of a docker container

Here is what you need to do.  Firstly, ...READ MORE

answered Dec 10, 2018 in DevOps & Agile by Damon Salvatore
• 5,980 points
+2 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
+1 vote
1 answer
0 votes
1 answer

Jenkins instance when opened using public address of AWS is giving permission denied

Hi@Kavita, You need to create a rule in ...READ MORE

answered Oct 7, 2020 in DevOps & Agile by MD
• 95,320 points