How can I receive server notifications (updates, backups, cron job status) from Virtualmin?

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.3
Virtualmin version 7.50.2 GPL

Hello everyone,

I’m trying to improve monitoring on my Virtualmin server, and I would like to receive automatic notifications about important events.

Ideally, I would like to be notified when:

A system or package update is available
A Virtualmin backup finishes (whether it succeeds or fails)
A cron job succeeds or fails
Services stop working (such as Apache/Nginx, MySQL, etc.)
Any important server alert or warning occurs

I have checked the email settings and alerts, but I’m not sure what the proper or recommended way is to configure this in Virtualmin/Webmin.

Thank you in advance for your help.

1 Like

Most root-level notifications are configured in Webmin->Webmin->Webmin Configuration->Sending Email

But, cron is not part of Webmin.

Can this feature being added, Cron notifictions to a specific email address fail.message, success and response?

We don’t maintain cron, so we can’t add features to cron.

But, you can certainly configure cron to send you messages.

I get this every Sunday I think.

Subject
Cron root@main test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Body
/etc/cron.daily/etckeeper:
Auto packing the repository in background for optimum performance.
See “git help gc” for manual housekeeping.

I use cPanel in my other life and you can just set an email address at the top of the CRON page and then you get fail messages or if there output that is sent in an email or you can use Dev > null to send the response to nothing.

It is a useful feature.

The cron page I see in webmin is just a raw editor but the cpanel one must have an abstraction layer in-between.

Anyways, just an idea, not a deal stopper.

Webmin --> Webmin Configuration --> Sending email

You can configure one email address for all notifications to be sent to, shown below. Each notification target email can be overridden locally for each notification, if needed, so I highly recommend setting this up.

I should maybe also note that Webmin has its own built-in scheduled jobs service that handle most scheduled jobs for Virtualmin and Webmin including Virtualmin backups, and it will notify you of things happening via scheduled jobs, if it’s configured to do so.

But, OP asked about cron, which is not our zoo and notifications for cron are not our monkeys.

Ah, hmm…I’m not sure how to present that accurately in a UI. Any crontab file can have a MAILTO set, so having one that always gets inserted would potentially conflict with what the user wants.

But, I guess every job could have a field that defaults to whatever (it defaults to root on most Linux systems via the packaged default. Generally, you should always alias root to some actual user, to you get those messages via your regular email.

1 Like