By: Thu Nguyen

Read Time: 1 min

Now that you’ve signed up for LogDNA, it’s time to set up your server to run the LogDNA agent.

  1. Log into the LogDNA dashboard and find your API key. You can find it on the bottom left after clicking on Host Install Instructions, as shown below.

Adding LogDNA client to your host servers
2. Follow the instructions to get the LogDNA agent set up on your server
hostinstructions
3. Specify your logging directories
By default, LogDNA logs all extensionless and .log files in /var/log/.
To add directories or files to log, you can use the commands:

#Directories:
logdna-agent -d /path/to/my/logfiles
#Files:
logdna-agent -f /path/to/my/file.log

If you need more complex logic, you can also view and set specific paths (as well as glob patterns) in /etc/logdna.conf.

For example:

logdir = /var/log,/home/myuser/mylogdir,/etc/myapp/**.log

Glob patterns can be tricky, so unless you need this type of logic, we recommend using regular file paths. However, if you ever need a glob patterns reference guide, we recommend the wonderful Wikipedia.

Happy logging!

About Thu Nguyen

Thu Nguyen is a technical writer who cares deeply about human relationships.

RELATED POSTS

Logging for DevSecOps

Logging is probably not the first item to come to mind when most of us think about DevSecOps, a term that refers to the integration...

Logging

Logging Best Practices Part 2: General Best Practices

Isn't all logging pretty much the same? Logs appear by default, like magic, without any further intervention by teams other than simply starting a system…...

Logging

What the Cloud Native Revolution Means for Log Management

This was originally posted on The New Stack. Once upon a time, log management was relatively straightforward. The volume, types, and structures of logs were...

Logging