# memory-prometheus-metrics

> Uses memwatch-next to provide memory metrics to a Prometheus server

Latest version **1.1.1** (published 2015-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install memory-prometheus-metrics
pnpm add memory-prometheus-metrics
yarn add memory-prometheus-metrics
bun add memory-prometheus-metrics
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2015-12-07 |
| First published | 2015-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Erik Kristensen |
| Maintainers | ekristen |

## Links

- npm: https://www.npmjs.com/package/memory-prometheus-metrics
- Repository: https://github.com/ekristen/memory-prometheus-metrics
- Homepage: https://github.com/ekristen/memory-prometheus-metrics#readme
- Issues: https://github.com/ekristen/memory-prometheus-metrics/issues
- npm.io page: https://npm.io/package/memory-prometheus-metrics

## Dependencies (2)

- [memwatch-next](https://npm.io/package/memwatch-next.md) ^0.2.9
- [prometheus-client-js](https://npm.io/package/prometheus-client-js.md) ^2.3.0

## Recent versions

- 1.1.1 (latest) — 2015-12-07
- 1.1.0 — 2015-10-30
- 1.0.0 — 2015-10-30

## 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()
```

---
_Source: https://npm.io/package/memory-prometheus-metrics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
