* Update TestRouteID tests
This commit updates the TestRouteID tests to be more simple without
reducing test coverage. It also adds new cases that show a bug
in the existing code where conflicting IDs can be returned.
Signed-off-by: George Robinson <george.robinson@grafana.com>
* Fix Route.ID() returns conflicting IDs
This commit fixes a bug where Route.ID() returns conflicting IDs.
For example, the configuration:
receiver: test
routes:
- matchers:
- foo=bar
continue: true
routes:
- matchers:
- bar=baz
- matchers:
- foo=bar
continue: true
routes:
- matchers:
- bar=baz
Gives the following Route IDs:
{}
{}/{foo="bar"}/0
{}/{foo="bar"}/{bar="baz"}/0
{}/{foo="bar"}/1
{}/{foo="bar"}/{bar="baz"}/0
When it should give these Route IDs:
{}
{}/{foo="bar"}/0
{}/{foo="bar"}/0/{bar="baz"}/0
{}/{foo="bar"}/1
{}/{foo="bar"}/1/{bar="baz"}/0
Signed-off-by: George Robinson <george.robinson@grafana.com>
---------
Signed-off-by: George Robinson <george.robinson@grafana.com>
To aggregate by all possible labels use '...' as the sole label name.
This effectively disables aggregation entirely, passing through all
alerts as-is. This is unlikely to be what you want, unless you have
a very low alert volume or your upstream notification system performs
its own grouping. Example: group_by: [...]
Signed-off-by: Kyryl Sablin <kyryl.sablin@schibsted.com>