docker部署mongodb-exporter

简介: docker部署mongodb-exporter

1.执行docker命令

docker run    --network=host -e MONGODB_URI='mongodb://admin:123456@10.0.42.211:27017/?authSource=admin' bitnami/mongodb-exporter:latest --collect-all --web.listen-address=":9216"

原理

我们在运行 docker 镜像时希望能用下面的命令向容器传递命令行参数

形式一:

docker run <image-name> <command> arg1 arg2
形式二:

docker run <image-name> arg1 arg2

2.验证

http://10.6.8.197:9216/metrics

在这里插入图片描述

3.参考命令

MongoDB Prometheus exporter

Flags:
  -h, --help                     Show context-sensitive help.
      --mongodb.collstats-colls=db1,db2.col2
                                 List of comma separared databases.collections
                                 to get $collStats
      --mongodb.indexstats-colls=db1.col1,db2.col2
                                 List of comma separared databases.collections
                                 to get $indexStats
      --mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true
                                 MongoDB connection URI ($MONGODB_URI)
      --[no-]mongodb.global-conn-pool
                                 Use global connection pool instead of creating
                                 new pool for each http request.
      --[no-]mongodb.direct-connect
                                 Whether or not a direct connect should be made.
                                 Direct connections are not valid if multiple
                                 hosts are specified or an SRV URI is used.
      --web.listen-address=":9216"
                                 Address to listen on for web interface and
                                 telemetry
      --web.telemetry-path="/metrics"
                                 Metrics expose path
      --web.config=STRING        Path to the file having Prometheus TLS config
                                 for basic auth
      --log.level="error"        Only log messages with the given severity or
                                 above. Valid levels: [debug, info, warn, error,
                                 fatal]
      --collector.diagnosticdata
                                 Enable collecting metrics from
                                 getDiagnosticData
      --collector.replicasetstatus
                                 Enable collecting metrics from replSetGetStatus
      --collector.dbstats        Enable collecting metrics from dbStats
      --collector.topmetrics     Enable collecting metrics from top admin
                                 command
      --collector.indexstats     Enable collecting metrics from $indexStats
      --collector.collstats      Enable collecting metrics from $collStats
      --metrics.overridedescendingindex
                                 Enable descending index name override to
                                 replace -1 with _DESC
      --collect-all              Enable all collectors. Same as specifying all
                                 --collector.<name>
      --collector.collstats-limit=0
                                 Disable collstats, dbstats, topmetrics and
                                 indexstats collector if there are more than <n>
                                 collections. 0=No limit
      --[no-]discovering-mode    Enable autodiscover collections
      --[no-]compatible-mode     Enable old mongodb-exporter compatible metrics
      --version                  Show version and exit
相关文章
|
4月前
|
应用服务中间件 网络安全 nginx
手把手教你使用 Docker 部署 Nginx 教程
本文详解Nginx核心功能与Docker部署优势,涵盖镜像拉取、容器化部署(快速、挂载、Compose)、HTTPS配置及常见问题处理,助力高效搭建稳定Web服务。
1704 4
|
5月前
|
JavaScript 算法 前端开发
【Docker项目实战】使用Docker部署paopao-ce微社区
【Docker项目实战】使用Docker部署paopao-ce微社区
464 84
【Docker项目实战】使用Docker部署paopao-ce微社区
|
4月前
|
应用服务中间件 Linux nginx
在虚拟机Docker环境下部署Nginx的步骤。
以上就是在Docker环境下部署Nginx的步骤。需要注意,Docker和Nginix都有很多高级用法和细节需要掌握,以上只是一个基础入门级别的教程。如果你想要更深入地学习和使用它们,请参考官方文档或者其他专业书籍。
205 5
|
5月前
|
存储 Docker Python
docker 部署 sftp
本文介绍SFTP服务的部署与配置,包括users.conf用户配置规则、Docker容器运行命令及上传目录权限说明,重点解析atmoz/sftp镜像的chroot机制与子目录映射,确保用户登录后正确访问/upload目录,并提供Python脚本实现文件上传示例。
459 12
docker 部署 sftp
|
5月前
|
运维 Linux 数据库
基于 Docker 部署 n8n 指南,新手一看就会
本教程详解如何通过 Docker 快速部署开源自动化工具 n8n,适合新手快速上手。内容涵盖官方部署步骤、常见难点及第三方一键部署方案,助你高效搭建自动化工作流平台。
1840 6
|
4月前
|
存储 NoSQL Redis
手把手教你用 Docker 部署 Redis
Redis是高性能内存数据库,支持多种数据结构,适用于缓存、消息队列等场景。本文介绍如何通过Docker快速拉取轩辕镜像并部署Redis,涵盖快速启动、持久化存储及docker-compose配置,助力开发者高效搭建稳定服务。
1243 7
|
4月前
|
存储 搜索推荐 数据库
🚀 RAGFlow Docker 部署全流程教程
RAGFlow是开源的下一代RAG系统,融合向量数据库与大模型,支持全文检索、插件化引擎切换,适用于企业知识库、智能客服等场景。支持Docker一键部署,提供轻量与完整版本,助力高效搭建私有化AI问答平台。
2999 8
|
4月前
|
存储 关系型数据库 MySQL
MySQL Docker 容器化部署全指南
MySQL是一款开源关系型数据库,广泛用于Web及企业应用。Docker容器化部署可解决环境不一致、依赖冲突问题,实现高效、隔离、轻量的MySQL服务运行,支持数据持久化与快速迁移,适用于开发、测试及生产环境。
731 4
|
5月前
|
前端开发 JavaScript 应用服务中间件
在Docker部署的前端应用中使用动态环境变量
以上步骤展示了如何在 Docker 配置过程中处理并注入环墨遁形成可执行操作流程,并确保最终用户能够无缝地与之交互而无须关心背后复杂性。
262 13