-1

how many hours each container is started

Hi, I need know if have any tool or idea for take metrics, I want know how many hours, each container is up .

This is possible actuality?

Thanks

Flaco0
  • 28
  • 3
  • 1
    This is hard to answer, because you do not tell, what metrics you want to observe. But it is possible, yes. There are many tools available (just google "docker monitoring"), but it all depends on your needs and a bit on the orchestration you are using. – mbuechmann Jul 06 '18 at 09:36

3 Answers3

0

You can see the status and when it was created by typing docker ps

Deggo
  • 82
  • 4
  • Yes I know, but you imagine than I rent you a service for running containers. if you now stop the container and you need start the same container in other moment, I can´t see how many hours is up in total. I think your solution no is good – Flaco0 Jul 06 '18 at 09:30
0

You can use grafana + prometheus + cadvisor + node_exporter to capture metrics of all containers with since how long it is running and nodes on which it is running.

For more details you can follow this link :

https://stefanprodan.com/2016/a-monitoring-solution-for-docker-hosts-containers-and-containerized-services/

Alternatively you can also use command docker stats <container-name/id> to check details about it. Hope this will help. Thank you!

chintan thakar
  • 1,440
  • 1
  • 15
  • 25
0

you can see user command 'docker ps' or 'docker container ls' to know information about all the containers which are currently running. To see information about all container including stopped use command 'docker container ls -a'

In case you are looking for more information please elaborate what you are expecting?

Sandhu
  • 348
  • 5
  • 23