Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to receive an email when an error happens during cron archiving (cron:archive command) #17210

Open
bbodenmiller opened this issue Feb 11, 2021 · 3 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@bbodenmiller
Copy link

bbodenmiller commented Feb 11, 2021

Expected Behavior

Per https://matomo.org/docs/setup-auto-archiving/#linux-unix-how-to-set-up-a-crontab-to-automatically-archive-the-reports when MAILTO environment variable is set before running core:archive it is supposed to send an email if archive fails. Have verified mail settings are set correctly as other emails from Matomo are working.

Current Behavior

core:archive is failing and the emails are not being sent.

Possible Solution

Steps to Reproduce (for Bugs)

  1. Setup cron job to run export MAILTO='me@domain.com' && console core:archive --url=https://matomo.domain.com
  2. Do something to make job fail
  3. Verify job ran and failed
  4. See that email is never received

Context

Your Environment

@bbodenmiller bbodenmiller added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Feb 11, 2021
@tsteur
Copy link
Member

tsteur commented Feb 11, 2021

Hi @bbodenmiller

Just to verify: does your crontab look like there and mailto is on its own line?

image

MAILTO is a crontab feature, not a Matomo feature so I don't think using export and running it on command line like above would work unfortunately.

@bbodenmiller
Copy link
Author

Interesting. I thought it was Matomo feature. I'm using https://docs.pivotal.io/scheduler/1-2/index.html for scheduling which must not support this feature. Looks like it wouldn't work for windows either.

@tsteur
Copy link
Member

tsteur commented Feb 14, 2021

@bbodenmiller is there maybe a way to use regular crontab or so? I'll meanwhile rename this issue to describe it as a new enhancement (as it's not a bug)

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Feb 14, 2021
@tsteur tsteur changed the title Error emails not sent when core:archive fails Add feature to receive an email when an error happens during cron archiving (cron:archive command) Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants