# Exclude monitors that have a specific tag, but Alert still counts these monitors

**URL:** <https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332>\
**Category:** Synthetics\
**Tags:** elastic-stack-alerting\
**Created:** [September 21, 2020, 9:50am UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332 "2020-09-21T09:50:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Veenstra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_veenstra/32/47241_2.png) [@Mark\_Veenstra](https://discuss.elastic.co/u/Mark_Veenstra)\
**Post date:** [September 21, 2020, 9:50am UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/1 "2020-09-21T09:50:09Z")

</div>

I am trying to alert on monitors excluding monitors that have the tag `no-alert`. See the next configuration:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f7716182532f14f76346a8b2ace612da9c319540.png)

Which shows it will be applied to 32 monitors. Which is correct there are 2 monitors that have that tag. So all seems well. But once I save this monitor. It will send an alert (webhook). Because of these 2 monitors that should get excluded!

We are running on version 7.8.0. I also tried several ways of querying but all do not work correctly. Is this a known bug or am I doing something completely wrong here?

For example the next query does not work either:

- `NOT tags : "no-alert"`

---

<div class="post-metadata">

**Author:** ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)\
**Post date:** [September 21, 2020, 1:04pm UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/2 "2020-09-21T13:04:00Z")

</div>

Hi @Mark_Veenstra, thanks for taking the time to post in our forum.

> Is this a known bug or am I doing something completely wrong here?

It looks to me that, yes, you are encountering a known bug. We recently resolved [the issue](https://github.com/elastic/kibana/issues/74069) tracking it.

[The fix](https://github.com/elastic/kibana/pull/75577) is present in upcoming releases `7.9.2` and `7.10.0` of the stack. At the moment there aren't any further scheduled patch releases for `7.8.x`, so my recommendation would be upgrading when `7.9.2` is released.

---

<div class="post-metadata">

**Author:** ![Mark\_Veenstra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_veenstra/32/47241_2.png) [@Mark\_Veenstra](https://discuss.elastic.co/u/Mark_Veenstra)\
**Post date:** [September 21, 2020, 2:08pm UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/3 "2020-09-21T14:08:58Z")

</div>

@jkambic Thanks for pointing this out. But it seems the solution has been backported to `7.9.1`: [https://github.com/elastic/kibana/pull/75577#issuecomment-685792488](https://github.com/elastic/kibana/pull/75577#issuecomment-685792488)

Would upgrading to `7.9.1` already solve it? Also the release notes of `7.9.1` mentions the same solution: [https://www.elastic.co/guide/en/kibana/7.9/release-notes-7.9.1.html](https://www.elastic.co/guide/en/kibana/7.9/release-notes-7.9.1.html)

---

<div class="post-metadata">

**Author:** ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)\
**Post date:** [September 22, 2020, 1:13am UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/4 "2020-09-22T01:13:02Z")

</div>

> [@Mark\_Veenstra](#):
>
> it seems the solution has been backported to `7.9.1`

Right you are, I have updated the labels on the original PR to reflect this. Thank you for pointing that out.

In this case, yes I would try upgrading to `7.9.1` and see if it can resolve the problem you are experiencing!

---

<div class="post-metadata">

**Author:** ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)\
**Post date:** [September 29, 2020, 12:42pm UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/5 "2020-09-29T12:42:58Z")

</div>

Hi - I wanted to give you an update, that fix is labeled as `7.9.1` and was included in the release notes, but was included mistakenly. It was merged a few days after the release was cut from the `7.9` branch, so the fix will only be present in `7.9.2`, I'm sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 23, 2020, 12:43pm UTC](https://discuss.elastic.co/t/exclude-monitors-that-have-a-specific-tag-but-alert-still-counts-these-monitors/249332/6 "2020-10-23T12:43:02Z")

</div>

This topic was automatically closed 24 days after the last reply. New replies are no longer allowed.
