Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (47 sloc) 1.66 KB



  • Ubuntu
  • Ruby (in /usr/local/bin)
  • rsyslog
  • loggly (syslog (TCP) input)


Add this to your runlist: loggly::setup

How does it work?

We hope it's pretty simple and straight forward:

  • we write a configuration for rsyslog to send all data to loggly
  • each instance gets a loggly init-script, which is customized with necessary variables: user, password, ...)
  • we install a script called deviceid (called from the init script)
  • init-script is ran during boot process and shutdown

Customization (aka attribute files)

Edit the attributes/default.rb or read on.

If you happen to use Scalarium, edit your cloud json via the cloud overview, then actions and edit cloud.


Set the following in your node.json:

  "loggly": {
    "domain": "example",
    "input": 1,
    "user": "account",
    "pass": "password"

Domain is your subdomain, e.g.


So, yeah - this recipe uses the syslog (TCP) transport only.

For rsyslog's configuration, we have a few options as well:

  "syslog": { 
    "logfiles": {
      "/var/log/nginx/error.log": "error",
      "/var/log/php/slow.log" => "notice"
      "/var/log/php/fpm.log" => "error"
    "host": "",
    "haproxy": {
      "log_dir": "/mnt/logs/haproxy",
      "poll": 10

logfiles should be interesting since this allows us to configure rsyslog to pick up logfiles as well.

The haproxy-related bits are Scalarium specific. We should probably spin this off some time (PRs welcome!).

Jump to Line
Something went wrong with that request. Please try again.