> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Memcached

> Memcached cache, operation, and connection metrics.

The Memcached integration requires CXDOT Collector 1.4.0 or greater.

[Memcached](https://memcached.org/) is a distributed memory object caching system. Use
the Memcached integration with the Chronosphere XDOT Collector to collect cache, operation,
and connection metrics from Memcached servers running in your environment.

The Memcached integration supports Memcached 1.6 or greater.

## Supported telemetry types

The Memcached integration supports these telemetry types:

| Type    | Supported |
| ------- | --------- |
| Logs    | No        |
| Metrics | Yes       |
| Traces  | No        |
| Events  | No        |

## Prerequisites

The Memcached integration has the following prerequisites:

* A Memcached server that listens on a TCP port the collector can reach. Unix domain
  sockets aren't supported.
* A Memcached server that accepts unauthenticated connections. The integration uses
  the plain-text `stats` command and doesn't support servers that require Simple
  Authentication and Security Layer (SASL) authentication.

## Configure

To configure the Memcached integration, follow these steps:

1. For Memcached pods that listen on port `11211`, add the
   `app.kubernetes.io/name: memcached` label to the pod template. For other instances,
   provide the server address and port through autodiscovery annotations.

   For more information, see
   [autodiscovery](https://docs.chronosphere.io/ingest/cxdot-collector/autodiscovery).

2. Optional: Configure static targets for Memcached servers that autodiscovery doesn't
   reach. For example, add the following to the `values.yaml` for your Helm chart:

   ```yaml theme={null}
   config:
     integrations:
       memcached:
         endpoints:
           - endpoint: memcached.example.com:11211
   ```

### Validate

To validate the Memcached integration, follow these steps:

1. In the Live Telemetry Analyzer, filter for
   `cxdot.integration.name=memcached`. Confirm that the Memcached metric names appear.

2. In Metrics Explorer, run the following query:

   ```text theme={null}
   count by ("server.address", "server.port") ({"memcached.uptime"})
   ```

   Confirm that the query returns the expected time series for each target.

For more information about diagnosing a failing integration, see
[Troubleshooting](https://docs.chronosphere.io/ingest/cxdot-collector/troubleshooting).

## Configuration reference

Configure one Memcached integration instance with the following settings. In Helm values, place
these settings under `config.integrations.memcached`. In a Collector configuration file, place
them under `cxdot.integrations.memcached`.

### Optional settings

* **`enabled`**
  Type: `boolean`. Optional. Default: `true`.
  Whether to run the Memcached integration. If true, the Collector collects Memcached metrics.
  If false, the Collector doesn't run this integration.

* **`endpoints`**
  Type: `array of object`. Optional.
  Static Memcached targets. Each entry's `endpoint` is `host:port`, for example,
  `memcached.default.svc:11211`. When this list isn't empty, the integration collects from
  exactly these targets instead of discovered targets. The integration uses the plain-text
  `stats` command and doesn't support servers that require authentication.

* **`endpoints[].endpoint`**
  Type: `string`. Required.
  Memcached target in `host:port` format.

* **`collection_interval`**
  Type: `duration`. Optional. Default: `10s`.
  Time between metric collections from each Memcached target.

* **`timeout`**
  Type: `duration`. Optional. Default: `10s`.
  Maximum time to wait for each Memcached metric collection.
