nodejs-exporter-client
1.0.2 • Public • Published nodejs-exporter-client
Install
npm i nodejs-exporter-client
Example
const reporter = require('nodejs-exporter-client')
const reporter1 = new reporter('http://localhost:9091/pushGateway')
async function test () {
let exampleData = {
'host': 'host01',
'serviceName': 'phm-app-server',
'type': 'reqCounter',
'data': {
'path': '/api1',
'method': 'GET',
'code': '200'
}
}
let res = await reporter1.push(exampleData)
console.log(res)
let res2 = await reporter1.push(JSON.stringify(exampleData))
console.log(res2)
}
Keywords
noneInstall
npm i nodejs-exporter-client
Weekly Downloads