专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏

prom/memcached-exporter Docker 镜像 - 轩辕镜像

memcached-exporter
prom/memcached-exporter
Prometheus的Memcached导出器,用于从Memcached服务器收集指标(如连接数、命令统计、内存使用、LRU状态等)并暴露给Prometheus监控,支持多目标采集、TLS和基本认证。
11 收藏0 次下载activeprom镜像
🚀专业版镜像服务,面向生产环境设计
中文简介版本下载
🚀专业版镜像服务,面向生产环境设计

Memcached Exporter for Prometheus

镜像概述和主要用途

Memcached Exporter是Prometheus的官方导出器,用于从Memcached服务器收集性能指标并以Prometheus兼容格式暴露,以便进行监控和告警。该导出器能够采集Memcached的连接状态、命令执行情况、内存使用、LRU缓存行为等关键指标,并通过HTTP接口提供给Prometheus抓取。

核心功能和特性

  • 全面的指标收集:涵盖连接状态、命令统计、内存使用、LRU缓存管理、slab类信息等多维度指标
  • 多目标支持:通过/scrape端点支持多Memcached实例监控,适合大规模部署
  • 安全特性:支持TLS加密和基本认证,保障指标传输安全
  • 进程指标采集:可选采集Memcached进程自身的资源使用情况(CPU、内存、文件描述符等)
  • 灵活配置:支持自定义Memcached连接地址、监听端口及TLS参数

使用场景和适用范围

适用于所有需要监控Memcached服务器运行状态的场景,包括:

  • 生产环境中Memcached缓存服务的性能监控
  • 多Memcached实例集群的集中监控
  • 需要对缓存命中率、内存使用率、连接数等指标进行告警的场景
  • 与Prometheus、Grafana等工具集成构建监控dashboard

使用方法和配置说明

基本运行

通过Docker运行Memcached Exporter,默认监听9150端口,暴露/metrics端点:

sh
docker run -p 9150:9150 quay.io/prometheus/memcached-exporter:latest
连接到指定Memcached服务器

默认连接localhost:***,可通过--memcached.address参数指定目标Memcached地址:

sh
docker run -p 9150:9150 quay.io/prometheus/memcached-exporter:latest --memcached.address=memcached-host:***
多目标采集模式

支持通过/scrape端点采集多个Memcached实例指标,需指定target参数:

sh
curl http://localhost:9150/scrape?target=memcached-host.company.com:***

启动多目标模式时,建议设置--memcached.address=""避免默认连接:

sh
./memcached-exporter --memcached.address=""
Prometheus集成示例(多目标)

结合服务发现工具(如prometheus-elasticache-sd)的Prometheus配置示例:

yaml
scrape_configs:
  - job_name: "memcached_exporter_targets"
    file_sd_configs:
      - files:
          - /path/to/elasticache.json  # 服务发现生成的目标文件
    metrics_path: /scrape
    relabel_configs:
      # 仅保留Memcached实例
      - source_labels: [__meta_elasticache_engine]
        regex: memcached
        action: keep
      # 构建目标参数
      - source_labels: [__meta_elasticache_endpoint_address, __meta_elasticache_endpoint_port]
        separator: ':'
        target_label: __param_target
      # 设置instance标签
      - source_labels: [__param_target]
        target_label: instance
      # 导出器地址
      - target_label: __address__
        replacement: memcached-exporter-service.company.com:9151
TLS和基本认证
导出器自身的TLS和认证

通过--web.config.file参数指定配置文件启用TLS和基本认证,配置文件格式详见exporter-toolkit文档。

与Memcached的TLS连接

使用--memcached.tls.*系列参数配置与Memcached的TLS连接,具体参数可通过memcached_exporter --help查看。

进程指标采集

通过--memcached.pid-file <path>参数指定Memcached进程PID文件,可额外采集进程资源使用指标(需导出器进程有权限读取/proc信息),包括CPU时间、内存使用、文件描述符等。

