docker部署mongodb-exporter

本文涉及的产品
云数据库 MongoDB,独享型 2核8GB
推荐场景:
构建全方位客户视图
简介: 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
相关文章
|
2月前
|
Kubernetes Docker Python
Docker 与 Kubernetes 容器化部署核心技术及企业级应用实践全方案解析
本文详解Docker与Kubernetes容器化技术,涵盖概念原理、环境搭建、镜像构建、应用部署及监控扩展,助你掌握企业级容器化方案,提升应用开发与运维效率。
473 108
|
2月前
|
运维 Devops 持续交付
揭秘 Docker 自动部署神器 Websoft9:热门开源软件一键部署
在企业IT建设中,软件部署常面临效率低、易出错等问题。通过Docker与自动化工具,可实现高效、标准化和可追溯的部署流程,提升企业应用交付效率,降低运维门槛,助力中小企业实现自动化部署。
160 5
揭秘 Docker 自动部署神器 Websoft9:热门开源软件一键部署
|
27天前
|
JavaScript 算法 前端开发
【Docker项目实战】使用Docker部署paopao-ce微社区
【Docker项目实战】使用Docker部署paopao-ce微社区
210 84
【Docker项目实战】使用Docker部署paopao-ce微社区
|
2月前
|
运维 Cloud Native 开发者
Docker:现代化应用开发与部署的神器
Docker:现代化应用开发与部署的神器
186 101
|
2月前
|
设计模式 Linux 开发工具
Docker部署会吗?
本段内容主要介绍了Docker常用命令、Linux基础指令及日志查看方法,还涉及SpringMVC的执行流程、设计模式与注解,适合用于面试中技术能力的展示。
91 0
|
18天前
|
存储 Docker Python
docker 部署 sftp
本文介绍SFTP服务的部署与配置,包括users.conf用户配置规则、Docker容器运行命令及上传目录权限说明,重点解析atmoz/sftp镜像的chroot机制与子目录映射,确保用户登录后正确访问/upload目录,并提供Python脚本实现文件上传示例。
68 12
docker 部署 sftp
|
19天前
|
运维 Linux 数据库
基于 Docker 部署 n8n 指南,新手一看就会
本教程详解如何通过 Docker 快速部署开源自动化工具 n8n,适合新手快速上手。内容涵盖官方部署步骤、常见难点及第三方一键部署方案,助你高效搭建自动化工作流平台。
329 6
|
26天前
|
前端开发 JavaScript 应用服务中间件
在Docker部署的前端应用中使用动态环境变量
以上步骤展示了如何在 Docker 配置过程中处理并注入环墨遁形成可执行操作流程,并确保最终用户能够无缝地与之交互而无须关心背后复杂性。
85 13
|
29天前
|
存储 Kubernetes 持续交付
为什么Docker容器化改变了开发与部署?
为什么Docker容器化改变了开发与部署?
|
2月前
|
关系型数据库 MySQL 数据库
为什么 MySQL 不推荐用 Docker 部署?
本文探讨了MySQL是否适合容器化的问题,分析了Docker容器在数据安全、性能瓶颈、状态管理及资源隔离等方面的挑战,并指出目前主流分布式数据库如TDSQL和OceanBase仍倾向于部署在物理机或KVM上。
123 0