FtpMonitor
The FtpMonitor validates an FTP connection’s login processes. The monitor can test the FTP server on multiple ports with specific login data.
The service using the FtpMonitor is up if the FTP server responds with return codes between 200 and 299. For special cases, the service is also marked as up for codes 425 and 530.
Configuration and use
Parameter | Description | Default |
---|---|---|
retry |
Number of attempts to get a valid FTP response/response-text. |
0 |
port |
A list of TCP ports to which connection shall be tried. |
20, 21 |
password {} |
Specifies the password to use. Use this parameter with the userid parameter to perform authentication. |
empty string |
userid {} |
Specifies the user ID to use. Use this parameter with the password parameter to perform authentication. |
n/a |
{} indicates the parameter supports placeholder substitution.
This monitor implements the Common Configuration Parameters.
Examples
This example demonstrates how to configure the monitor in poller-configuration.xml
:
<service name="FTP" interval="300000" user-defined="false" status="on">
<parameter key="retry" value="1"/> (1)
<parameter key="timeout" value="3000"/> (2)
<parameter key="port" value="21"/> (3)
<parameter key="userid" value=""/> (4)
<parameter key="password" value=""/> (5)
</service>
<service name="FTP-With-Auth-From-Asset" interval="300000" user-defined="false" status="on">
<parameter key="retry" value="1"/> (1)
<parameter key="timeout" value="3000"/> (2)
<parameter key="port" value="21"/> (3)
<parameter key="userid" value="{username}"/> (4)
<parameter key="password" value="{password}"/> (5)
</service>
<service name="FTP-Customer" interval="300000" user-defined="false" status="on">
<parameter key="retry" value="1"/> (1)
<parameter key="timeout" value="3000"/> (2)
<parameter key="port" value="21"/> (3)
<parameter key="userid" value="Customer"/> (4)
<parameter key="password" value="MySecretPassword"/> (5)
</service>
<monitor service="FTP" class-name="org.opennms.netmgt.poller.monitors.FtpMonitor"/> (6)
<monitor service="FTP-With-Auth-From-Asset" class-name="org.opennms.netmgt.poller.monitors.FtpMonitor"/> (6)
<monitor service="FTP-Customer" class-name="org.opennms.netmgt.poller.monitors.FtpMonitor"/> (6)
1 | Number of attempts to test a service’s status. |
2 | Timeout for the isReachable method, in milliseconds. |
3 | A list of TCP ports to try to connect to. |
4 | Specifies the user ID to use. |
5 | Specifies the password to use. |
6 | Required monitor component for each service. |