# Docker Container down Alert configuration

**URL:** <https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578>\
**Category:** Help\
**Tags:** agent, alerts\
**Created:** [July 5, 2024, 5:00am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578 "2024-07-05T05:00:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerondevops](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/zerondevops/32/3762_2.png) [@zerondevops](https://community.netdata.cloud/u/zerondevops)\
**Post date:** [July 5, 2024, 5:00am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/1 "2024-07-05T05:00:17Z")

</div>

I want to configure an alert for any Docker container that goes down using the Netdata stable client. I will share a metrics snapshot from the Netdata dashboard.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/2X/0/0a9768bb61a7594004d10ecb3f966cf2d40e9a4a.png)

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [July 5, 2024, 8:18am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/2 "2024-07-05T08:18:59Z")

</div>

Hi. I added an example in [health add alarm docker container down by ilyam8 · Pull Request #18075 · netdata/netdata · GitHub](https://github.com/netdata/netdata/pull/18075). Check the alert and my comments in the PR.

---

<div class="post-metadata">

**Author:** ![zerondevops](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/zerondevops/32/3762_2.png) [@zerondevops](https://community.netdata.cloud/u/zerondevops)\
**Post date:** [July 6, 2024, 10:01am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/3 "2024-07-06T10:01:37Z")

</div>

Hi @ilyam8 I follow this one and use this config file, but its not work properly, When Docker container up that time alert trigger to Microsoft teams,

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [July 6, 2024, 3:22pm UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/4 "2024-07-06T15:22:20Z")

</div>

Hi, @zerondevops. I can’t confirm the issue, the alarm is up **only** if a container is exited (down).

---

<div class="post-metadata">

**Author:** ![zerondevops](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/zerondevops/32/3762_2.png) [@zerondevops](https://community.netdata.cloud/u/zerondevops)\
**Post date:** [July 6, 2024, 3:51pm UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/5 "2024-07-06T15:51:29Z")

</div>

Yes when container again up means “docker compose up” that time alarm is up that that container down

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [July 6, 2024, 6:20pm UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/6 "2024-07-06T18:20:24Z")

</div>

There is [1 minute delay](https://github.com/netdata/netdata/blob/a11d29e8d553ad5ae9d358616277812d7ae07ede/src/health/health.d/docker.conf#L30) for sending CLEAR notification but that is it. It works for me, I don’t have any problems with this alarm.

---

<div class="post-metadata">

**Author:** ![zerondevops](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/zerondevops/32/3762_2.png) [@zerondevops](https://community.netdata.cloud/u/zerondevops)\
**Post date:** [July 9, 2024, 7:02am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/7 "2024-07-09T07:02:52Z")

</div>

Hi Still I facing this same issue when docker down that time alert not trigger, when I up docker container that time alert trigger. I using this configure

```
  template: docker_container_down
              on: docker.container_state
         class: Errors
          type: Containers

```

component: Docker  
chart labels: container\_name=!\*  
units: status  
every: 10s  
lookup: average -10s of exited  
warn: $this \> 0  
delay: down 1m multiplier 1.5 max 2h  
summary: Docker container ${label:container\_name} down  
info: Docker container ${label:container\_name} is currently not running  
to: sysadmin

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [July 9, 2024, 7:35am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/8 "2024-07-09T07:35:27Z")

</div>

> alert trigge

This is impossible. The alarm you shared matches nothing. It can’t be triggered with your configuration.

* * *

> Check the alert and my comments in the PR.

I think you missed that and didn’t read [this comment](https://github.com/netdata/netdata/blob/837d3573fdac1ffd1f485ade37312e2eafdf785e/src/health/health.d/docker.conf#L16-L18) and modified [chart labels](https://learn.netdata.cloud/docs/alerts-&-notifications/alert-configuration-reference#alert-line-chart-labels).

You need to modify `chart labels: container_name=!*`

---

<div class="post-metadata">

**Author:** ![zerondevops](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/zerondevops/32/3762_2.png) [@zerondevops](https://community.netdata.cloud/u/zerondevops)\
**Post date:** [July 9, 2024, 11:06am UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/9 "2024-07-09T11:06:13Z")

</div>

I understand that if any container goes down (is not running), I should receive a notification using this configuration.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/2X/d/daa53aff887e6f78762e2f0d466bde1e75ce2191.png)

---

<div class="post-metadata">

**Author:** ![sashwathn](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/sashwathn/32/2886_2.png) [@sashwathn](https://community.netdata.cloud/u/sashwathn)\
**Post date:** [July 9, 2024, 12:38pm UTC](https://community.netdata.cloud/t/docker-container-down-alert-configuration/5578/10 "2024-07-09T12:38:14Z")

</div>

@ilyam8 @zerondevops : I got on a call and solved this issue to trigger alerts when the docker containers go to `exited` state.
