Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
NodeJS module to send metrics TDMetrics.
JavaScript
tag: 0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
TDMetrics.js
package.json
test.js

README.md

TDMetrics - NodeJS Wrapper

NodeJS module to send metrics to TotenDev's Metrics

Build Status

Requirements

Installation

Install with npm some dependencies

$ npm install

Configuration

All configuration need to be done in package.json file.

  • metrics.host - Metrics server host . REQUIRED IF ENABLED
  • metrics.port - Metrics server port . REQUIRED IF ENABLED
  • metrics.path - Metrics server path. (Use if you know what you doing) OPTIONAL
  • metrics.projectID - TDMetrics ProjectID parameter. REQUIRED IF ENABLED
  • metrics.auth - TDMetrics authentication. REQUIRED IF ENABLED

Usage

var Metrics = require('./TDMetrics.js');
//metricString,statusCode,typeString,placeString,callback
Metrics("Status 202","202","Info","/index.html",function (resp,ok) { 
    if (ok) { console.log("Success"); }
    else { console.log("Error: " + resp); }
});

If you don't know what this parameters are please read How it works.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

GPL v3

Something went wrong with that request. Please try again.