Skip to content

tastemakerx/tmx-node-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NODE-ANALYTICS

Description

Analytics server which listens for stats data and forwards to various analytics platforms. Accepts stats of the form $stat:$value where $value is $delta|$metric|$json - ex/ testing.user.session_start:1|c|{"user_id":1}

Purpose

  • listen for UDP packets
  • output buffer JSON data to CSV
  • send stats to Mixpanel with JSON data as properties
  • send stats to statsd server with graphite back-end

Install & Configure

  1. clone the repo
  2. $ npm install
  3. edit config.json file in project root ($ vim ./config.json) and input host/port settings

Run

  • cd into project root
  • to keep-alive with forever-monitor: $ node bin/tmx-analytics start
  • to run ad-hoc: $ node stats-server

Test

  • install netcat ($ brew install netcat on a mac)
  • run the following in terminal, replacing HOST and PORT of analytics server: $ echo -n 'prod.social.artist.share:1|c|{"user_id":1}' | nc -w 1 -u HOST PORT

Links

About

Lightweight UDP analytics server for Mixpanel, StatsD, and CSV logging used at TastemakerX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published