You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/16 09:09:30 UTC

[GitHub] [superset] Yann-OAF commented on a change in pull request #13104: chore: update docs for new alerts and reporting feature

Yann-OAF commented on a change in pull request #13104:
URL: https://github.com/apache/superset/pull/13104#discussion_r575839561



##########
File path: docs/src/pages/docs/installation/email_reports.mdx
##########
@@ -6,8 +6,305 @@ index: 10
 version: 1
 ---
 
-## Scheduling and Emailing Reports
+## Alerts and Reports
+(version 1.0.1 and above)
+
+Users can configure automated alerts and reports to send charts and dashboards to an email recipient or Slack channel.
+
+- Alerts are sent when a specified condition is passed
+- Reports are sent on a specified schedule 
+
+### Turning on Alerts and reports
+Alerts and reports are not turned on by default. They are currently behind a feature flag, and require some additional services and configurations.
+
+#### Requirements:
+
+- `Dockerfile`
+	- webdriver to run a headless browser (for taking screenshots of the charts and dahboards)
+- `docker-compose.yaml`
+	- redis message broker
+	- replacing SQLlite DB with Postgres DB
+	- celery worker
+	- celery beat
+- `superset_config.py`
+	- feature flag turned to True
+	- all configs as outlined in the template below
+- At least one of these is needed to send alerts and reports:
+	- (optional) SMTP server for sending email
+	- (optional) Slack app integration for sending to Slack channels
+ 
+#### Summary of steps to turn on alerts and reporting:
+
+Using the templates below,
+1. Create a new directory and create the Dockerfile
+2. Build the extended image using the Dockerfile
+3. Create the `docker-compose.yaml` file in the same directory
+4. Create a new sub directory called `config`
+5. Create the `superset_config.py` file in the `config` sub directory
+6. Run the image using `docker-compose up` in the same directory as the `docker-compose.py` file
+ 
+(note: v 1.0.1 is current at time of writing, you can change the version number to the latest version if a newer version is available)
+### Dockerfile
+
+A webdriver (and headless browser) is needed to capture screenshots of the charts and dashboards which are then sent to the recipient. As the base image does not have a webdriver installed by default, we need to extend the base image and install the webdriver (this template uses the Chrome webdriver). We are also adding in connectors for Mysql and Postgres, as well as Redis and Flower (Flower and Mysql are optional depending on your requirements)
+
+You can extend the image by running this Docker build command from the directory that contains the Dockerfile:
+`docker build -t superset-1.0.1-extended -f Dockerfile`
+
+Config for `Dockerfile`:
+```docker
+FROM apache/superset:1.0.1
+USER root
+RUN apt update
+RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
+    apt install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb && \
+    wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip && \
+    unzip chromedriver_linux64.zip && \
+    chmod +x chromedriver && \
+    mv chromedriver /usr/bin && \
+    apt autoremove -yqq --purge && \
+    apt clean && \
+    rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip

Review comment:
       I'm curious, would you have similar working instructions to install `geckodriver`? My attempts have been unsuccessful...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org