Skip to content

Silence form fails to parse matchers with double quotes for alert preview #1913

Open
@mst-ableton

Description

@mst-ableton

What did you do?

Made a silence with quotes around the label value.

What did you expect to see?

The affected alert would be silenced, as it was listed under "affected alerts" when the silence was previewed and created.

What did you see instead? Under which circumstances?

The alert was not silenced, even though it was listed as affected.

Environment

  • System information:

Linux 4.9.125-linuxkit x86_64

  • Alertmanager version:

alertmanager, version 0.17.0 (branch: HEAD, revision: c7551cd)
build user: root@932a86a52b76
build date: 20190503-09:10:07
go version: go1.12.4

  • Prometheus version:

N/A

  • Alertmanager configuration file:

N/A

  • Prometheus configuration file:

N/A

  • Logs:

N/A

Steps to repro:

amtool alert --alertmanager.url localhost:9093 add node="node with spaces"

Screen Shot 2019-06-06 at 16 42 17


Create a new silence with quotes around the value. Note that the "affected alerts" shows that the currently firing alert is affected.

Screen Shot 2019-06-06 at 16 42 42


Go back to the main screen. The alert is still there, because it was not actually silenced:

Screen Shot 2019-06-06 at 16 42 52


Make a new silence without quotes:

Screen Shot 2019-06-06 at 16 43 14


Only now is the alert properly silenced:

Screen Shot 2019-06-06 at 16 43 22

Thanks for alertmanager, and thanks in advance for taking a look into this!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions