# Icinga2 - monitoring docker eviroment

**URL:** <https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418>\
**Category:** Icinga 2\
**Created:** [January 8, 2021, 1:02pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418 "2021-01-08T13:02:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatslimjoe](https://community.icinga.com/user_avatar/community.icinga.com/fatslimjoe/32/6764_2.png) [@fatslimjoe](https://community.icinga.com/u/fatslimjoe)\
**Post date:** [January 8, 2021, 1:02pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/1 "2021-01-08T13:02:40Z")

</div>

Hi,

I did resreach regarading monitoring docker enviroment. For now it seams that Prometheus/Node\_exporter/Cadvisor is better solution. We can set up additional Prometheus and give Prometheus task to scrap information and then develop python script which Icinga2 will use to fetch info from Prometheus … or even we could leave out Prometheus and use only node exporter/cadvisor, then develop python plugin which icinga2 will use in polling process …

Icinga2 is our standard monitoring system and we need solution how to monitor environment where we have docker containers.

my question’s:

- is there any more intelligent or more elegant solution for this request to use it beside with icinga2 (best practice)?
- do you have exp how to monitor microservices with icinga2?

Thx,  
Josip

---

<div class="post-metadata">

**Author:** ![fatslimjoe](https://community.icinga.com/user_avatar/community.icinga.com/fatslimjoe/32/6764_2.png) [@fatslimjoe](https://community.icinga.com/u/fatslimjoe)\
**Post date:** [January 20, 2021, 3:53pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/2 "2021-01-20T15:53:15Z")

</div>

Hi just to give you update regarding this topic, we have setup on test env Prometheus/Cadvisor and develop check docker plugin in python. Icinga2 is using that plugin to fetch info about some docker from Prometheus and Prometheus is scraping CAdvisor. Now we are able to monitor our docker swarm test enviroment 🙂 .

When it will be done I could update solution on github with python script.

Cheers!

---

<div class="post-metadata">

**Author:** ![pdolinic](https://community.icinga.com/user_avatar/community.icinga.com/pdolinic/32/4994_2.png) [@pdolinic](https://community.icinga.com/u/pdolinic)\
**Post date:** [September 5, 2022, 9:30pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/3 "2022-09-05T21:30:43Z")

</div>

This sounds like a very cool idea @fatslimjoe, is it shared on Github already?

---

<div class="post-metadata">

**Author:** ![fatslimjoe](https://community.icinga.com/user_avatar/community.icinga.com/fatslimjoe/32/6764_2.png) [@fatslimjoe](https://community.icinga.com/u/fatslimjoe)\
**Post date:** [January 4, 2023, 5:11pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/4 "2023-01-04T17:11:22Z")

</div>

Hi, in mean time we have decided to switch docker swarm with k8s so I didnt finish the python script. Even not sure if this script is any more in our test env 🙂 , I have used python library “response” and did simple get request on CAdvisor url where metrics data is exposed … and with parsing and regex magic I have took the data what we need … I think I have done code only for load and root FS … had in the plan to do for swap, uptime and memory stuff … but then we decided to go with k8s and didnt proceed with futher development

---

<div class="post-metadata">

**Author:** ![ShowMeYourSkil](https://community.icinga.com/user_avatar/community.icinga.com/showmeyourskil/32/4975_2.png) [@ShowMeYourSkil](https://community.icinga.com/u/ShowMeYourSkil)\
**Post date:** [January 4, 2023, 8:11pm UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/5 "2023-01-04T20:11:11Z")

</div>

Hi @fatslimjoe , @pdolinic  
I can recommend LinuxFabric for Docker monitoring.

> **[Linuxfabrik Monitoring Plugins Collection :: Icinga Exchange](https://exchange.icinga.com/Linuxfabrik/Linuxfabrik%20Monitoring%20Plugins%20Collection)**
>
> More than 160 check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check. A project by Linuxfabrik in category Plugins....

---

<div class="post-metadata">

**Author:** ![fatslimjoe](https://community.icinga.com/user_avatar/community.icinga.com/fatslimjoe/32/6764_2.png) [@fatslimjoe](https://community.icinga.com/u/fatslimjoe)\
**Post date:** [January 5, 2023, 10:02am UTC](https://community.icinga.com/t/icinga2-monitoring-docker-eviroment/6418/6 "2023-01-05T10:02:11Z")

</div>

This sounds very promising! Thx! Will noted that and next time we will for sure try this plugin before I start with our development
