Memcached Receiver
contrib
Maintainers: @jsirianni
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Configuration
The following settings are required:endpoint(default:localhost:11211): The hostname/IP address and port or, unix socket file path of the memcached instancetransport(default: no default): Known protocols are “tcp”, “tcp4” (IPv4-only), “tcp6” (IPv6-only), “udp”, “udp4” (IPv4-only), “udp6” (IPv6-only), “ip”, “ip4” (IPv4-only), “ip6” (IPv6-only), “unix”, “unixgram” and “unixpacket”.
collection_interval(default =10s): This receiver runs on an interval. Each time it runs, it queries memcached, creates metrics, and sends them to the next consumer. Thecollection_intervalconfiguration option tells this receiver the duration between runs. This value must be a string readable by Golang’sParseDurationfunction (example:1h30m). Valid time units arens,us(orµs),ms,s,m,h.initial_delay(default =1s): defines how long this receiver waits before starting.
Metrics
Details about the metrics produced by this receiver can be found in metadata.yaml with further documentation in documentation.mdMetrics
| Metric Name | Description | Unit | Type | Attributes |
|---|---|---|---|---|
✅ memcached.bytes | Current number of bytes used by this server to store items. | By | Gauge | |
✅ memcached.commands | Commands executed. | {commands} | Counter | command |
✅ memcached.connections.current | The current number of open connections. | {connections} | UpDownCounter | |
✅ memcached.connections.total | Total number of connections opened since the server started running. | {connections} | Counter | |
✅ memcached.cpu.usage | Accumulated user and system time. | s | Counter | state |
✅ memcached.current_items | Number of items currently stored in the cache. | {items} | UpDownCounter | |
✅ memcached.evictions | Cache item evictions. | {evictions} | Counter | |
✅ memcached.network | Bytes transferred over the network. | by | Counter | direction |
✅ memcached.operation_hit_ratio | Hit ratio for operations, expressed as a percentage value between 0.0 and 100.0. | % | Gauge | operation |
✅ memcached.operations | Operation counts. | {operations} | Counter | type, operation |
✅ memcached.threads | Number of threads used by the memcached instance. | {threads} | UpDownCounter |
Attributes
| Attribute Name | Description | Type | Values |
|---|---|---|---|
command | The type of command. | string | get, set, flush, touch |
direction | Direction of data flow. | string | sent, received |
operation | The type of operation. | string | increment, decrement, get |
state | The type of CPU usage. | string | system, user |
type | Result of cache request. | string | hit, miss |
Configuration
Example Configuration
Last generated: 2026-04-13