Skip to content

Support defining Cortex Rules in Agent config #523

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

Closed
rfratto opened this issue Apr 8, 2021 · 7 comments
Closed

Support defining Cortex Rules in Agent config #523

rfratto opened this issue Apr 8, 2021 · 7 comments
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. keepalive Never close from staleness

Comments

@rfratto
Copy link
Member

rfratto commented Apr 8, 2021

Based on this discussion, I'd like it if the Agent could support recording and alerting rule definitions that are synced against the Cortex Ruler API.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue/PR mark as stale due lack of activity label Jun 2, 2021
@rfratto rfratto added the keepalive Never close from staleness label Jun 2, 2021
@stale stale bot removed the stale Issue/PR mark as stale due lack of activity label Jun 2, 2021
@jpkrohling jpkrohling self-assigned this Oct 5, 2021
@jpkrohling
Copy link
Contributor

jpkrohling commented Oct 25, 2021

Here's a recap of what we discussed today regarding this task:

  • A new config section is to be added, mimicking the option rule_files from the Prometheus configuration
  • Upon bootstrap, the agent will read all the files and potentially parse them
  • It will then compare with the list of rules from the remote Cortex server and synchronize it when needed
  • When the reload operation is performed, we'll re-read the files and synchronize again with the remote Cortex server

Given what we discussed, I assume we don't have to care that much about files from Cortex that aren't in the local file system, only about local files that aren't on the remote server.

The cortextool can be used as a reference, especially the rules load command: https://github.com/grafana/cortex-tools#rules-loada

@jpkrohling
Copy link
Contributor

I'm removing myself from this task, as it's been for a while in my queue and I can't seem to even get started with it. I'll try to get a smaller issue first to get myself more comfortable with this codebase and might work on this again in the future. Sorry about that :-/

@sambacha
Copy link

sambacha commented Aug 4, 2022

Any update on this issue? This is a blocker to adopting grafana

@rfratto
Copy link
Member Author

rfratto commented Aug 9, 2022

No updates for now, this isn't being actively worked on at the moment.

@rfratto
Copy link
Member Author

rfratto commented Jan 19, 2023

This was implemented as a Grafana Agent Flow component in #2604. I'm going to close this as completed.

At this time, there's no plan to backport this functionality into the static mode (i.e., the default mode the agent runs in).

@sambacha
Copy link

This was implemented as a Grafana Agent Flow component in #2604. I'm going to close this as completed.

At this time, there's no plan to backport this functionality into the static mode (i.e., the default mode the agent runs in).

Thank you!

@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. keepalive Never close from staleness
Projects
No open projects
Development

No branches or pull requests

3 participants