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/08 17:46:26 UTC

[GitHub] [superset] taitai42 opened a new issue #13007: superset alerts vs alerts & reports

taitai42 opened a new issue #13007:
URL: https://github.com/apache/superset/issues/13007


   Hello guys,
   
   i'm trying to set a fresh superset instance to send alerts using docker-compose 
   i've added a celery beat and flower instance to my docker compose, 
   i've changed the superset_config to add the following parameters : 
   ```
   ENABLE_SCHEDULED_EMAIL_REPORTS = True
   ALERTS_REPORTS = True
   FEATURE_FLAGS = {
       'ALERTS_REPORTS': True,
       "THUMBNAILS": True
   }
   
   RESULTS_BACKEND = RedisCache(host=REDIS_HOST, port=REDIS_PORT, key_prefix='superset_results')
   
   EMAIL_REPORTS_WEBDRIVER = 'firefox'
   EMAIL_REPORTS_USER = 'Admin'
   WEBDRIVER_BASEURL = "http://0.0.0.0:8088/"
   
   ENABLE_ALERTS = True
   
   THUMBNAIL_SELENIUM_USER = "Admin"
   
   DATA_CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
       'CACHE_REDIS_URL': f'redis://{REDIS_HOST}:{REDIS_PORT}/0',
   }
   
   class CeleryConfig(object):
       BROKER_URL = f'redis://{REDIS_HOST}:{REDIS_PORT}/0'
       CELERY_IMPORTS = (
           'superset.sql_lab',
           'superset.tasks',
       )
       CELERY_RESULT_BACKEND = f'redis://{REDIS_HOST}:{REDIS_PORT}/0'
       CELERYD_LOG_LEVEL = 'DEBUG'
       CELERYD_PREFETCH_MULTIPLIER = 10
       CELERY_ACKS_LATE = True
       CELERY_ANNOTATIONS = {
           'sql_lab.get_sql_results': {
               'rate_limit': '100/s',
           },
           'email_reports.send': {
               'rate_limit': '1/s',
               'time_limit': 120,
               'soft_time_limit': 150,
               'ignore_result': True,
           },
       }
       CELERYBEAT_SCHEDULE = {
           'email_reports.schedule_hourly': {
               'task': 'email_reports.schedule_hourly',
               'schedule': crontab(minute='*', hour='*'),
           },
           'alerts.schedule_check': {
               'task': 'alerts.schedule_check',
               'schedule': crontab(minute='*', hour='*')
           },
       }
   
   CELERY_CONFIG = CeleryConfig
   ```
   
   i end up having the following options in my superset : 
   ![image](https://user-images.githubusercontent.com/1880923/107259718-58af4c80-6a0b-11eb-84b5-5af3f1e6c3a6.png)
   any alerts set into the alerts, or email schedule through dashboard emails are properly sent, 
   
   but the ones set through the alerts & reports menu are not being triggered at all, i don't even see the task sent to celery.
   
   i don't find anything that could help me on the doc, does anyone run into the same issue?
   
   thanks


----------------------------------------------------------------
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


[GitHub] [superset] taitai42 commented on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
taitai42 commented on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-775455560


   found out the celery task name for alerts&reports is `reports.scheduler`
   added the config to celery and now works like a charm.
   thanks
    


----------------------------------------------------------------
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


[GitHub] [superset] nytai commented on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
nytai commented on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-775465505


   @taitai42 nice name :)
   
   Yes, there's some important config missing for the new alerts and reports feature. We're working on patching this gap in config and docs. Here's the PR to fix the issue you just noticed, https://github.com/apache/superset/pull/12999


----------------------------------------------------------------
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


[GitHub] [superset] taitai42 edited a comment on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
taitai42 edited a comment on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-775455560


   found out the celery task name for alerts&reports is `reports.scheduler`
   added the config to celery and now works like a charm.
   
   closing the issue
    


----------------------------------------------------------------
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


[GitHub] [superset] taitai42 commented on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
taitai42 commented on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-779242208


   hey @Asturias-sam 
   `from celery.schedules import crontab`
   


----------------------------------------------------------------
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


[GitHub] [superset] taitai42 closed issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
taitai42 closed issue #13007:
URL: https://github.com/apache/superset/issues/13007


   


----------------------------------------------------------------
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


[GitHub] [superset] Asturias-sam commented on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
Asturias-sam commented on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-779079999


   @taitai42 i am getting this error when using above config 
   `NameError: name 'crontab' is not defined`, how you are importing it ?


----------------------------------------------------------------
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


[GitHub] [superset] Asturias-sam commented on issue #13007: superset alerts vs alerts & reports

Posted by GitBox <gi...@apache.org>.
Asturias-sam commented on issue #13007:
URL: https://github.com/apache/superset/issues/13007#issuecomment-779281928


   @taitai42 ya it's working fine... can you please share your config file... i think i am missing something as alerts are not begin triggered. 


----------------------------------------------------------------
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