I have nagios up and running perfect, but I cannot get emails. The same server is a qmail server and I cannot switch to postfix unless for some reason I can run both if I have to for it to work with nagios. My commands.cfg file:
This is the config I was told I needed for qmail to work. However, no emails ever hit the logs. I can telnet on port 25 and send test emails, etc. All that works fine. Any advice on getting this working?
we also have a sendmail error about that -s flag so i’d try without it… sorry i don’t have alternatives to offer as i don’t have a Qmail install to try it…
As i said above, try removing the -s flag from the sendmail command and try playing arouns with the options until you can get a mail delivered… then you can rebould the nagios command from there.
okay so I see it hit the log but I never get the email. I am relaying to the exchange server and this works because I can telnet on port 25 to that server from the nagios server and get the email. Thoughts?
I’m not trying to cause a problem, are you done helping me? I brought down a AP that is my host and it never hits the logs. I would assume that means my commands.cfg is still no good. Oh and just so you know I don’t mind donating for your help
that’s not the point… you wouldn’t be donating to me so no need to tell me
Why do i get some impression about being spoon fed? well let’s start from the missing slash in the beginnning of your command, then the part where you missed the -s flag plus the duplicate definition of the command. You have a qmail you can’t change but you don’t know how to set it up to work correctly… enough?
Anyway as i said i don’t know qmail. you need to look for a smarthost or relay configuration option, this might break your present configuration as you probably have something already running there…
Is nagios showing the host status correctly? is the mail getting in the queue? yuoou should see it in the logs. Do you get an error in the logs?
Now like I said before, it is relaying fine to the exchange server. I simply missed the slash, why bash me? I have the smarthost setup and it has been working since day one. Setting up nagios has nothing to do with configuring qmail. I simply need to know why the commands.cfg isn’t working when I see the alert in the nagios.
if you got the email from command line there really isnothing more to do than modify your first command basing ont he command lien you used to send the mail.
tehre really were only two modifications… one slash and the removal of the -s flag…
yeah that is all done. I rebooted an AP that is being monitored. I saw the alert history show it was down and states from the gui that an email is sent. However, it never hits the server with an email. The command line works perfect.