Log Monitoring with Loggly

Log Monitoring with Loggly

Your HTPC generates a lot of log files that you should look at from time to time to make sure nothing is broken, your security was not compromised, etc.  The natural approach is to use the command line to view logs.  But this isn’t the most intuitive and can get frustrating tracking down where the different log files live.   This is where Loggly comes in.

Loggly is a cloud based log management which is great solution for a htpc.  The free tier supports 200 MB per day with 7-day retention. Loggly will amalgamate all your logs and make it available for you in their dashboard.

Now if I want to view my logs, I can just open the loggly dashboard from a web browser. Viewing the different logs is as quick as a few mouse clicks.  Loggly also has live tail feature, which works like the linux tail command to output all your logs as they comes in.  Since your logs are in the cloud, you can even view the logs while your HTPC is offline.

Loggly is easy to configure. After you sign up for an account download the file monitoring script:

curl -O https://www.loggly.com/install/configure-file-monitoring.sh

Then for each log file you want to monitor in Loggly, run:

sudo bash configure-file-monitoring.sh -a SUBDOMAIN -u USERNAME -f FILENAME -l ALIAS

Replace:

SUBDOMAIN: your account subdomain that you created when you signed up for Loggly
USERNAME: your Loggly username, which is visible at the top right of the Loggly console
FILENAME: the file or directory you want to monitor, can contain wildcards but cannot contain spaces
ALIAS: an easy to recognize name for the syslog.appName field. Must be unique for each file.

To view the particular file in Loggly, click Search,  then from the left pane click Syslog -> appName ->  ALIAS, where ALIAS is what you used when you ran the command above

More details on configuring loggly here: https://www.loggly.com/docs/file-monitoring

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s