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

0 votes
Hello

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.

Regards

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

1 answer to this question.

0 votes

Hi,

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" : "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 Jul 28, 2020 by MD
• 95,460 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,350 points
721 views
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
1,173 views
+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
3,925 views
+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,460 points
1,005 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