SPM Agent Framework for Node.js
Functionality
- Sender interface to SPM backend receivers
- Buffering metrics to disk in case of network outages (using NeDB)
- Limit the file size of buffers
- Reconnect after failures
- Logging functions
- Configuration handling
- Pluggable agents
Example to implement a monitoring agent:
var SpmAgent = require('spm-agent')
var client = new SpmAgent()
var testAgent = client.createAgent(new SpmAgent.Agent ({
start: function (agent) {
this.tid = setInterval(function () {
agent.addMetrics({name: 'test-app', value: [1, 2, 3]})
}, client.config.collectionInterval)
}
}))
testAgent.on ('metrics', console.log)
Let us know about monitoring agents you need, maybe you like to contribute with your domain expertise!
Related Modules
Please check spm-metrics-js to ship your application specific metrics to SPM.