Contacts/email configuration

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
LibrarianJoe
Posts: 16
Joined: Fri Feb 08, 2019 1:26 pm

Re: Contacts/email configuration

Post by LibrarianJoe »

Also here's what I get back when I run the command:

Code: Select all

Apr 04 08:37:46 HOSTNAME sendEmail[15088]: ERROR => Connection attempt to stmp.gmail.com:587 failed: IO::Socket::INET6: getaddrinfo: Name or service not known
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Contacts/email configuration

Post by scottwilkerson »

LibrarianJoe wrote:Also here's what I get back when I run the command:

Code: Select all

Apr 04 08:37:46 HOSTNAME sendEmail[15088]: ERROR => Connection attempt to stmp.gmail.com:587 failed: IO::Socket::INET6: getaddrinfo: Name or service not known
I think you entered the hostname incorrectly, it should be smtp.gmail.com not stmp.gmail.com
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
LibrarianJoe
Posts: 16
Joined: Fri Feb 08, 2019 1:26 pm

Re: Contacts/email configuration

Post by LibrarianJoe »

That fixed it! Thank you! I am typographically challenged, apparently!
LibrarianJoe
Posts: 16
Joined: Fri Feb 08, 2019 1:26 pm

Re: Contacts/email configuration

Post by LibrarianJoe »

Ok, one last issue (I hope): The command works in the terminal, but no notifications are sent. What do I need to add to the commands/host config to make that happen?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Contacts/email configuration

Post by scottwilkerson »

The command you had specified previously for the notify-host-by-email and notify-service-by-email has specified several $USERx$ variables, you should verify they are set correctly, and that those commands are specified for contacts in the contact configuration.

If they are, I would look in the nagios.log to see if the notification commands are getting triggered and if there are any errors like there were before
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
LibrarianJoe
Posts: 16
Joined: Fri Feb 08, 2019 1:26 pm

Re: Contacts/email configuration

Post by LibrarianJoe »

Thank you! Checked the variables and we're all good now, notifications are coming through.

Thank you so much for all your help!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Contacts/email configuration

Post by ssax »

That's great to hear, are we okay to lock the topic and mark it as resolved?
Locked