We've moved our NagiosXI implementation from one server to another, using the documented Nagios XI backup -> restore scripts. The new server is a new build of CentOS 6.3 from PXE boot off a CentOS mirror site, we installed Nagios in the normal way, then restored the Nagios XI backup file to the new server.
Now I note that check_email_delivery is not working any more (from the GUI or the CLI): -
Code: Select all
# /usr/local/nagios/libexec/check_email_delivery -v --timeout 300,300 --warning 300,300,300 --critical 600,600,600 --wait 1 --imap-check-interval 1 --imap-retries 300 --mailto [email protected] --mailfrom [email protected] --smtp-server smtp.example.com --smtp-port 25 --smtp-username [email protected] --smtp-password reallysecurepassword \$\$\(\[ "" \] --imap-server localhost --imap-port 143 --username [email protected] --password reallysecurepassword \$\$\(\[ "" \]
EMAIL DELIVERY CRITICAL - smtp failed: SMTP SEND CRITICAL - Could not send to [email protected]
Code: Select all
# check_smtp_send -H smtp.example.com --mailto [email protected] --mailfrom [email protected] --body 'some text' --username [email protected] --password reallysecurepassword -v
Missing perl modules: Net::SMTP_auth
Code: Select all
# yum install perl-Net-SMTP_auth
Code: Select all
# check_smtp_send -H smtp.example.com --mailto [email protected] --mailfrom [email protected] --body 'some text' --username [email protected] --password reallysecurepassword -v
SMTP SEND OK - 0 seconds | elapsed=0s;15;30
banner: smtp.example.com ESMTP
Code: Select all
my $smtp_plugin = "$libexec/check_smtp_send -v";
#$smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin;
OK, now hardcoded to "-vvv" and I can see that when running check_email_delivery, the response to "334 VXNlcm5hbWU6" (username) actually corresponds to the check_email_delivery "--username" argument, rather than the check_smtp_send "--smtp-username" argument, but if I try to use the check_imap_receive "--imap-username" instead, the script borks. This seems like a bit of a tangled mess...