Comments (6)
To resolve the issue with setting up alerts and reports in Apache Superset, you need to ensure that the Redis service is properly configured and activated. Based on your provided configuration, it appears that the broker_url
and result_backend
for Celery are not set, which are essential for connecting to the Redis service.
Here is the updated configuration with the necessary Redis settings:
FEATURE_FLAGS = {
'ALERT_REPORTS' : True,
'DASHBOARD_RBAC': True,
'ENABLE_TEMPLATE_PROCESSING': True,
}
from celery.schedules import crontab
REDIS_HOST = "localhost" # Change this to your Redis host
REDIS_PORT = "6379" # Change this to your Redis port if different
REDIS_CELERY_DB = "0"
REDIS_RESULTS_DB = "1"
class CeleryConfig:
broker_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}"
result_backend = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}"
beat_schedule = {
"reports.scheduler": {
"task": "reports.scheduler",
"schedule": crontab(minute="*", hour="*"),
},
"reports.prune_log": {
"task": "reports.prune_log",
"schedule": crontab(minute=0, hour=0),
},
}
CELERY_CONFIG = CeleryConfig
SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 600
ALERT_REPORTS = True
EMAIL_NOTIFICATIONS = True
ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
EMAIL_NOTIFICATIONS = False # all the emails are sent using dryrun
SMTP_HOST = "SMTP_HOST"
SMTP_STARTTLS = True
SMTP_SSL = True
SMTP_USER = "SMTP_USER"
SMTP_PORT = 465
SMTP_PASSWORD = "SMTP_PASSWORD"
SMTP_MAIL_FROM = "SMTP_MAIL_FROM"
SMTP_SSL_SERVER_AUTH = False
WEBDRIVER_TYPE = "chrome"
WEBDRIVER_OPTION_ARGS = [
"--force-device-scale-factor=2.0",
"--high-dpi-support=2.0",
"--headless",
"--disable-gpu",
"--disable-dev-shm-usage",
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-extensions",
]
WEBDRIVER_BASEURL = "http://localhost:8088"
WEBDRIVER_BASEURL_USER_FRIENDLY = "http://IP:8088"
from superset.tasks.types import ExecutorType
THUMBNAIL_SELENIUM_USER = 'admin'
ALERT_REPORTS_EXECUTE_AS = [ExecutorType.SELENIUM]
Make sure that the Redis service is running and accessible at the specified REDIS_HOST
and REDIS_PORT
. This should enable the Celery workers to connect to Redis and process the tasks for alerts and reports. Additionally, ensure that the REDIS_CELERY_DB
and REDIS_RESULTS_DB
are correctly set to match your Redis configuration [1][2].
To continue talking to Dosu, mention @dosu.
from superset.
It looks like you have correctly configured the Redis settings for Celery. However, there are a few additional configurations and checks you should ensure are in place:
-
Enable the
ALERT_REPORTS
Feature Flag:
Ensure that theALERT_REPORTS
feature flag is enabled in your configuration:FEATURE_FLAGS = { 'ALERT_REPORTS': True, 'DASHBOARD_RBAC': True, 'ENABLE_TEMPLATE_PROCESSING': True, }
-
Set
ALERT_REPORTS_NOTIFICATION_DRY_RUN
toFalse
:
Make sure this setting is correctly set toFalse
to enable actual notifications:ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
-
Configure the WebDriver:
Ensure that the WebDriver is correctly configured for taking screenshots:WEBDRIVER_TYPE = "chrome" WEBDRIVER_OPTION_ARGS = [ "--force-device-scale-factor=2.0", "--high-dpi-support=2.0", "--headless", "--disable-gpu", "--disable-dev-shm-usage", "--no-sandbox", "--disable-setuid-sandbox", "--disable-extensions", ] WEBDRIVER_BASEURL = "http://localhost:8088" WEBDRIVER_BASEURL_USER_FRIENDLY = "http://IP:8088"
-
Set the User for Rendering Dashboards:
Ensure that the user for rendering dashboards is set:from superset.tasks.types import ExecutorType THUMBNAIL_SELENIUM_USER = 'admin' ALERT_REPORTS_EXECUTE_AS = [ExecutorType.SELENIUM]
-
Check Celery Workers:
Ensure that Celery workers are running and can connect to Redis. You can start the Celery worker with:celery -A superset.tasks.celery_app:app worker --loglevel=info
-
Check Celery Beat:
Ensure that Celery beat is running to schedule tasks:celery -A superset.tasks.celery_app:app beat --loglevel=info
-
Verify Redis Connection:
Ensure that Redis is running and accessible. You can test the connection using a Redis client:redis-cli -h localhost -p 6379 ping
-
SMTP Configuration:
Ensure that your SMTP settings are correctly configured for email notifications:SMTP_HOST = "SMTP_HOST" SMTP_STARTTLS = True SMTP_SSL = True SMTP_USER = "SMTP_USER" SMTP_PORT = 465 SMTP_PASSWORD = "SMTP_PASSWORD" SMTP_MAIL_FROM = "SMTP_MAIL_FROM" SMTP_SSL_SERVER_AUTH = False
By ensuring these configurations and checks are in place, you should be able to set up alerts and reports in Apache Superset 4.0.1. If the issue persists, check the Superset logs for any errors or warnings that might provide more insights [1][2].
To continue talking to Dosu, mention @dosu.
from superset.
I installed the redis manually, and update the config as following, but NO LUCK
from celery.schedules import crontab
REDIS_HOST = "localhost" # Change this to your Redis host
REDIS_PORT = "6379" # Change this to your Redis port if different
REDIS_CELERY_DB = "0"
REDIS_RESULTS_DB = "1"
class CeleryConfig:
broker_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
imports = (
"superset.sql_lab",
"superset.tasks.scheduler",
)
result_backend = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
worker_prefetch_multiplier = 10
task_acks_late = True
task_annotations = {
"sql_lab.get_sql_results": {
"rate_limit": "100/s",
},
}
beat_schedule = {
"reports.scheduler": {
"task": "reports.scheduler",
"schedule": crontab(minute="*", hour="*"),
},
"reports.prune_log": {
"task": "reports.prune_log",
"schedule": crontab(minute=0, hour=0),
},
}
In report log, seems no error message, but no email was sent or received.
from superset.
after config as above, the log report STARTTLS extension not supported by server.
from superset.
Related Issues (20)
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- Default native filters values don't set correctly HOT 1
- Superset 4.0.1 - Exported CSV Contains Garbled Chinese Characters and Numbers HOT 4
- Metric datatype incorrect when swap dataset HOT 1
- It is proposed to add the feature of grouping like folders HOT 3
- TimeSeries Chart is showing Year for the January month HOT 5
- Storybook controls are out of date HOT 1
- D3_FORMATS PROBLEM HOT 5
- Request execution time jumps HOT 1
- Unexpected error HOT 2
- 4.0.1: Alerting and reports does not take EMAIL RECIPIENTS* HOT 4
- Filter does not follow label HOT 1
- [SIP-138] Proposal for Slack file upload V2 integration for Alerts and Reports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.