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

Perform upsert of alert rules #217

Merged
merged 2 commits into from
May 30, 2023

Conversation

mt3593
Copy link
Contributor

@mt3593 mt3593 commented May 30, 2023

When restoring the alerts, if the alert already exists but is in an older setup you need to do a update to that alert.

from packaging import version


def main(args, settings, file_path):
grafana_url = settings.get('GRAFANA_URL')
http_post_headers = settings.get('HTTP_POST_HEADERS')
http_post_headers['x-disable-provenance']='*'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this to only be set on the create call, the put call fails with this set.

@acjohnson acjohnson merged commit adfd8b8 into ysde:master May 30, 2023
@mt3593
Copy link
Contributor Author

mt3593 commented May 30, 2023

That was quick @acjohnson 👍

@ysde could you do a new release please :)

@ysde
Copy link
Owner

ysde commented May 31, 2023

Done :D

Thanks!

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.

3 participants