Closed giuliomagnifico closed 1 year ago
I’m afraid I have no idea. there was no mention of email being triggered by the grafana API calls made by the reporter.
On 11 Nov 2022, at 09:45, giuliomagnifico @.***> wrote:
Hi and thanks for this, it is very useful, I've also customized it using some other font and dark theme, and other things (screenshot https://user-images.githubusercontent.com/1975176/201290393-00262041-a90a-4f76-b877-31c558e1107f.jpg), but I have one issue that I can't resolve alone:
Everytime cron call the API (or I do it via the Link/URL in the dashboard), for some reasons Grafana try to send an email to @.***, that obviously fails, and Google send me the Delivery Status Notification (Failure) mail every time. I have neve configured the smtp in Grafana.ini, now I also disabled it, but this weird behavior still happens.
This is not triggered by the mail -s command in cron, but is triggered by the API/curl, indeed I'm receving the mail at 00:07 and not 05:07.
Example of my crontab
OpenWrt morning report
00 07 curl -J -L 'http://192.168.1.6:8686/api/v5/report/fLi0yXAWk?apitoken=xxx==&theme=dark&from=now-12h&to=now&var-job=prometheus&var-name=R4S&var-node=192.168.1.2&var-port=9100' --output OpenWRT.pdf 05 07 echo "" | mail -s "Daily OpenWrt stats" @.*** --attach=OpenWRT.pdf https://user-images.githubusercontent.com/1975176/201291194-b57419e4-4936-41ff-b2ce-9a8134aae5ec.png See the time:
https://user-images.githubusercontent.com/1975176/201291208-60d4a431-9ada-493b-9cfa-77b853a3b342.png With this message (the shell output)
[...] From: root @.> X-Google-Original-From: root (Cron Daemon) Received: by Grafana (sSMTP sendmail emulation); Fri, 11 Nov 2022 08:20:28 +0100 Date: Fri, 11 Nov 2022 08:20:28 +0100 To: root Subject: Cron @.> curl -J -L 'http://192.168.1.6:8686/api/v5/report/fLi0yXAWk?apitoken=xxx==&theme=dark&from=now-12h&to=now&var-job=prometheus&var-name=R4S&var-node=192.168.1.2&var-port=9100' --output OpenWRT.pdf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Cron-Env:
X-Cron-Env: X-Cron-Env: X-Cron-Env: It's an issue with the API or I have to change something? I also don't know where to look, I've nevere enabled the mail alerts (only Pushover) nor this mail address @.***) somewhere. Because every 12h I get in my inbox the mail from Grafana/cron with my pdf plus the "Delivery Status Notification (Failure)" mail, and this is annoying.
Thanks for the help!
— Reply to this email directly, view it on GitHub https://github.com/IzakMarais/reporter/issues/341, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7CHEB7TW4M5HSBR77YVEDWHX2TJANCNFSM6AAAAAAR5K3XPM. You are receiving this because you are subscribed to this thread.
Thanks for the reply, yes I'm not sure that's triggered by the Grafana API, it's my deduction since it's the only thing that is called via CURL, I also tried to ask on the Grafana community and they said that maybe could be an issue with the API.
Solved adding an automatic deletion of all the mails from postmaster@grafana. Not the best way but it works...
Hi and thanks for this, it is very useful, I've also customized it using some other font and dark theme, and other things (screenshot), but I have one issue that I can't resolve alone:
Everytime cron call the API (or I do it via the Link/URL in the dashboard), for some reasons Grafana try to send an email to postmaster@Grafana, that obviously fails, and Google send me the Delivery Status Notification (Failure) mail every time. I have neve configured the smtp in Grafana.ini, now I also disabled it, but this weird behavior still happens.
This is not triggered by the
mail -s
command in cron, but is triggered by the API/curl, indeed I'm receving the mail at 00:07 and not 05:07.Example of my crontab
See the time:
With this message (the shell output)
It's an issue with the API or I have to change something? I also don't know where to look, I've nevere enabled the mail alerts (only Pushover) nor this mail address (postmaster@Grafana) somewhere.
Because every 12h I get in my inbox the mail from Grafana/cron with my pdf plus the "Delivery Status Notification (Failure)" mail, and this is annoying.
Thanks for the help!