Hello everyone,
We have the problem that our CheckMK does not send an email notification.
CMK version:
2.1.0p33.cre
OS version:
CentOS Linux release 7.9.2009 (Core)
Error message:
unfortunately none available
There are neither error messages in the log
/opt/omd/sites/$SiteName$/var/log/web.log
There is also no output or error message when I enter the following
cmk --notify
We have configured global notification rules and contact groups and we have assigned these users with valid email addresses
When I send emails from the server’s console with sendmail or mailx, they arrive immediately
mailx -s “Testmail with MailX” mail.address@firma.com
echo “das ist ein Test” | sendmail -f mail.address@firma.com -t
where or how can I continue to look for the error here, or is it not possible to use the email notification in the CRE (RAW) edition?
Thanks for your answer.
Unfortunately, the log file /var/log/maillog is empty, and the operating system itself sends the emails without any problems, as I wrote.
My colleague has now set the logging to debug, so we might see a little more now.
We would be grateful for further helpful tips.
We found the following in the crash.log (/omd/sites/$SiteName$/var/check_mk/notify/crash.log ).
Traceback (most recent call last):
File "/omd/sites/$SiteName$/lib/python3/cmk/base/notify.py", line 279, in do_notify
notify_notify(raw_context_from_env(os.environ))
File "/omd/sites/$SiteName$/lib/python3/cmk/base/notify.py", line 320, in notify_notify
how does the OS send logs if your maillog is empty? Checkmk would require a mail transport agent on the OS, sendmail, postfix etc. They normally write to the above file (or some similar)
if you run mail to send you a test mail, do you get it?
we use postfix old MTA.
The log was previously empty because the log level was set to warning and there appeared to be no errors or warnings.
As written, we set the log level to debug, and now messages arrive in the log.
However, there are always only the following messages and no errors.
If you use an explicit email, you don’t have to use “Notify all contacts…”
Since you only have a single site, you don’t have to match it there, but that’s just a minor thing.
Can you also please check your notify.log and see if your notification is getting matched when you expect it?
The only things i have set/configured in the /etc/postfix/main.cf:
# Set myhostname to the FQDN of the machine
myhostname = monitor.mydomain.com
# Set external SMTP relay host here IP or hostname accepted along with a port number.
# The portnumber is only needed if you are not using the default port 25
relayhost = [YOUR-SMTP-SERVER-IP-HERE]:587
# Only accept email from our web-server (running on this box)
inet_interfaces = 127.0.0.1
Ofcourse this is very rudimentary, no certificate or other things configured, just plain SMTP
thanks for your tips.
We use CentOS 7.9 and sending emails on the command line works without any problems.
It looks as if CheckMK does not transfer the emails to the OS or does not receive them.
A question, as this is unclear to me, has it worked before ?
Or have you started setting up notifications just now with this version and bumped into this issue ?
We had not previously used the email notification.
Unfortunately, a colleague who is no longer with us once activated the notification for MS Teams.
However, he deactivated this again after a few weeks.