memory-prometheus-metrics
v1.1.1
Published
Uses memwatch-next to provide memory metrics to a Prometheus server
Downloads
6
Readme
memory-prometheus-metrics
Uses memwatch-next
to monitor the instrumented node.js process and exposes the metrics using https://github.com/ekristen/prometheus-client-js
Usage
Option 1
Provide an existing Prometheus client.
var Prometheus = require('prometheus-client-js')
var client = new Prometheus()
var MemoryMetrics = require('memory-prometheus-metrics')
memoryMetrics(client)
client.createServer().listen()
Option 2
Have memory-prometheus-metrics
instantiate its own Prometheus client.
var MemoryMetrics = require('memory-prometheus-metrics')
var metrics = MemoryMetrics()
metrics.client.createServer.listen()