Page 1 of 1

Nagios - I lose my mails when I connect via WIFI

Posted: Mon Jul 26, 2021 7:33 am
by brianribeiro
Hello everyone,
I have a Raspberry PI 4 with Nagios 4.4.6
It connects via cable and WIFI.

The issue is that when I remove the cable and the PI connects to the WIFI, I wait for it to send me the emails that it can't connect to any host/service but it doesn't send me any "host is down" emails.
If I connect the cable again, the "host is up" emails arrive immediately.

I have mailutils and sendmail installed.

Is there anything, at configuration level, that I can parameterise so that even if I'm not on the cable, the emails still go out?
That's the only thing I'm missing.
Nagios considers the mails to be sent but they don't appear in the mailbox.

Thx in advance for your help.

-

Re: Nagios - I lose my mails when I connect via WIFI

Posted: Wed Jul 28, 2021 5:46 am
by brianribeiro
I have already solved it on my own.
I needed msmtp instead of ssmtp because I have a PI4.

I left the msmtprc file configured and it is working :)

Now, not only I receive mails via cable but when the PI loses the connection with the internal network and connects to the WIFI automatically, it also sends me mails so I have double verification.

Re: Nagios - I lose my mails when I connect via WIFI

Posted: Wed Jul 28, 2021 1:26 pm
by benjaminsmith
Brian,

Appreciate the update and very happy to hear you got your notifications working over wifi. As far as the double emails are concerned, take a look at the nagios.log and mail logs to see what's happening.

Cheers,
Ben