xpm-metrics-graylog
v0.0.1
Published
The Metrics module for logging (node.js > 4.*). Uses [graylog2](https://www.npmjs.com/package/graylog2)
Downloads
5
Readme
Metrics module for Graylog
The Metrics module for logging (node.js > 4.*). Uses graylog2
For example log response time from Google
const Metrics = require('xpm-metrics-graylog');
const metrics = new Metrics({
servers: [
{
host: 'www.xpm.tech',
port: 12201
}
],
hostname: 'example.host'
});
const request = require('request-promise');
const params = {
uri: 'https://www.google.com',
resolveWithFullResponse: true,
time: true
};
request(params)
.then((res) => metrics.logTime('google_response', res.elapsedTime, 'test'));