收集的指标

导出器采集以下Memcached指标(按类型分类):

连接和状态指标
# HELP memcached_accepting_conns The Memcached server is currently accepting new connections.
# TYPE memcached_accepting_conns gauge
# HELP memcached_connections_listener_disabled_total Number of times that memcached has hit its connections limit and disabled its listener.
# TYPE memcached_connections_listener_disabled_total counter
# HELP memcached_connections_total Total number of connections opened since the server started running.
# TYPE memcached_connections_total counter
# HELP memcached_connections_yielded_total Total number of connections yielded running due to hitting the memcached's -R limit.
# TYPE memcached_connections_yielded_total counter
# HELP memcached_current_connections Current number of open connections.
# TYPE memcached_current_connections gauge
# HELP memcached_max_connections Maximum number of clients allowed.
# TYPE memcached_max_connections gauge
命令和请求指标
# HELP memcached_commands_total Total number of all requests broken down by command (get, set, etc.) and status.
# TYPE memcached_commands_total counter
内存和存储指标
# HELP memcached_current_bytes Current number of bytes used to store items.
# TYPE memcached_current_bytes gauge
# HELP memcached_current_items Current number of items stored by this instance.
# TYPE memcached_current_items gauge
# HELP memcached_items_total Total number of items stored during the life of this instance.
# TYPE memcached_items_total counter
# HELP memcached_limit_bytes Number of bytes this server is allowed to use for storage.
# TYPE memcached_limit_bytes gauge
# HELP memcached_malloced_bytes Number of bytes of memory allocated to slab pages.
# TYPE memcached_malloced_bytes gauge
LRU缓存管理指标
# HELP memcached_direct_reclaims_total Times worker threads had to directly reclaim or evict items.
# TYPE memcached_direct_reclaims_total counter
# HELP memcached_items_evicted_total Total number of valid items removed from cache to free memory for new items.
# TYPE memcached_items_evicted_total counter
# HELP memcached_items_reclaimed_total Total number of times an entry was stored using memory from an expired entry.
# TYPE memcached_items_reclaimed_total counter
# HELP memcached_lru_crawler_enabled Whether the LRU crawler is enabled.
# TYPE memcached_lru_crawler_enabled gauge
# HELP memcached_lru_crawler_hot_max_factor Set idle age of HOT LRU to COLD age * this
# TYPE memcached_lru_crawler_hot_max_factor gauge
# HELP memcached_lru_crawler_hot_percent Percent of slab memory reserved for HOT LRU.
# TYPE memcached_lru_crawler_hot_percent gauge
# HELP memcached_lru_crawler_items_checked_total Total items examined by LRU Crawler.
# TYPE memcached_lru_crawler_items_checked_total counter
# HELP memcached_lru_crawler_maintainer_thread Split LRU mode and background threads.
# TYPE memcached_lru_crawler_maintainer_thread gauge
# HELP memcached_lru_crawler_moves_to_cold_total Total number of items moved from HOT/WARM to COLD LRU's.
# TYPE memcached_lru_crawler_moves_to_cold_total counter
# HELP memcached_lru_crawler_moves_to_warm_total Total number of items moved from COLD to WARM LRU.
# TYPE memcached_lru_crawler_moves_to_warm_total counter
# HELP memcached_lru_crawler_moves_within_lru_total Total number of items reshuffled within HOT or WARM LRU's.
# TYPE memcached_lru_crawler_moves_within_lru_total counter
# HELP memcached_lru_crawler_reclaimed_total Total items freed by LRU Crawler.
# TYPE memcached_lru_crawler_reclaimed_total counter
# HELP memcached_lru_crawler_sleep Microseconds to sleep between LRU crawls.
# TYPE memcached_lru_crawler_sleep gauge
# HELP memcached_lru_crawler_starts_total Times an LRU crawler was started.
# TYPE memcached_lru_crawler_starts_total counter
# HELP memcached_lru_crawler_to_crawl Max items to crawl per slab per run.
# TYPE memcached_lru_crawler_to_crawl gauge
# HELP memcached_lru_crawler_warm_max_factor Set idle age of WARM LRU to COLD age * this
# TYPE memcached_lru_crawler_warm_max_factor gauge
# HELP memcached_lru_crawler_warm_percent Percent of slab memory reserved for WARM LRU.
# TYPE memcached_lru_crawler_warm_percent gauge
数据传输指标
# HELP memcached_read_bytes_total Total number of bytes read by this server from network.
# TYPE memcached_read_bytes_total counter
# HELP memcached_written_bytes_total Total number of bytes sent by this server to network.
# TYPE memcached_written_bytes_total counter
服务器信息指标
# HELP memcached_time_seconds current UNIX time according to the server.
# TYPE memcached_time_seconds gauge
# HELP memcached_up Could the memcached server be reached.
# TYPE memcached_up gauge
# HELP memcached_uptime_seconds Number of seconds since the server started.
# TYPE memcached_uptime_seconds counter
# HELP memcached_version The version of this memcached server.
# TYPE memcached_version gauge
Slab类指标
# HELP memcached_slab_chunk_size_bytes Number of bytes allocated to each chunk within this slab class.
# TYPE memcached_slab_chunk_size_bytes gauge
# HELP memcached_slab_chunks_free Number of chunks not yet allocated items.
# TYPE memcached_slab_chunks_free gauge
# HELP memcached_slab_chunks_free_end Number of free chunks at the end of the last allocated page.
# TYPE memcached_slab_chunks_free_end gauge
# HELP memcached_slab_chunks_per_page Number of chunks within a single page for this slab class.
# TYPE memcached_slab_chunks_per_page gauge
# HELP memcached_slab_chunks_used Number of chunks allocated to an item.
# TYPE memcached_slab_chunks_used gauge
# HELP memcached_slab_cold_items Number of items presently stored in the COLD LRU.
# TYPE memcached_slab_cold_items gauge
# HELP memcached_slab_commands_total Total number of all requests broken down by command (get, set, etc.) and status per slab.
# TYPE memcached_slab_commands_total counter
# HELP memcached_slab_current_chunks Number of chunks allocated to this slab class.
# TYPE memcached_slab_current_chunks gauge
# HELP memcached_slab_current_items Number of items currently stored in this slab class.
# TYPE memcached_slab_current_items gauge
# HELP memcached_slab_current_pages Number of pages allocated to this slab class.
# TYPE memcached_slab_current_pages gauge
# HELP memcached_slab_hot_age_seconds Age of the oldest item in HOT LRU.
# TYPE memcached_slab_hot_age_seconds gauge
# HELP memcached_slab_hot_items Number of items presently stored in the HOT LRU.
# TYPE memcached_slab_hot_items gauge
# HELP memcached_slab_items_age_seconds Number of seconds the oldest item has been in the slab class.
# TYPE memcached_slab_items_age_seconds gauge
# HELP memcached_slab_items_crawler_reclaimed_total Number of items freed by the LRU Crawler.
# TYPE memcached_slab_items_crawler_reclaimed_total counter
# HELP memcached_slab_items_evicted_nonzero_total Total number of times an item which had an explicit expire time set had to be evicted from the LRU before it expired.
# TYPE memcached_slab_items_evicted_nonzero_total counter
# HELP memcached_slab_items_evicted_time_seconds Seconds since the last access for the most recent item evicted from this class.
# TYPE memcached_slab_items_evicted_time_seconds counter
# HELP memcached_slab_items_evicted_total Total number of times an item had to be evicted from the LRU before it expired.
# TYPE memcached_slab_items_evicted_total counter
# HELP memcached_slab_items_evicted_unfetched_total Total nmber of items evicted and never fetched.
# TYPE memcached_slab_items_evicted_unfetched_total counter
# HELP memcached_slab_items_expired_unfetched_total Total number of valid items evicted from the LRU which were never touched after being set.
# TYPE memcached_slab_items_expired_unfetched_total counter
# HELP memcached_slab_items_moves_to_cold Number of items moved from HOT or WARM into COLD.
# TYPE memcached_slab_items_moves_to_cold counter
# HELP memcached_slab_items_moves_to_warm Number of items moves from COLD into WARM.
# TYPE memcached_slab_items_moves_to_warm counter
# HELP memcached_slab_items_moves_within_lru Number of times active items were bumped within HOT or WARM.
# TYPE memcached_slab_items_moves_within_lru counter
# HELP memcached_slab_items_outofmemory_total Total number of items for this slab class that have triggered an out of memory error.
# TYPE memcached_slab_items_outofmemory_total counter
# HELP memcached_slab_items_reclaimed_total Total number of items reclaimed.
# TYPE memcached_slab_items_reclaimed_total counter
# HELP memcached_slab_items_tailrepairs_total Total number of times the entries for a particular ID need repairing.
# TYPE memcached_slab_items_tailrepairs_total counter
# HELP memcached_slab_lru_hits_total Number of get_hits to the LRU.
# TYPE memcached_slab_lru_hits_total counter
# HELP memcached_slab_mem_requested_bytes Number of bytes of memory actual items take up within a slab.
# TYPE memcached_slab_mem_requested_bytes counter
# HELP memcached_slab_warm_age_seconds Age of the oldest item in HOT LRU.
# TYPE memcached_slab_warm_age_seconds gauge
# HELP memcached_slab_warm_items Number of items presently stored in the WARM LRU.
# TYPE memcached_slab_warm_items gauge
进程指标(可选)
# HELP memcached_process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE memcached_process_cpu_seconds_total counter
# HELP memcached_process_max_fds Maximum number of open file descriptors.
# TYPE memcached_process_max_fds gauge
# HELP memcached_process_open_fds Number of open file descriptors.
# TYPE memcached_process_open_fds gauge
# HELP memcached_process_resident_memory_bytes Resident memory size in bytes.
# TYPE memcached_process_resident_memory_bytes gauge
# HELP memcached_process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE memcached_process_start_time_seconds gauge
# HELP memcached_process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE memcached_process_virtual_memory_bytes gauge
查看更多 memcached-exporter 相关镜像 →
bitnami/memcached-exporter logo
bitnami/memcached-exporter
by VMware
认证
Bitnami提供的memcached-exporter安全镜像,用于从memcached服务器导出指标供Prometheus监控,基于Photon Linux构建,具备高安全性、低漏洞特性及合规支持。
310M+ pulls
上次更新:9 天前
bitnamilegacy/memcached-exporter logo
bitnamilegacy/memcached-exporter
by bitnamilegacy
Bitnami Legacy镜像(不再更新),包含所有现有容器镜像的备份,仅用于临时迁移目的。
100K+ pulls
上次更新:4 个月前
osism/memcached-exporter logo
osism/memcached-exporter
by osism
暂无描述
1.7K pulls
上次更新:6 年前
memcached logo
memcached
by library
官方
这是一款免费且开源的高性能分布式内存对象缓存系统,主要通过将频繁访问的数据存储在内存中以实现快速数据检索,有效减轻数据库等后端存储的访问压力,提升应用系统的响应速度和整体性能,广泛适用于各类分布式架构环境及高并发业务场景,为开发者提供可靠、高效的数据缓存解决方案。
24211B+ pulls
上次更新:12 天前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
prom/memcached-exporter
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
提交工单
免费获取在线技术支持请 提交工单,官方QQ群:13763429 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
免费获取在线技术支持请提交工单,官方QQ群: 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.
轩辕镜像 官方专业版 Logo
轩辕镜像轩辕镜像官方专业版
首页个人中心搜索镜像
交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 13763429