JSPM

@telemetry-js/collector-redis

0.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q19966F
  • License MIT

Collect Redis metrics

Package Exports

  • @telemetry-js/collector-redis

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@telemetry-js/collector-redis) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

collector-redis

Collect Redis metrics.
A telemetry plugin.

npm status node Test JavaScript Style Guide

Table of Contents

Click to expand

Usage

const telemetry = require('@telemetry-js/telemetry')()
const redis = require('@telemetry-js/collector-redis')

telemetry.task()
  .collect(redis, {
    connection: {
      host: 'example.com',
      port: 6379,
      password: 'abc'
    },
    tags: {
      name: 'myapp-production'
    }
  })

To collect metrics from multiple Redis hosts, repeat the .collect call. By default, all metrics will be tagged with host to differentiate hosts. It is recommended that you add more meaningful tags (like name) through the tags option.

Options

  • connection: required, object in the form of { host, port, password }
  • tags: optional, object. Note that some metrics (database.*, command.*) have their own tags (db and command, respectively), taking precedence over your tags.
  • metrics: optional array of metric names to include. Supports wildcards, e.g. { metrics: ['telemetry.redis.command.*']'. By default, all metrics are included.

Install

With npm do:

npm install @telemetry-js/collector-redis

Acknowledgements

This project is kindly sponsored by Reason Cybersecurity Ltd.

reason logo

License

MIT © Vincent Weevers