The consensus-health checker is part of metrics-web and checks whether enough directory authorities voted, whether their signing keys are going to expire soon, etc. See the consensus-health page. Basically, whenever there's something written in red on that page (except from the relay flags table at the bottom), metrics-web would send an email to the new mailing list.
The list is there, but yatei's cron cannot post to it. Can you enable root AT yatei.torproject.org to post to the list? Also please disable posting to the list by anyone else, including subscribed members.
Trac: Resolution: implemented toN/A Status: closed to reopened
The list is there, but yatei's cron cannot post to it. Can you enable root AT yatei.torproject.org to post to the list? Also please disable posting to the list by anyone else, including subscribed members.
I don't like having root@ anything post to a public mailing list. Does it need to be a root cronjob doing the reporting?
I don't like having root@ anything post to a public mailing list. Does it need to be a root cronjob doing the reporting?
I don't know. Here's what I added to the end of the crontab for the metrics user:
MAILTO=tor-consensus-health@lists.torproject.org2 * * * * cd /srv/metrics.torproject.org/web/; ./run-chc.sh
How would I change this, e.g., to have the metrics user send the output to the mailing list? I'd rather not want to teach Java how to send emails, if possible.
How would I change this, e.g., to have the metrics user send the output to the mailing list? I'd rather not want to teach Java how to send emails, if possible.
Everyone is moderated on the list.
OK.
The first question is does root have to run the script?
The first question is does root have to run the script?
I don't think the script is running as root. This is the crontab of the metrics user, but root is running cron and apparently puts itself in the From: line.
Adding weasel to the Cc. Maybe he has an idea? He always has.
[nitpick. use && to chain commands, not ;. You want the entire thing to fail if cd fails, not having it try ./run-chc and probably failing or running a different version of it.]
The first question is does root have to run the script?
Adding weasel to the Cc. Maybe he has an idea? He always has.
You could pipe run-chc's output to mail(1): That has the added benefit that errors (stderr) in the command go to the thing in MAILTO (which can still be you) and script output goes to whatever you say in mail's command line. Of course if you prefer you can also pipe the scripts stderr to mail(1).
So, maybe change your crontab line to:
| 2 * * * * cd /srv/metrics.torproject.org/web/ && ./run-chc.sh | mail -E -s 'Consensus issues' tor-consensus-health@lists.torproject.org
If we need more logic than a simple pipe we might want to outsource it into a script, but I don't think we're there yet.