Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(demo): move links from labels to annotations #1194

Merged
merged 1 commit into from
Nov 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions demo/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ def alerts(self):
def _gen(size, cluster):
return [newAlert(
self._labels(instance="server{}".format(i), cluster=cluster,
severity="info", job="node_exporter", region="US",
repo="http://github.com/prymitive/karma"),
severity="info", job="node_exporter", region="US"),
self._annotations(
summary="Silence this alert, it's always firing")
summary="Silence this alert, it's always firing",
repo="Repo: https://github.com/prymitive/karma")
) for i in xrange(1, size)]
return _gen(10, "dev") + _gen(5, "staging") + _gen(3, "prod")

Expand All @@ -158,10 +158,11 @@ def alerts(self):
newAlert(
self._labels(instance="server{}".format(i), cluster="staging",
severity="warning", job="node_exporter",
region="US", repo="Link to github.com maybe"),
region="US"),
self._annotations(
dashboard="https://www.google.com/search?q="
"server{}".format(i))
"server{}".format(i),
repo="Link to github.com maybe")
) for i in xrange(0, instances)
]

Expand Down