FTP Monitor
The FTP monitor tests FTP services by either uploading files to, or downloading files from FTP servers. It monitors the performance of the service by recording the response time and data transfer rate, and monitors disk space and file integrity.
| Monitor files | Name or location |
|---|---|
| Monitor executable | nco_m_ftp |
| Properties file | $ISHOME/etc/props/ftp.props |
| Rules file | $ISHOME/etc/rules/ftp.rules |
| Log file | $ISHOME/log/ftp.log |
- Guidelines for configuring the FTP monitor
-
The FTP monitor tests the availability of an FTP server by uploading a file to the server using an FTP
STORcommand, or downloading a file from the server using an FTPRETRcommand.
- Configuring FTP Monitor Service tests
-
The configuration parameters for the FTP monitor are described in the following table.
Table 2. FTP monitor configuration Field Description server The IP address of the target FTP server, or the machine you want to FTP from. Example is ftp.mycompany.comlocalfile For FTP
GEToperations, this field specifies the name and path to which the file is downloaded.For FTP
PUToperations, this field specifies the name and path of the file that is uploaded to the FTP server.The default value is FULL PATHNAME. Example is $ISMHOME/etc/ism/downloads/ftp-test.tar.Z
remotefile For FTP
GEToperations, this field specifies the name and path of the file that is downloaded from the server.For FTP
PUToperations, this field specifies the name and path to which the file is uploaded on the FTP server.The default value is FULL PATHNAME. Example is /sales/prodlist.tar.Z
description A text field for providing descriptive information about the element. port The default port that the FTP server uses.
Default:
21username The username used to log on to the target FTP server. password The password used to log on to the target FTP server. Leave this blank if the FTP account doesn’t require a password. command The FTP command for the monitor to use: GETorRECV- Download a file from the target FTP serverSENDorPUT- Upload a file to the target FTP server
Default:
GET.conntype Specifies the type of connection for the monitor to establish with the server when it tries to transfer the file: ActivePassive
Default:
Active.timeout The time, in seconds, to wait for the server to respond.
Default:
30.poll The time, in seconds, between each poll.
Default:
300failureretests The number of times to retest before indicating a failure. Default:
0.retestinterval The time period in seconds to wait between each failure retest.
Default:
10.
- Regular expression matching
-
You can perform a regular expression search on the information being downloaded by entering up to 50 different regular expressions. The FTP monitor attempts to match the contents retrieved to each of the regular expressions.
If a match for a specified regular expression is found, the matched lines (or as much as can fit in the monitor’s internal buffer) are returned in the corresponding
$regexpMatchnelement. If the regular expression matches more than once in the information downloaded, only the first match is returned. The status of each regular expression test is indicated by the$regexpStatusnelements. You can use the regular expression matches and their status information as criteria for service level classifications.Regular expressions perform string matching on content downloaded during service tests. These expressions may contain one or more regular expression operators, which determine what content is matched by the expression.
Note: Regular expression syntax can be used to match strings on single lines only. Internet Service Monitoring can’t match strings that include new lines or carriage returns. Use multiple regular expressions to match strings that cover multiple lines. You can also use SLC rules to raise alarms based on the result of multiple regular expressions.Table 3. Regular expression operators Character Description .Matches any single character.
For example, the regular expression
r.tmatches the stringsrat,rut,r t, but notroot.$Matches the end of a line.
For example, the regular expression
dog$matches the end of the stringit's a dogbut not the stringThere are a lot of dogs.^Matches the beginning of a line.
For example, the regular expression
^When inmatches the beginning of the stringWhen in the course of human eventsbut wouldn’t matchWhat and When in the.*Matches zero or more occurrences of the character immediately preceding.
For example, the regular expression
.*matches any number of any characters.\Treats the subsequent character as an ordinary character.
For example,
\$matches the dollar sign character ($) rather than the end of a line. Similarly, the expression\.matches the period character rather than any single character.[]Matches any one of the characters between the brackets.
For example, the regular expression
r[aou]tmatchesrat,rot, andrut, but notrit.Specify ranges of characters by using a hyphen.
For example, the regular expression
[0-9]matches any digit.You can also specify multiple ranges.
For example, the regular expression
[A-Za-z]matches any letter case.|Matches phrases containing either of the conditions specified.
For example,
him|hermatches the lineit belongs to himand the lineit belongs to her, but doesn’t match the lineit belongs to them.Note: If you prefer the output data strings withcurly braces{}ordouble quotes ""then you need to add an escape characterbackslash \before everycurly braceanddouble quotein the regular expression.For example, if the data string is
{"templates":true,"mongodb":true,"ldap":true,"ucd":true,"github":true}then the regular expression should appear as\{\"templates\":true,\"mongodb\":true,\"ldap\":true,\"ucd\":true,\"github\":true\}
- Monitor elements
-
In addition to the test results common to all elements, the FTP monitor generates a set of test results containing data specific to FTP service tests.
Table 4. FTP monitor elements Element Description $bytesPerSec*(BytesPerSec)The average number of bytes transferred each second. $bytesTransfered*
(BytesTransferred)The number of bytes uploaded or downloaded. $checksumThe Checksum element doesn’t normally provide meaningful values for
service level classifications because checksum values aren’t known when the profile element is created (the monitor calculates checksum values while tests are in progress). The $checksum and $previousChecksum monitor elements are intended for alert enrichment using the monitor's rules file.$command*(FtpCommand)The FTP command issued by the monitor. $connectionType*(FtpConnection)The type of data connection used. This can be ACTIVEorPASSIVE.$connectTime*(ConnectTime)The time taken to connect to the FTP server. $downloadTimeThe time taken to download the file. $localFile*(FtpLocalFile)Full pathname of the file stored on the local host. This element is taken from the configuration file. $lookupTime*(LookupTime)The time taken to look up the FTP server IP address. $previousChecksumThe PreviousChecksum element doesn’t normally provide meaningful values for service level classifications because checksum values are not known when the profile element is created (the monitor calculates checksum values while tests are in progress). The $previousChecksum and $checksum monitor elements are intended for alert enrichment using the monitor's rules file. $regexpnThe regular expression. $regexpMatchnThe contents of the line matching the regular expression. $regexpStatusnThe status of the regular expression match: NONE- No regular expression checking is configuredMATCHED- A match was found for the regular expressionFAILED- A match wasn’t found for the regular expression$remoteFile*(FtpRemoteFile)Full pathname of the file stored on the remote host (the FTP server). This element is taken from the configuration file. $responseTime*(ResponseTime)The time taken after a connection is created until the first byte of the target file is received. $statusThe status code returned by the FTP server. $transferTime*(TransferTime)Sets the value to $uploadTimeor$downloadTime.$uploadTimeThe time taken to upload the file. $usernameUser name (account name) used by the monitor to log in to the target host. This element is taken from the configuration file if $messagecontainsOK.
- Status messages
-
The FTP monitor provides status messages in the
ResultMessageattribute when using IBM® Application Performance Management. These messages indicate the result of the test.Table 5. FTP monitor status messages Message Description OKThe FTP request succeeded. Unable to open local file for reading/writingSee the FTP monitor log file for more information. Unable to read from/write to local fileUnable to read from data connectionA data connection to the FTP server was established, but a problem occurred. Unable to upload to ftp serverTimed out waiting to read/writeConnection closed by foreign hostThe connection to the FTP server was broken. Connection closed unexpectedlyConnection failedThe monitor failed to connect to the FTP server. See the FTP monitor log file for more information.