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

[file-sd-part-4] Added flag for query addresses to ruler #555

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

ivan-valkov
Copy link

@ivan-valkov ivan-valkov commented Oct 5, 2018

Changes

Adds the option to statically configure the queriers that ruler talks to via a command line flag.

Not exactly fileSD related, but it can be useful as a static alternative to gossip.

Verification

Validated in a following PR - (#556)

@@ -192,6 +212,8 @@ func runRule(
// back or the context get canceled.
queryFn := func(ctx context.Context, q string, t time.Time) (promql.Vector, error) {
var addrs []string
// Add addresses from static flag
addrs = append(addrs, queryAddrs...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Within queryFn do we want to remove duplicates if they exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

May even want to do this in #547 as we could supply a value in the file that its picked up by gossip as well if both systems are running.

Copy link
Author

Choose a reason for hiding this comment

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

done in #547

Copy link
Contributor

@domgreen domgreen left a comment

Choose a reason for hiding this comment

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

LGTM ... can we make sure these changes are reflected in the CHANGELOG?

…ns (#556)

* Added tests for rule filesd and static flags
@ivan-valkov ivan-valkov merged commit 1aae977 into file-sd-rule Oct 16, 2018
@ivan-valkov ivan-valkov deleted the query-flag-rule branch October 17, 2018 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants