GithubHelp home page GithubHelp logo

willcode2surf / mt-stats-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meloncholy/mt-stats-viewer

0.0 2.0 0.0 870 KB

(mt) Stats Viewer uses the (mt) Stats module to show graphs of realtime webserver stats using the wonderful D3.

mt-stats-viewer's Introduction

(mt) Stats Viewer

(mt) Stats Viewer uses the (mt) Stats module to show graphs of (nearly) realtime stats for MediaTemple webservers using the wonderful D3.

If you want to read more about how it works and some potential problems, there's a surprisingly (to me, at least) long post here.

Setting up (mt) Stats on your server

  • Get an API key for your MediaTemple server. You'll also need your service ID later, which you can get by visiting https://api.mediatemple.net/api/v1/services/ids.json?apikey=XXXXX (I only have one service ID as I have one server, but apparently you could see more.)

  • Get a copy of Node.js. You can put (mt) Stats on your server if you want to access your stats from anywhere, or run it locally on your machine if you prefer. If you haven't got Node already and you're using Linux, there's an installation guide here. If you're running Windows or OSX then you can just download the installer from the Node site.

  • Download (mt) Stats Viewer from Github and run npm install in the folder where you put it to get the packages it needs (list further down for reference).

  • You should now have a copy of mt-stats. Rename the config file node_modules/mt-stats/config/mt-stats-sample.json to mt-stats.json and change the service ID and API key to match your server and key.

  • Rename the config file config/app-sample.json to app.json and change the URL and port. localPort is the internal port on which the service runs and url is the external URL for the service. Also edit gaAccount and gaDomain to match your Google Analytics details if you want to track usage.

  • Run app.js and you should be good to go.

Settings

Please rename app-sample.json to app.json.

  • localPort - Local port on which the app is running
  • url - Public URL for the app
  • mode - development uses uncompressed and (many) separate JavaScript files, while production uses Google's CDN for jQuery
  • title - Page title
  • description - Meta description contents
  • graphRanges - Timespans that are sent to the client for the range slider. Currently 5 mins - 1 week in ms
  • author - Meta author contents
  • jQueryCdnUrl - Yup
  • gaAccount - Your Google Analytics account
  • gaDomain - Your Google Analytics domain

Example

{
	"localPort": 3000,
	"url": "http://bits.meloncholy.com/mt-stats",
	"mode": "production",
	"title": "(mt) Stats",
	"description": "Visualise your MediaTemple stats with some gorgeous D3 graphs.",
	"graphRanges": [
		300000,
		600000,
		900000,
		1200000,
		1500000,
		1800000,
		2700000,
		3600000,
		5400000,
		7200000,
		10800000,
		14400000,
		18000000,
		21600000,
		32400000,
		43200000,
		54000000,
		64800000,
		75600000,
		86400000,
		172800000,
		259200000,
		345600000,
		432000000,
		518400000,
		604800000
	],
	"author": "Andrew Weeks",
	"jQueryCdnUrl": "http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js",
	"gaAccount": "UA-XXXXXXXX-X",
	"gaDomain": "meloncholy.com"
}

Dependencies

Legal fun

Copyright © 2012 Andrew Weeks http://meloncholy.com

(mt) Stats Viewer is licensed under the MIT licence.

Me

I have a website and a Twitter. Please come and say hi if you'd like or if something's not working; be lovely to hear from you.

mt-stats-viewer's People

Contributors

meloncholy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.