1. Configure

Overview

Configure the monitoring stack via Helmfile: Grafana, Loki, Prometheus, and alerting.

Setup Helmfile environment

Define environments, namespace, and environment-specific values files.

File: config-as-code/helm/charts/monitoring/monitoring-helmfile.yaml

environments:
  demo:
    values:
      - namespace: monitoring
      - ../../../environments/egov-demo.yaml
      - ../../../environments/egov-demo-secrets.yaml
circle-info
  • demo is the environment name.

  • monitoring is the namespace.

  • Update file paths when you add environments.

Configure Grafana

  1. Create GitHub OAuth App. Note the Client ID and Client Secret.

    • Homepage URL: https://<your_domain_name>

    • Authorization Callback URL: https://<your_domain_name>/monitoring/login/github

  2. Update Grafana OAuth secrets.

    File: config-as-code/environments/egov-demo-secrets.yaml

  3. Restrict access by GitHub org/team.

    File: config-as-code/environments/egov-demo.yaml

circle-info

Valid roles: None, Viewer, Editor, Admin, GrafanaAdmin. See Grafana GitHub OAuth documentationarrow-up-right for advanced mappings.

Configure Loki (log storage)

Choose one storage option.

Option A: Local filesystem storage

File: config-as-code/environments/egov-demo.yaml

Option B: AWS S3 storage

circle-exclamation
  1. Create an IAM role with S3 access (policy example):

  2. Update Loki config (example for EKS IRSA):

    File: config-as-code/environments/egov-demo.yaml

Option C: Azure Blob storage

File: config-as-code/environments/egov-demo.yaml

circle-info

See the Loki configuration docsarrow-up-right for all supported options.

Configure Prometheus

File: config-as-code/environments/egov-demo.yaml

Additional scrape targets

  • NGINX Ingress

  • Redis exporter

  • Blackbox monitoring (URLs, APIs)

Update targets to match your cluster and namespaces.

Configure alerts

Enable Alertmanager

File: config-as-code/environments/egov-demo.yaml

circle-info

This enables the Alertmanager shipped with the Prometheus Operator stack.

Slack alerts

File: config-as-code/environments/egov-demo-secrets.yaml

Alerts will be sent for warning and critical severities.

Email alerts

File: config-as-code/environments/egov-demo-secrets.yaml

Configure:

  • SMTP server (for example, Gmail)

  • Sender and receiver email IDs

  • SMTP auth token

circle-info

Gmail SMTP setup: follow this guidearrow-up-right.

Last updated

Was this helpful?