Email Delivery Wizard - SMTP Uknown

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Delivery Wizard - SMTP Uknown

Post by scottwilkerson »

You only have 1/2 the command

Code: Select all

./check_email_delivery --plugin "/usr/local/nagios/libexec/check_smtp_send -H smpthost --mailto [email protected] --mailfrom [email protected] --header 'Subject: Nagios XI Test.'" --plugin "/usr/local/nagios/libexec/check_imap_receive -H IMAPHOST -p 143 -U Ngs -P 'pmon' --nodelete -s SUBJECT -s 'Subject: Nagios XI Test.'"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Yes, sorry. I should have included that I tried with the full command, but am getting the same exact error.

I thought perhaps the second part of the command was only if you needed to check for receipt of the message, I don't really need to do that because we're creating a script on the Exchange server that does that for us. I thought using the first half of the command might work by itself, but it doesn't.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Delivery Wizard - SMTP Uknown

Post by scottwilkerson »

Can you add the --verbose flag to your command to see what results you are getting?

Code: Select all

/usr/local/nagios/libexec/check_email_delivery --plugin "/usr/local/nagios/libexec/check_smtp_send -H smtpserver --mailto [email protected] --mailfrom [email protected] --header 'Subject: Nagios XI Test.' --verbose"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

I added the --verbose and ran the command from the CLI and from the GUI. Same result on both:

EMAIL DELIVERY CRITICAL - plugin 1 failed: SMTP SEND CRITICAL - Could not send to [email protected]
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Delivery Wizard - SMTP Uknown

Post by scottwilkerson »

Are you sure your smtp server is allowing sending from this server? Can you view the logs from the SMTP server?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Ok, I think I'm really close to getting this to work... I'm getting the following error now:

(Service check timed out after 61.01 seconds)

Here's the command I'm using:

--plugin "/usr/local/nagios/libexec/check_smtp_send -H exchange.state --mailto [email protected] --mailfrom [email protected] --header 'Subject: Nagios XI Test.'" --plugin "/usr/local/nagios/libexec/check_imap_receive -H exchange.state -p 993 -U [email protected] -P 'XXXXXXXXXX' --nodelete -s SUBJECT -s 'Nagios XI Test.'"

How can I keep the check from timing out?

Thank you!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Delivery Wizard - SMTP Uknown

Post by scottwilkerson »

I would add --verbose to each of the command to see if you can get some output at where it might be stopping

Code: Select all

/usr/local/nagios/libexec/check_email_delivery --plugin "/usr/local/nagios/libexec/check_smtp_send -H exchange.state --mailto [email protected] --mailfrom [email protected] --header 'Subject: Nagios XI Test.'  --verbose" --plugin "/usr/local/nagios/libexec/check_imap_receive -H exchange.state -p 993 -U [email protected] -P 'XXXXXXXXXX' --nodelete -s SUBJECT -s 'Nagios XI Test.'  --verbose" --verbose
I would run it from the command line to see what the output is
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

Here's what I got running it from the CLI:

EMAIL DELIVERY CRITICAL - Could not run plugin 2: exceeded timeout 60 seconds
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Delivery Wizard - SMTP Uknown

Post by scottwilkerson »

So plugin 2 would be this

Code: Select all

/usr/local/nagios/libexec/check_imap_receive -H exchange.state -p 993 -U [email protected] -P 'XXXXXXXXXX' --nodelete -s SUBJECT -s 'Nagios XI Test.'  --verbose
Are you sure you can get a response from this IMAP server with this port and credentials?

You may need to add the --ssl flag
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Email Delivery Wizard - SMTP Uknown

Post by rferebee »

I think 993 is the correct port, because when I try with 143 I get this:

EMAIL DELIVERY CRITICAL - plugin 2 failed: IMAP RECEIVE CRITICAL - Could not connect to exchangem.state port 143: 1 BAD Command received in Invalid state. at /usr/local/nagios/libexec/check_imap_receive line 145.

And, I'm absolutely certain of the credentials. I'm logged into the mailbox right now.
Locked