Skip to content

Conversation

AminR443
Copy link
Contributor

This PR modifies the Grafana installation script to automatically provision the datasource and a dashboard directory. It also modifies the dashboard file with a configurable datasource so it automatically picks up the available prometheus one.

"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
Copy link
Member

Choose a reason for hiding this comment

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

This diff is a little weird. I'm not sure if this happened because you missed a checkbox when you exported it or not.

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

make sure this was checked when exporting!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, this is intentional. I configured a datasource template that lets you choose the datasource, and also automatically selects the available prometheus one. If I didn't do that it didn't capture the datasource automatically.

image

Copy link
Member

Choose a reason for hiding this comment

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

I'm worried a bit about how people will export updates to the dashboard. Can you add something to the readme that explains how that needs to happen now?

@AminR443 AminR443 requested a review from rkuris September 25, 2025 21:32
Copy link
Member

@rkuris rkuris left a comment

Choose a reason for hiding this comment

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

Approved, but please make the requested changes before merging.

# TODO(amin): another possible option here is enabling google oauth, and this could give access
# to anyone within our org emails
sed -i -E "s|^;?\s*admin_user\s*=.*|admin_user = admin|" /etc/grafana/grafana.ini
sed -i -E "s|^;?\s*admin_password\s*=.*|admin_password = firewoodisfast|" /etc/grafana/grafana.ini
Copy link
Member

Choose a reason for hiding this comment

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

We have wiki pages that say this password is "firewood_is_fast", so either change it here or find the wiki page.

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