-
Notifications
You must be signed in to change notification settings - Fork 43
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
[MM-61912] Download and install latest Dashboard v2 automatically #872
base: master
Are you sure you want to change the base?
Conversation
metrics: install dashboard v2 (fix var)
|
||
// Removes the DS_PROMETHEUS variable requirement to allow grafana to use the only prometheus | ||
// datasource available in the load-test envionment. | ||
re := regexp.MustCompile(`,\r?\n\s+\"uid\":\s?\"\$\{DS_PROMETHEUS\}\"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm .. I am not a big fan of this. Can we not use the t.UploadDashboard
method to upload the dashboard, instead of manually copying over the json file to a folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, I recall thinking about checking that method when I moved this upstream but I forget, sorry, let me make the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
deployment/terraform/metrics.go
Outdated
@@ -352,6 +353,29 @@ func (t *Terraform) setupMetrics(extAgent *ssh.ExtAgent) error { | |||
return fmt.Errorf("error while uploading dashboard_json: output: %s, error: %w", out, err) | |||
} | |||
|
|||
// Download dashboard v2 from and upload it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something missing here. From grafana.com, you meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦅 👁️ 👍
Summary
Downloads the latest Dashboard v2 revision from the Grafana gallery and installs it into the environment automatically. It naively removes the DS_PROMETHEUS variable from the JSON dashboard code so it automatically uses the primary prometheus source present in the deployment.
Ticket Link
https://mattermost.atlassian.net/browse/MM-61912