omer727
omer727

Reputation: 7701

Can't send alerts\reports on Apache Superset using Kubernetes

I want to monitor my database and trigger alert when a specific sql is executing and returns a result. In order to do so, I've successfully deploy Apache Superset on gcluod GKE. I've add a superset application to my org slack workspace. But when I'm trying to define an alert\report that being sent using slack nothing happens and there is no execution log. I'm attaching the values.yaml contents (without the slack API secret).

Anything I've missed?

ingress:
   default:
      enabled: "true"
      type: "internallb"

extraSecretEnv:
   SUPERSET_SECRET_KEY: os.getenv("SUPERSET_SECRET_KEY")
   SLACK_API_TOKEN: "xoxb-..."

supersetCeleryBeat:
   enabled: true


supersetWorker:
  command:
    - /bin/sh
    - -c
    - |
      # Install chrome webdriver
      # See https://github.com/apache/superset/blob/4fa3b6c7185629b87c27fc2c0e5435d458f7b73d/docs/src/pages/docs/installation/email_reports.mdx
      apt-get update
      apt-get install -y wget
      wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
      apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb
      wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip
      apt-get install -y zip
      unzip chromedriver_linux64.zip
      chmod +x chromedriver
      mv chromedriver /usr/bin
      apt-get autoremove -yqq --purge
      apt-get clean
      rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip

      # Run
      . {{ .Values.configMountPath }}/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker
 
postgresql:
   image:
      repository: "bitnami/postgresql" 
      tag: "14.10.0-debian-11-r14"

# Feature flags for production
configOverrides:
   feature_flags: |
      import ast
      FEATURE_FLAGS = {
          'ALERT_REPORTS': True,
          'DYNAMIC_PLUGINS': True,
          'DASHBOARD_NATIVE_FILTERS': True,
          'VERSIONED_EXPORT': True,
          'ENABLE_TEMPLATE_PROCESSING': True,
      }
      SLACK_API_TOKEN = "xoxb-..."

   general_overides: |
      WTF_CSRF_SSL_STRICT = False
   

service:
   type: NodePort
   port: 8088
   nodePort: 
      http: 30000

bootstrapScript: |
   #!/bin/bash
   pip install -v verbose packaging==21.3 psycopg2-binary==2.9.6 \
     sqlalchemy-bigquery==1.6.1 \
     snowflake-sqlalchemy>=1.2.4 \
     authlib \
     pymssql>=2.2.8 \
     redis>=4.6.0 \
     pandas-gbq>=0.19.1 \
     sqlalchemy-bigquery>=1.6.1 \
     google-cloud-bigquery>=3.10.0 \
     elasticsearch-dbapi>=0.2.9 \
     pillow  &&\
   if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi

Upvotes: -3

Views: 32

Answers (0)

Related Questions