superset icon indicating copy to clipboard operation
superset copied to clipboard

Superset ALERT & REPORTS not working

Open mujohiddin opened this issue 1 year ago • 11 comments

photo_2024-05-08_11-48-01 photo_2024-05-08_11-47-36

How to reproduce the bug

a

Screenshots/recordings

hi

Superset version

master / latest-dev

Python version

3.9

Node version

16

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

mujohiddin avatar May 08 '24 06:05 mujohiddin

Hey there @mujohiddin, long time no see! 😄 Your issue feels like a bit of deja vu, but in the best way possible. I'm diving into your alert and reports conundrum as we speak and will have some insights for you shortly. Hang tight!

dosubot[bot] avatar May 08 '24 06:05 dosubot[bot]

Hi I have ALERT manager not working superset 6 months old version installed, is there any way to fix this? need to add more parameters? @mistercrunch,@villebro,@michael-s-molina,@betodealmeida,@john-bodley @rusackas

mujohiddin avatar May 08 '24 06:05 mujohiddin

@mujohiddin we use english as a common language on this repo, please add a detailed description for your issue and add server logs showing the alert and reports error(s)

dpgaspar avatar May 08 '24 07:05 dpgaspar

@dpgaspar Hi I have ALERT manager not working superset 6 months old version installed, is there any way to fix this? need to add more parameters? but it works in the new version @mistercrunch,@villebro,@michael-s-molina,@betodealmeida,@john-bodley @rusackas

mujohiddin avatar May 08 '24 08:05 mujohiddin

photo_2024-05-08_11-48-01

mujohiddin avatar May 08 '24 08:05 mujohiddin

To address the issue with the ALERT manager not working in your 6-month-old Superset installation, here are some targeted steps to help resolve the problem:

  1. Check the "ALERT_REPORTS" Feature Flag: Make sure it's enabled in your superset_config.py. This is essential for alert and report functionality.

    FEATURE_FLAGS = {
        "ALERT_REPORTS": True
    }
    
  2. Update Celery Beat Schedule: Ensure you have a schedule for reports.scheduler in your Celery configuration to enable alert and report scheduling.

    beat_schedule = {
        "reports.scheduler": {
            "task": "reports.scheduler",
            "schedule": crontab(minute="*", hour="*"),
        },
        "reports.prune_log": {
            "task": "reports.prune_log",
            "schedule": crontab(minute=0, hour=0),
        },
    }
    
  3. Ensure Browser Installation for Screenshots: If not using a dev docker image, confirm a headless browser is installed for screenshot functionality. For Firefox, install firefox-esr and geckodriver; for Chrome, google-chrome-stable and chromedriver.

  4. SMTP or Slack Configuration: For notifications, ensure your SMTP settings or SLACK_API_TOKEN are correctly configured.

    • Slack:

      SLACK_API_TOKEN = "xoxb-your-slack-token"
      
    • Email:

      SMTP_HOST = "smtp.sendgrid.net"
      SMTP_PORT = 2525
      SMTP_USER = "your_user"
      SMTP_PASSWORD = "your_password"
      SMTP_MAIL_FROM = "[email protected]"
      
  5. Review Celery Worker and Beat Logs: For further troubleshooting, examining the logs of your Celery worker and beat can provide additional insights into any errors or issues.

Ensure all configurations, especially those related to Celery, the headless browser, and notification settings, are correct. For more detailed guidance, refer to the Superset documentation.

If after following these steps you're still facing issues, providing more specific details about the errors or problems you're encountering, including any error messages, would be helpful for further diagnosis.

Details

Sources


About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

dosubot[bot] avatar May 08 '24 08:05 dosubot[bot]

2. reports.scheduler

where is<< reports.scheduler file

mujohiddin avatar May 08 '24 09:05 mujohiddin

@dpgaspar photo_2024-05-08_14-40-14

mujohiddin avatar May 08 '24 09:05 mujohiddin

@dpgaspar Uploading photo_2024-05-08_14-41-01.jpg


mujohiddin avatar May 08 '24 09:05 mujohiddin

Hello sir, can you help me? @mistercrunch,@villebro,@michael-s-molina,@betodealmeida,@john-bodley @rusackas

mujohiddin avatar May 08 '24 09:05 mujohiddin

seems like it's a geckodriver installation issue, take a look at: https://superset.apache.org/docs/configuration/alerts-reports#using-firefox

dpgaspar avatar May 08 '24 13:05 dpgaspar