Learnosity Logo
Learnosity Banner Image

Monitoring multiple log files in a cluster

While chatting with my friendly local sysadmin the other day about monitoring multiple log files across our cluster of server he pointed me towards multitail.

With a little bit messing about I managed to get it doing exactly what I needed.

I created the following little script which connects to 4 remote servers and monitors the log files (file names and server names have been changed to protect the innocent).

#!/bin/bash
multitail -l "ssh server1 tail -f /var/log/myinteresting.log" \
-l "ssh server2 tail -f /var/log/myinteresting.log" \
-l "ssh server3 tail -f /var/log/myinteresting.log" \
-l "ssh server4 tail -f /var/log/myinteresting.log"

Now with a single command I can monitor the log files across the entire cluster.

Happy days. Cheers, Mark

Related Blog Entries

Comments