Email Delivery Wizard - SMTP Uknown

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Good morning... me again... :D

Our Exchange admins would like us to test SMTP traffic using Nagios. It was recommended that I utilize the 'Email Delivery' wizard to set this up.

However, the check keeps coming back as an Unknown status and I'm not sure why...

Here's how I have the check configured:

check_email_delivery!--mailto [email protected] --mailfrom [email protected] -H server.state.nv.us --smtp-server server.state.nv.us --smtp-username '[email protected]' --smtp-password 'xxxxxxxxxxx' --smtp-port 25 --imap-server server.state.nv.us --username '[email protected]' --password 'xxxxxxxxxxx' --imap-port 143

See screen shot for check current check state. I've tried with different mail servers and it comes back the same every time. Is there perhaps a permit that I need to have in place or something I need to configure on my XI box?
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email Delivery Wizard - SMTP Uknown

Post by npolovenko »

Welcome back, @rferebee! Please replace all xxx in my command with the real data and run this command from the command line:
/usr/local/nagios/libexec/check_email_delivery --mailto xxxxxxx --mailfrom xxxxxxx -H xx.xxx.xxx.xxx --smtp-server xx.xxx.xxx.xxx --smtp-username 'xxxxxxx' --smtp-password 'xxxxxxx ' --smtp-port 25 --imap-server xx.xxx.xxx.xxx --imap-username 'xxxxxxx' ---map-password 'xxxxxxx ' --imap-port 143
And show me the output.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Here's the output.
You do not have the required permissions to view the files attached to this post.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Sorry, it looks like there was a typo in that line of text where "--imap password" should have been. I fixed it and here's the updated output.
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email Delivery Wizard - SMTP Uknown

Post by npolovenko »

@rferebee, Sorry, It should be ---imap-password instead of ---map-password. Can you change it in your command and try one more time?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Yes, I fixed it. The second screen shot above is the output of the corrected command. Still no joy.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Ok, I think I got this working. I had to adjust the argument according to what was returned in the command line.

It looks like this:

-H xx.xxx.xxx.xxx --mailto [email protected] --mailfrom [email protected] --body 'On-Prem SMTP Test' --username [email protected] --password xxxxxx -w 180 -c 300 --imap-check-interval 3600

The email was sent, but what's odd is that the check is still coming back as 'Unknown' even though the message went out and was received.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Ok, so the status just changed to Critical for some reason.

I don't know what the heck, "(Return code of 127 is out of bounds. Check if plugin exists)" means...
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Email Delivery Wizard - SMTP Uknown

Post by npolovenko »

@rferebee, Weird. Can you sign in as nagios user and run the new command?
su - nagios
/usr/local/nagios/libexec/check_email_delivery -H xx.xxx.xxx.xxx --mailto [email protected] --mailfrom [email protected] --body 'On-Prem SMTP Test' --username [email protected] --password xxxxxx -w 180 -c 300 --imap-check-interval 3600
Does it work ok or fail?

Also, is this you command in XI?
-H xx.xxx.xxx.xxx --mailto [email protected] --mailfrom [email protected] --body 'On-Prem SMTP Test' --username [email protected] --password xxxxxx -w 180 -c 300 --imap-check-interval 3600
If so, it needs to be:
$USER1$/check_email_delivery --mailto [email protected] --mailfrom [email protected] --body 'On-Prem SMTP Test' --username [email protected] --password xxxxxx -w 180 -c 300 --imap-check-interval 3600
And you should replace all xxxx.
Untitled.png
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

So, when I sign into XI as the Nagios account and run the updated command it returns "Command Not Found".

When I remove the -H xx.xxx.xxx.xxx from my original command in the GUI it doesn't fail, but it began spamming the account with the same e-mail over and over, not following the 1 hour interval I set.

So, it's working, technically. Just not the way we want.
Locked