Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekristen/memory-prometheus-metrics
Uses memwatch-next to provide memory metrics to a Prometheus server
https://github.com/ekristen/memory-prometheus-metrics
Last synced: 1 day ago
JSON representation
Uses memwatch-next to provide memory metrics to a Prometheus server
- Host: GitHub
- URL: https://github.com/ekristen/memory-prometheus-metrics
- Owner: ekristen
- License: mit
- Created: 2015-10-30T20:22:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-07T15:53:30.000Z (about 9 years ago)
- Last Synced: 2025-01-11T21:42:47.184Z (6 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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.
```javascript
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.
```javascript
var MemoryMetrics = require('memory-prometheus-metrics')var metrics = MemoryMetrics()
metrics.client.createServer.listen()
```