Jump to content

Recommended Posts

Posted (edited)

Hello everyone,

 

It has been a while since I have posted on here but I could do with some help as I am currently bashing my head against a desk trying to sort this out.

 

I have setup Nagios and RT on a Ubuntu 10.10 server and they are running quite nicely. However, the one (important) component I am missing is email integration so that the applications can send out e-mail alerts. This however, is totally new to me.

 

Annoyingly, our e-mail is currently hosted by RM (Easymail) so I need to set this up to work with either GMail or Easymail as a relayhost.

 

I have followed quite a few examples and tutorials on the web, but I have not managed to get any of them to work. Because I was unsure as to what configuration steps were failing, I have even tried using SSMTP to send a mail but even then I always get the error Cannot open smtp.gmail.com:587 Is this because I am behind the lancsngfl proxy or is the problem totally unrelated?

 

I could do with some help really on this as it would be great to get it working.

 

Thanks in advance,

 

Pete

Edited by pshuttle
Posted
I can see that the lack of replies illustrates either 1) Nobody else has any idea or 2) My lack of understanding of the issue is so severe I am better left alone!
Posted

I've never done this but a quick google fnds this Monitor Network Services with Nagios - Part 1 (section 2.3) which looks like it describes what you're trying to do.

 

What I would expect to happen is that Nagios talks to a local SMTP server; that then uses normal DNS to find out where it should go to and delivers it.

 

For that to work, you need to allow port 25 outbound on your router so that the internal Postfix machine (or whatever) can connect to the external SMTP server which accepts mail for your domain.

 

If you can't do that (you don't control the router or port 25 is blocked outside your boundary) then I'm not sure what you can do but I hope someone else can help!

Posted

ours basically works like this:

 

nagios.cnf emails a local (machine) admin:

nagios.cnf

admin_email=nagios@localhost

 

posfix points to an upstream relay:

main.cf:

relayhost = x.x.x.x 

 

an aliases file fowards to whoever:

/etc/aliases

nagios:         itsupport@external mail.address.com

 

 

again, look for blocked ports etc

Posted

The simplest way is to use stunnel on a machine that has permission to send outbound email.

 

I think the settings would be:

 

accept = 127.0.0.1:25

connect = smtp.gmail.com:465

 

If you google stunnel and gmail you'll find a lot of examples.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...