OpenTelemetry Bot d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 年間 前
..
internal dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
testdata 175bb59ae6 [receiver/redis] Add username parameter for connecting to redis (#24408) 1 年間 前
Makefile 7fd9a76912 Redis receiver (#138) 4 年 前
README.md 562dc48d10 Link component issue badges to the respective issue page (#24642) 1 年間 前
client.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
client_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
config.go dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
config.md 175bb59ae6 [receiver/redis] Add username parameter for connecting to redis (#24408) 1 年間 前
config_test.go 175bb59ae6 [receiver/redis] Add username parameter for connecting to redis (#24408) 1 年間 前
doc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
documentation.md dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
factory.go 9161ab2e93 [chore] more linting fixes (#22979) 1 年間 前
go.mod d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 年間 前
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 年間 前
info.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
info_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
integration_test.go dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
keyspace.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
keyspace_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
latencystats.go aadfba732f [receiver/redis] Command latency metrics. (#26569) 1 年間 前
latencystats_test.go aadfba732f [receiver/redis] Command latency metrics. (#26569) 1 年間 前
metadata.yaml dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
metric_functions.go f4c44858b5 [all][chore] Moved from interface{} to any for all go code (#29072) 1 年間 前
metric_functions_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
redis_scraper.go dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
redis_scraper_test.go dbdb683404 [receiver/redis] include server.address and server.port resource attributes (#26707) 1 年間 前
redis_svc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前
redis_svc_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 年間 前

README.md

Redis Receiver

Status
Stability beta: metrics
Distributions contrib, observiq, splunk, sumo
Issues Open issues Closed issues
Code Owners @dmitryax, @hughesjj

The Redis receiver is designed to retrieve Redis INFO data from a single Redis instance, build metrics from that data, and send them to the next consumer at a configurable interval.

Details

The Redis INFO command returns information and statistics about a Redis server (see https://redis.io/commands/info for details). The Redis receiver extracts values from the result and converts them to open telemetry metrics. Details about the metrics produced by the Redis receiver can be found by browsing metric_functions.go.

For example, one of the fields returned by the Redis INFO command is used_cpu_sys which indicates the system CPU consumed by the Redis server, expressed in seconds, since the start of the Redis instance.

The Redis receiver turns this data into a gauge...

func usedCPUSys() *redisMetric {
	return &redisMetric{
		key:    "used_cpu_sys",
		name:   "redis.cpu.time",
		units:  "s",
		mdType: metricspb.MetricDescriptor_GAUGE_DOUBLE,
		labels: map[string]string{"state": "sys"},
	}
}

with a metric name of redis.cpu.time and a units value of s (seconds).

Configuration

:information_source: This receiver is in beta and configuration fields are subject to change.

The following settings are required:

  • endpoint (no default): The hostname and port of the Redis instance, separated by a colon.

The following settings are optional:

  • collection_interval (default = 10s): This receiver runs on an interval. Each time it runs, it queries Redis, creates metrics, and sends them to the next consumer. The collection_interval configuration option tells this receiver the duration between runs. This value must be a string readable by Golang's ParseDuration function (example: 1h30m). Valid time units are ns, us (or µs), ms, s, m, h.
  • password (no default): The password used to access the Redis instance; must match the password specified in the requirepass server configuration option.
  • transport (default = tcp) Defines the network to use for connecting to the server. Valid Values are tcp or Unix
  • tls:
    • insecure (default = true): whether to disable client transport security for the exporter's connection.
    • ca_file: path to the CA cert. For a client this verifies the server certificate. Should only be used if insecure is set to false.
    • cert_file: path to the TLS cert to use for TLS required connections. Should only be used if insecure is set to false.
    • key_file: path to the TLS key to use for TLS required connections. Should only be used if insecure is set to false.

Example:

receivers:
  redis:
    endpoint: "localhost:6379"
    collection_interval: 10s
    password: ${env:REDIS_PASSWORD}

:information_source: As with all Open Telemetry configuration values, a reference to an environment variable is supported. For example, to pick up the value of an environment variable REDIS_PASSWORD, you could use a configuration like the following:

receivers:
  redis:
    endpoint: "localhost:6379"
    collection_interval: 10s
    password: ${env:REDIS_PASSWORD}

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.