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

feat: Prometheus metrics export and import #1335

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

AncientPatata
Copy link
Contributor

Motivation

Prometheus metrics are usually lost after ArmoniK infra gets destroyed. This PR includes scripts to save this data so it can be looked at and analyzed later on.

Description

This PR introduces a script that can be ran to export the data from Prometheus into an S3 bucket (at the end of github workflows for example). Along with a minimal monitoring deployment that current just includes Grafana and Prometheus, with a script that can be used to quickly import back previous Prometheus data into this deployment so it can be studied/analyzed.

Testing

Scripts were tested on both local and AWS deployments.

Impact

Not relevant.

Additional Information

Check README.md for additional information.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have thoroughly tested my modifications and added tests when necessary.
  • Tests pass locally and in the CI.
  • I have assessed the performance impact of my modifications.

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2024

CLA assistant check
All committers have signed the CLA.

@AncientPatata AncientPatata force-pushed the ad/metrics-export-import branch from 14112fa to c73a5c6 Compare November 26, 2024 10:56

# Function to display usage
usage() {
echo "Usage: $0 [-a AWS_ACCESS_KEY_ID] [-s AWS_SECRET_ACCESS_KEY] [-t AWS_SESSION_TOKEN] -f FILENAME -b BUCKET_NAME -n KUBERNETES_NAMESPACE [--local]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have to be modified if default values are there for every option.

echo "Error: Failed to copy file from pod.";
exit 1;
}
echo "File copied from pod successfully."
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it a whole directory that is actually copied ?

@AncientPatata AncientPatata force-pushed the ad/metrics-export-import branch from c73a5c6 to 650eee6 Compare December 5, 2024 11:48
Copy link

sonarqubecloud bot commented Dec 5, 2024

@ngruelaneo ngruelaneo merged commit cf89358 into main Jan 8, 2025
13 checks passed
@ngruelaneo ngruelaneo deleted the ad/metrics-export-import branch January 8, 2025 07:57
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.

4 participants