Skip to content

MonitoringπŸ“œ

This repository builds on the following upstream chart kube-prometheus-stack

Pre-requisitesπŸ“œ

  • Kubernetes cluster deployed
  • kubectl configuration installed
  • fluxv2 resources and controllers installed

Install kubectl

brew install kubectl

Install flux binary from https://github.com/fluxcd/flux2/releases

ConfigurationπŸ“œ

Configuration can be done via editing and supplementing the values for the chart which follows the upstream values for kube-prometheus-stack

You can find the API Spec for the Prometheus Operator here

GrafanaπŸ“œ

To set the admin/password of Grafana, set the adminUser adminPassword values at Big Bang Grafana chart/values.yaml. By default an admin user with username β€œadmin” and the configured password in the Grafana chart at β€œadminPassword” is created for logging into the Grafana UI.

Adding DashboardsπŸ“œ

To supplement the dashboards already provided by the package you can add more dashboards that are automatically loaded into grafana:

Via Helm ValuesπŸ“œ
  1. Ensure dashboardProviders values are populated (uncommented from package values in this case):
monitoring:
  values:
    grafana:
      dashboardProviders:
        dashboardproviders.yaml:
          apiVersion: 1
          providers:
          - name: 'default'
            orgId: 1
            folder: ''
            type: file
            disableDeletion: false
            editable: true
            options:
              path: /var/lib/grafana/dashboards/default
  1. Populate dashboard JSON you can name in dashboards block like so:
monitoring:
  values:
    grafana:
      dashboards:
        default:
          some-dashboard:
            json: |
              $JSON_DATA$
  • Helm reconciliation will mount the JSON data to the grafana pod and restart, if not delete the grafana pod.
Via ConfigmapπŸ“œ
  1. Download the JSON file for your dashboard, or ensure you have the config in JSON formatting.
  2. Create a secret or configmap like so, where you can include your JSON dashboard configuration inline:
apiVersion: v1
kind: ConfigMap
metadata:
  name: my-custom-dashboard
  namespace: monitoring
  labels:
    grafana_dashboard: "1"
data:
  dashboard-name.json: |
    ...

*Any configmap in the monitoring namespace with the β€œgrafana_dashboard” : β€œ#” label will be scanned and imported into grafana automatically. This label can be updated in the helm values: grafana.sidecar.dashboards.label: …