A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver below:

redisreceiver package - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver - Go Packages

Redis Receiver

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

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

The following settings are required:

The following settings are optional:

Example:

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

ℹ 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 in config.go with detailed sample configurations in testdata/config.yaml.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4