项目作者: telemetry-js

项目描述 :
Collect Redis metrics.
高级语言: JavaScript
项目地址: git://github.com/telemetry-js/collector-redis.git
创建时间: 2020-12-08T14:00:59Z
项目社区:https://github.com/telemetry-js/collector-redis

开源协议:MIT License

下载


collector-redis

Collect Redis metrics.
A telemetry plugin.

@telemetry-js/collector-redis"">npm status
@telemetry-js/collector-redis"">node
Test
JavaScript Style Guide

Table of Contents

Click to expand

- Usage
- Options
- Install
- Acknowledgements
- License

Usage

  1. const telemetry = require('@telemetry-js/telemetry')()
  2. const redis = require('@telemetry-js/collector-redis')
  3. telemetry.task()
  4. .collect(redis, {
  5. connection: {
  6. host: 'example.com',
  7. port: 6379,
  8. password: 'abc'
  9. },
  10. tags: {
  11. name: 'myapp-production'
  12. }
  13. })

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:

  1. npm install @telemetry-js/collector-redis

Acknowledgements

This project is kindly sponsored by Reason Cybersecurity Ltd.

reason logo

License

MIT © Vincent Weevers