Skip to main content
Skip table of contents

Superset - Alerts & Reports Feature Enablement

Prerequisites

  • Access to the customer’s Kubernetes cluster.

  • Helm access to the existing Superset release.

  • Update superset-custom-values.yaml file.

  • Account credentials for SMTP setup (provided by the customer).

Feature Enablement Steps

  • Download and replace the below file with the existing superset-custom-values.yaml.

superset-custom-values.yaml

  • Edit superset-custom-values.yaml and replace the hosts in the ingress section as shown below.

CODE
ingress:
  enabled: false
  # ingressClassName: nginx
  annotations:
    nginx.ingress.kubernetes.io/client-body-buffer-size: 10M
    nginx.ingress.kubernetes.io/proxy-body-size: 10M
    nginx.ingress.kubernetes.io/proxy-buffering: "on"
    nginx.ingress.kubernetes.io/proxy-buffer-size: "10M"
    nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "3000"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
    nginx.ingress.kubernetes.io/configuration-snippet: |
     more_set_headers "X-Forwarded-Proto: https";
  path: /
  pathType: ImplementationSpecific
  hosts:
    - devops.ef.com
  tls:
    - secretName: ef-ingress-tls-secret
      hosts:
        - devops.ef.com
  • Update the SMTP_HOST, SMTP_USER, SMTP_PASSWORD, SMTP_MAIL_FROM in the same file and keep rest of the configurations as-is as shown below.

CODE
extraEnv:
  ENABLE_TEMPLATE_PROCESSING: "True"
  ENABLE_ALERTS_REPORTS: "True"
  ALERT_REPORTS: "True"
  SMTP_HOST: ""                                  # Replace with actual SMTP host 
  SMTP_STARTTLS: "True"
  SMTP_SSL: "False"
  SMTP_USER: ""                                  # Replace with actual email user
  SMTP_PASSWORD: ""                              # Replace with actual email password
  SMTP_MAIL_FROM: ""                             # Replace with actual from email address
  • Update the SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORDin the same file and keep rest of the configuration as-is as shown below.

CODE
configOverrides:
  superset_config.py: |
    from celery.schedules import crontab
    # Enable Alerts and Reports
    FEATURE_FLAGS = {
        "ALERT_REPORTS": True,
    }
    # Configure Celery
    class CeleryConfig:
        broker_url = "redis://{{ .Release.Name }}-redis-master:6379/0"
        result_backend = "redis://{{ .Release.Name }}-redis-master:6379/0"
        imports = ("superset.tasks",)
        worker_prefetch_multiplier = 1
        task_acks_late = True
        beat_schedule = {
            "reports.scheduler": {
                "task": "reports.scheduler",
                "schedule": crontab(minute="*", hour="*"),
            },
            "reports.prune_log": {
                "task": "reports.prune_log",
                "schedule": crontab(minute=10, hour=0),
            },
        }
    CELERY_CONFIG = CeleryConfig
    # Webdriver configuration for reports
    WEBDRIVER_BASEURL = "http://superset.ef-bi.svc.cluster.local:8088/"
    WEBDRIVER_TYPE = "firefox"
    # Optional: Configure email settings for reports
    SMTP_HOST = ""                       # Replace with actual SMTP host
    SMTP_PORT = 587                      # Replace with actual SMTP port
    SMTP_USER = ""                       # Replace with actual email user
    SMTP_PASSWORD = ""                   # Replace with actual email password
    SMTP_STARTTLS = True
    SMTP_SSL = False
    EMAIL_NOTIFICATIONS = True
  • Save the superset-custom-values.yaml file.

Upgrade Superset

  • Run the following command in the Kubernetes Directory to update values.

helm upgrade --install --namespace ef-bi --create-namespace --values=helm-values/superset-custom-values.yaml superset expertflow/superset

Verify Alerts and Reports

  • Once the upgrade is complete, open superset in your browser to verify the Alerts and reports option in superset settings.

Screenshot 2025-05-08 152538-20250508-102652.png


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.