Monitoring a file with ConsoleWorks on Unix/Linux

From TDiWiki

Jump to: navigation, search
First, create a console with the connector type: SSH with Password.

Choose “SSH with Password” for the connector type and then fill in the host IP, port, username, and password.

Use the command field under Connection Details to run a script or command upon connecting to your console. We suggest pointing to a script file for ease of managing and updating.


Note: Consult your distribution’s documentation for information on how to set up and enable SSH access on your system.

The tail command will monitor a file and return any updates that occur.

[root@pc ~]# echo tail -f /path/to/file/filetobemonitored > tailer.sh

In our example, we have created the script file tailer.sh on our host machine to run the command "tail" with the option "-f" to monitor our file. Click on the Save button to save your Console and make sure that you can connect.

Once your console is created, you can create Events to look for the specific patterns in which you are interested. Add the Events to a Scan and associate the Scan with your Console, and you will be able to see anytime your file is updated with the information you are looking for.

back to CW Linux/Unix page

Personal tools