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

Add links to grafana from instance detail pages, add grafana provision script #943

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

edlerd
Copy link
Collaborator

@edlerd edlerd commented Oct 8, 2024

Done

  • add grafana base url to the settings
  • add links to grafana from instance detail page if its base url is configured
  • add script to setup grafana

QA

  1. Run the LXD-UI:
  2. Perform the following QA steps:
    • setup o11y stack for lxd:
lxc launch ubuntu:24.04 grafana
curl https://localhost:8407/ui/assets/scripts/setup-grafana.sh --insecure > /tmp/setup-grafana.sh
bash /tmp/setup-grafana.sh grafana default
rm /tmp/setup-grafana.sh
- create the dashboard:
  - open grafana with the link from the script above, then
  - login with admin/admin and chose a new password
  - after login, go to dashboards > new > import
  - enter 19131 and click load
  - confirm the options for prometheus and loki, the click import
- go back to the lxd-ui and ensure the links from instance detail page to "metrics" work fine.

@webteam-app
Copy link

@edlerd edlerd marked this pull request as draft October 8, 2024 15:10
@edlerd edlerd force-pushed the grafana-links branch 5 times, most recently from 0173ac8 to 943bb78 Compare January 21, 2025 11:22
@edlerd edlerd marked this pull request as ready for review January 21, 2025 13:33
@edlerd edlerd changed the title feat(metrics) add links to grafana from instance detail page Add links to grafana from instance detail page Jan 21, 2025
@edlerd edlerd changed the title Add links to grafana from instance detail page Add links to grafana from instance detail pages, add grafana provision script Jan 21, 2025
@edlerd edlerd force-pushed the grafana-links branch 3 times, most recently from c6580dd to ea26e7f Compare January 21, 2025 14:23
@edlerd edlerd force-pushed the grafana-links branch 3 times, most recently from 4a6143d to 59cb7b8 Compare January 21, 2025 15:38
Copy link
Collaborator

@mas-who mas-who left a comment

Choose a reason for hiding this comment

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

QA looks good 👍 just got a few comments regarding the script

public/assets/scripts/setup-grafana.sh Outdated Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Outdated Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Outdated Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Outdated Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Show resolved Hide resolved
public/assets/scripts/setup-grafana.sh Outdated Show resolved Hide resolved
…ase url is configured, add the base url to the settings

Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Copy link
Collaborator

@mas-who mas-who left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, just one question about dep version

public/assets/scripts/setup-grafana.sh Show resolved Hide resolved
@edlerd edlerd requested a review from mas-who January 22, 2025 14:33
Copy link
Collaborator

@mas-who mas-who left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@edlerd edlerd merged commit d7f64f8 into canonical:main Jan 22, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants