0.0.7 • Published 5 years ago
@telemetry-js/collector-redis v0.0.7
collector-redis
Collect Redis metrics.
Atelemetry
plugin.
Table of Contents
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
andcommand
, 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.
License
MIT © Vincent Weevers
0.0.7
5 years ago