Skip to content
/ fastdog Public

Fastly Syslog Apache Logs -> Rsyslog -> DogStatsd -> DatadogHQ

License

Notifications You must be signed in to change notification settings

darron/fastdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fastly CDN -> syslog -> DogStatsd -> DatadogHQ

I wanted to view my Fastly stats inside of my Datadog dashboard - here's how it's done:

Pre-requisites

  1. Fastly CDN account at the "Faster" level.
  2. A DatadogHQ account.
  3. An Ubuntu 10.0.4LTS server with Syslog TCP port open.
  4. Datadog software higher than 3.0.x installed on that machine.
  5. If you use Chef - there's a cookbook that can help.

To setup

  1. You need to tell Fastly where to push the logfiles. - you may also be able to do this from the Fastly admin interface.
  2. Deploy your updated VCL files - from within the Fastly admin interface.
  3. On the Ubuntu box: apt-get install libcurl4-openssl-dev
  4. On the Ubuntu box: gem install fastly dogstatsd-ruby statsd dogapi eventmachine eventmachine-tail
  5. Wait for the logs to show up - it was pretty quick for me.
  6. Pick a log where the data's appearing - I used /var/log/user.log.
  7. Run the fastdog.rb script like this: ruby fastdog.rb /var/log/user.log
  8. In the Datadog admin interface - create a new graph like this.
  9. Profit.

Profit.

To do

  1. Count hits for specific sites as required.
  2. Add bytes graph. For specific sites as required.
  3. Daemonize fastdog.rb - right now it's running in screen - sue me.

About

Fastly Syslog Apache Logs -> Rsyslog -> DogStatsd -> DatadogHQ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages