Skip to content

Commit

Permalink
Merge pull request #60 from loft-sh/improvements
Browse files Browse the repository at this point in the history
docs: add monitoring page
  • Loading branch information
FabianKramm authored Oct 13, 2020
2 parents 3332f44 + dfb6eae commit 5525920
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
80 changes: 80 additions & 0 deletions docs/pages/guides/monitoring.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Monitoring
sidebar_label: Monitoring
---

loft offers direct integration with [Grafana](https://grafana.com/) and you can view any Grafana dashboard directly in loft. With the recommended app kube-prometheus-stack, a complete monitoring setup can be enabled in your cluster with a single click.
Grafana itself is the most popular technology used to compose observability dashboards with everything from Prometheus & Graphite metrics, to logs and application data to power plants and beehives.

loft provides additional custom Grafana dashboards for easier cost, account and resource tracking.

<figure class="frame">
<img src="/docs/media/ui/clusters/monitoring-loft-dashboards-view.png" alt="dashboards" />
<figcaption>loft Grafana dashboard</figcaption>
</figure>

## Install kube-prometheus-stack

Navigate to `Clusters -> CLUSTER -> Overview` and click on the recommended app `kube-prometheus-stack`.

<figure class="frame">
<img src="/docs/media/ui/clusters/monitoring-kube-prometheus-stack.png" alt="Kube prometheus stack" />
<figcaption>kube prometheus stack</figcaption>
</figure>

In the app values, make sure the values for `grafana.grafana.ini.server.root_url` and `grafana.grafana.ini.server.domain` are correct. You can also add any values the chart [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) supports:

```yaml
# Required values by loft
grafana:
grafana.ini:
users:
allow_sign_up: false
auto_assign_org: true
auto_assign_org_role: Admin
auth.proxy:
enabled: true
header_name: X-WEBAUTH-USER
header_property: username
auto_sign_up: true
server:
# CHANGE THIS
root_url: https://${DOMAIN_WHERE_LOFT_IS_REACHABLE}/grafana/${LOFT_CLUSTER_NAME}/
# CHANGE THIS
domain: ${DOMAIN_WHERE_LOFT_IS_REACHABLE}
serve_from_sub_path: true
security:
allow_embedding: true
```
If you already have a prometheus installation, you can also just install the [Grafana chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana), with the above values without the initial grafana prefix.
After pressing install, please be patient until the kube-prometheus-stack is installed.
## Install loft Grafana dashboards (optional)
To install the additional loft Grafana dashboards navigate to `Clusters -> CLUSTER -> Overview` and click on the recommended app `loft-grafana-dashboards`.

<figure class="frame">
<img src="/docs/media/ui/clusters/monitoring-loft-dashboards.png" alt="loft dashboards" />
<figcaption>loft Grafana dashboards</figcaption>
</figure>

:::warning Same Namespace
The loft dashboards can only be discovered by Grafana if you install them into the same namespace as you installed the `kube-prometheus-stack`
:::

## Viewing Grafana dashboards in loft

After installing the kube-prometheus-stack with Grafana, you can select the discovered Grafana dashboards in the view `Clusters -> CLUSTER -> Monitoring`. There should be several dashboards you can select from. After selecting a dashboard, the dashboard is shown below:

<figure class="frame">
<img src="/docs/media/ui/clusters/monitoring-dashboards.png" alt="dashboards" />
<figcaption>Selecting a Grafana dashboard</figcaption>
</figure>

:::info Empty Panels
It may be possible sometimes that a panel appears to be empty. This can happen if Grafana does not recognize the iframe height change fast enough. The panel and all other empty panels should be shown after collapsing and expanding the empty panel.
:::

Congratulations, you now have a fully fledged monitoring setup with loft, prometheus and Grafana!
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ module.exports = {
collapsed: false,
items: [
'guides/onboarding',
'guides/monitoring',
'guides/ci-cd-pipelines',
'guides/oidc',
'guides/administration/upgrade',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5525920

Please sign in to comment.