Page 1 of 1
FTP Transaction monitoring
Posted: Mon Aug 06, 2018 1:26 pm
by DrewDennis
Well...can't find my last post. So here it is again.
I have a new install of Nagios XI I am demoing and I cannot get FTP transaction monitoring to work.
We are using Serv-u for our FTP site. I can login via filezilla with my monitor account and see/upload/download files. When I run the check manually in Nagios XI I get the following:
[
[email protected] ~]$ /usr/local/nagios/libexec/check_ftp_fully "RMGNAGIOS" "22PM0bZt" "21" $HOSTNAME$
CRITICAL: FTP check failed when trying to list the contents of a directory.
We are configured for FTP and Explicit SSL/TLS on port 21. When I connected for the first time with Filezilla it prompted me to accept and save the cert. Could that be the problem with Nagios?
Thanks!
Re: FTP Transaction monitoring
Posted: Mon Aug 06, 2018 2:16 pm
by scottwilkerson
Are you actually using $HOSTNAME$ when testing the command, or are you putting in the actual host's name or IP address?
Re: FTP Transaction monitoring
Posted: Mon Aug 06, 2018 3:17 pm
by DrewDennis
Hi - I am running it from the "check command" page in the Nagios XI GUI / core config manager.
Re: FTP Transaction monitoring
Posted: Mon Aug 06, 2018 3:53 pm
by lmiltchev
Can you click on the service itself under the
Service Status Detail page, schedule an immediate check, and see if the check works?
Testing from the CCM is not guaranteed to work in each and every case. For example, some of the nagios macros may not resolve when testing in the CCM. The
Run Check Command button is placed in the CCM for convenience. It is not meant to be a substitute for testing from the command line.
If your check is still failing in the GUI after submitting an immediate check, run it from the CLI, and show us the check and the output of it.
Example:
Code: Select all
/usr/local/nagios/libexec/check_ftp_fully <user> <password> "21" <hostname>
OK: FTP fully checked, all tests successful.
One more thing - when you set up your check, did you use a FQDN or an IP address? If you used an IP, you would need to change the check_ftp_fully command to use $HOSTADDRESS$ instead of $HOSTNAME$.
Let us know if this helped.
Re: FTP Transaction monitoring
Posted: Mon Aug 06, 2018 4:12 pm
by DrewDennis
lmiltchev wrote:Can you click on the service itself under the
Service Status Detail page, schedule an immediate check, and see if the check works?
Testing from the CCM is not guaranteed to work in each and every case. For example, some of the nagios macros may not resolve when testing in the CCM. The
Run Check Command button is placed in the CCM for convenience. It is not meant to be a substitute for testing from the command line.
If your check is still failing in the GUI after submitting an immediate check, run it from the CLI, and show us the check and the output of it.
Example:
Code: Select all
/usr/local/nagios/libexec/check_ftp_fully <user> <password> "21" <hostname>
OK: FTP fully checked, all tests successful.
One more thing - when you set up your check, did you use a FQDN or an IP address? If you used an IP, you would need to change the check_ftp_fully command to use $HOSTADDRESS$ instead of $HOSTNAME$.
Let us know if this helped.
Thanks for the reply and assistance. I tried it from the page you said, and it says completed successfully, but still fails the check. I went to the cli and the screen shot below is of the output. I have tried it with name and with IP and still the same result.
Re: FTP Transaction monitoring
Posted: Tue Aug 07, 2018 8:50 am
by lmiltchev
We are configured for FTP and Explicit SSL/TLS on port 21. When I connected for the first time with Filezilla it prompted me to accept and save the cert. Could that be the problem with Nagios?
It seems like it is going to be a problem just my looking a bit more at the wizard, particularly for the file transfer... Sorry, we didn't catch this earlier.
example01.PNG
You may need to find a different plugin on the Nagios Exchange that can do the job for you. Here's one that we found, but there may be more similar plugins on Exchange:
https://exchange.nagios.org/directory/P ... st/details
After you verify that the plugin works well from the command line, you can add a new command and new service to your Nagios XI server by following the steps, outlined in the document below:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf