Example: Monitoring a remote log file
In this example, you add a log file to a database server. With the log file added, you can then monitor that file when you run a test.
About this task
Procedure
- Add an identity to authenticate to a remote host over SSH.
From the Physical view, click .
-
Now, set the SSH connection on the server that you want to monitor. From the
Connectivity tab, double-click the Identity field for
the ssh connection and select the identity. Enter the port number for the
connection. The default is 22. To verify that the connection works, click Test
Connection.
- Next, add a log file to monitor the database. From the
Logical view, double-click the database and select the Monitoring tab. Under
the Location tab, enter the path to the location
where the log files for this server are stored and use a wildcard
match for the log file (
*.log
) for the name of the log file to monitor. - Finally, define a test action that looks for the word
error
and if found, flags the entry in the console and fails the test. - Run the test. If the test finds matching text, the entry is
flagged in the console, and the test fails.
For an example project to use, see this technote.