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

Change GeneratorURL to use configurable Grafana explore URL #8500

Merged
merged 8 commits into from
Apr 21, 2023

Conversation

aminesnow
Copy link
Contributor

@aminesnow aminesnow commented Feb 10, 2023

What this PR does / why we need it:
This PR changes the GeneratorURL associated with alerts generated by Loki. The new GeneratorURL uses a Grafana URL path.

Which issue(s) this PR fixes:
Fixes #6743

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@aminesnow aminesnow requested a review from a team as a code owner February 10, 2023 15:13
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!!

pkg/ruler/base/ruler.go Outdated Show resolved Hide resolved
pkg/ruler/base/ruler.go Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 20, 2023
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks very much @aminesnow

@aminesnow aminesnow requested a review from JStickler as a code owner April 20, 2023 12:58
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Apr 20, 2023
@dannykopping dannykopping changed the title Change GeneratorURL to use Grafana URL Change GeneratorURL to use configurable Grafana explore URL Apr 20, 2023
@@ -1665,7 +1667,7 @@ func TestSendAlerts(t *testing.T) {
Annotations: []labels.Label{{Name: "a2", Value: "v2"}},
StartsAt: time.Unix(2, 0),
EndsAt: time.Unix(3, 0),
GeneratorURL: "http://localhost:9090/graph?g0.expr=up&g0.tab=1",
GeneratorURL: fmt.Sprintf("http://localhost:9090/explore?left={\"queries\":[%s]}", escapedExpression),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit: it's mildly confusing here to keep using :9090 since that's the Prometheus port

Mohamed-Amine Bouqsimi added 2 commits April 20, 2023 15:01
@aminesnow
Copy link
Contributor Author

@dannykopping I would like to rebase if you don't mind.

@dannykopping
Copy link
Contributor

@dannykopping I would like to rebase if you don't mind.

There should never really be a reason to rebase (i.e. rewrite history) since we squash-merge.
You can pull main into your branch to achieve the same result.

@aminesnow
Copy link
Contributor Author

@dannykopping I would like to rebase if you don't mind.

There should never really be a reason to rebase (i.e. rewrite history) since we squash-merge. You can pull main into your branch to achieve the same result.

Good point!

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs team] LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ruler]: GeneratorURL in alerts is wrong/unuseful
5 participants