[Bug 1117938] New: systemd - mailto for systemd timers
http://bugzilla.suse.com/show_bug.cgi?id=1117938 Bug ID: 1117938 Summary: systemd - mailto for systemd timers Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Factory Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: systemd-maintainers@suse.de Reporter: kstreitova@suse.com QA Contact: qa-bugs@suse.de CC: kstreitova@suse.com Found By: --- Blocker: --- Hello, Currently, a process of migration from cron to systemd timers (fate#323635) is in progress (see boo#1115430 for openSUSE and bsc#1115399 for SLE tracker bugs). Packagers who are dealing with the upgrade raised a question about a MAILTO function - how to set up systemd to send an email when a unit fails. As cron had this feature, they would like to preserve this mechanism. Arch Linux brings a solution [1] using a shell script using e.g. sendmail and a service for starting the executable. Does it make any sense to you to pack this solution within the systemd package? Or should we encourage users to create these scripts on their own? Or do you see any better solution? Thank you! [1] https://wiki.archlinux.org/index.php/Systemd/Timers#MAILTO -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
Kristyna Streitova
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c1
Franck Bui
Does it make any sense to you to pack this solution within the systemd package?
It seems that what is needed is already part of the functionalities provided by log monitoring systems, isn't it ? OTOH the solution brought by Arch is very limited and address a very specific use case, which I don't think we should officially support.
Or should we encourage users to create these scripts on their own? Or do you see any better solution?
Admittedly asking users to install a full log monitoring software (like graylog) for simply being notified when a unit fails is a bit cumbersome. Perhaps something like https://github.com/gkarakou/systemd-denotify would be more appropriated ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c2
--- Comment #2 from Eric Schirra
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c3
--- Comment #3 from Franck Bui
Franck i think this package can not use for send a information mail when timer rise up errors.
Why not ? Maybe there's a confusion here: systemd timers are units that are supposed to activate *services* on a given time. So you're probably more interested in monitoring the service activated by the timer rather than the timer itself. And even if the timer unit itself fails that should be logged too. And to monitor services (and everything thrown in the journal), solutions (more or less complex) already exist. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c4
--- Comment #4 from Eric Schirra
(In reply to Eric Schirra from comment #2)
Franck i think this package can not use for send a information mail when timer rise up errors.
Why not ?
Maybe there's a confusion here: systemd timers are units that are supposed to activate *services* on a given time. I know it. I'm not stupid.
So you're probably more interested in monitoring the service activated by the timer rather than the timer itself. And even if the timer unit itself fails that should be logged too. No, i think it does not work. systemd-denotify checks in a couple of minutes fi a service is running. But a service for systemd.timer, perhaps, does only run for some seconds per day. So, when systemd-denotify checks every 30min. It comes every 30min an error mesage. Not what i want or cron do. Please read the doc and conf of systemd-denotify.
And to monitor services (and everything thrown in the journal), solutions (more or less complex) already exist. I know about nagios, zabbix, centreon, icinga, icinga2 and so on. But why should i use for a new thing which does not operation without extra complex software, when it exist a old software, which so simple effective operation?
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c5
--- Comment #5 from Franck Bui
So, when systemd-denotify checks every 30min. It comes every 30min an error mesage. Not what i want or cron do. Please read the doc and conf of systemd-denotify.
Well the summary of the git repo [1] claims: A linux desktop app that notifies for user logins, failed systemd services, journal(log) patterns and optionally the status of selected services Please notice "failed systemd services, journal(log) patterns" part... And in the description of the project, "General" section says: These classes provide desktop and email notifications upon a user login, when systemd files are modified and when various patterns match in journal logs. So yes I did read the description of the project and it's pretty clear what the tool is supposed to achieved (and no I haven't looked at the code). [1] https://github.com/gkarakou/systemd-denotify -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c6
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c7
Kristyna Streitova
Anyway Kristyna, the process here doesn't look correct: it seems more a RFE than an issue to me.
And in such case it would be much better to discuss this with upstream (systemd-devel@lists.freedesktop.org) so we can figure out if the feature is really missing in systemd or if it is/should-be part of another/new project.
Would it be possible that you can discuss this issue with the upstream as a systemd package maintainer? Thank you!
I don't think such discussion belongs to downstream.
And I'm really not convinced that supporting the solution brought by Arch is the way to go.
I agree it's rather a hack than a nice solution. It's definitely better to have a proper and supported solution from the upstream. Or at least a clear statement that we should forget about cron MAILTO behaviour in timers and use a little bit different approach (e.g. systemd-denotify). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1117938
http://bugzilla.suse.com/show_bug.cgi?id=1117938#c8
Franck Bui
participants (1)
-
bugzilla_noreply@novell.com