AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 799571
Accepted
Hendy Irawan
Hendy Irawan
Asked: 2016-08-28 23:00:02 +0800 CST2016-08-28 23:00:02 +0800 CST 2016-08-28 23:00:02 +0800 CST

在 Google Compute Engine 中使用 Stackdriver 监控 MongoDB 3.2 静默失败

  • 772

截至 2016 年 8 月 28 日,我在使用 Stackdriver 监控 MongoDB 3.2 时遇到问题。

没有提到mongo任何内容,/var/log/syslog但如果我在文件上犯了配置错误.conf,它会抱怨,所以我知道它正在正确加载文件......

所以没有错误,但mongo没有提及https://app.google.stackdriver.com/services/mongodb声称我没有安装代理。/var/log/syslog

gke-fatih-standard-fb894cbb-d7ue:/opt/stackdriver/collectd/etc$ sudo service stackdriver-agent restart
[....] Restarting Stackdriver metrics collection agent: stackdriver-agentoption = Interval; value = 60.000000;
Created new plugin context.
option = Interval; value = 60.000000;
Created new plugin context.
option = PIDFile; value = /var/run/stackdriver-agent.pid;
option = Interval; value = 60.000000;
Created new plugin context.
. ok

$ tail -F /var/log/syslog
Aug 28 06:53:01 gke-fatih-standard-fb894cbb-d7ue /USR/SBIN/CRON[21824]: (root) CMD (/etc/supervisor/supervisor_watcher.sh 2>&1 | logger)
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21844]: type = syslog, key = LogLevel, value = info
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21844]: write_gcm: inside module_register for stackdriver_agent/5.5.0-340.wheezy
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21845]: type = syslog, key = LogLevel, value = info
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21845]: write_gcm: inside module_register for stackdriver_agent/5.5.0-340.wheezy
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: Initialization complete, entering read-loop.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: match_throttle_metadata_keys: 1 history entries, 1 distinct keys, 78 bytes server memory.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: tcpconns plugin: Reading from netlink succeeded. Will use the netlink method from now on.
Aug 28 06:53:03 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: write_gcm: Asking metadata server for auth token
Aug 28 06:53:04 gke-fatih-standard-fb894cbb-d7ue collectd[21846]: match_throttle_metadata_keys: 2 history entries, 1025 distinct keys, 102801 bytes server memory.

请注意,实例/节点被正确监控,只有 MongoDB 有问题。

/opt/stackdriver/collectd/etc/collect.d/mongo0.conf:

# scheduled to node: gke-fatih-standard-fb894cbb-d7ue
# This is the monitoring configuration for MongoDB.
# Look for STATS_USER, STATS_PASS, MONGODB_HOST and MONGODB_PORT to adjust your configuration file.
LoadPlugin mongodb
<Plugin "mongodb">
    # When using non-standard MongoDB configurations, replace the below with
    #Host "MONGODB_HOST"
    #Port "MONGODB_PORT"
    # Must use the load balancer because we don't know the fixed nodePort
    Host "xxx"
    Port "27017"

    # If you restricted access to the database, you can set the username and
    # password here:
    User "stats"
    Password "xxx"
</Plugin>

与在 GCE 中使用 StackDriver 监控 MongoDB 3相关

monitoring google-cloud-platform google-compute-engine kubernetes mongodb
  • 2 2 个回答
  • 358 Views

2 个回答

  • Voted
  1. Hendy Irawan
    2016-08-28T23:00:02+08:002016-08-28T23:00:02+08:00

    再做sudo service stackdriver-agent restart一次(我以前做过)和大约 30 分钟的原始事件之后,现在 Stackdriver 检测到这些指标。

    因此,如果您确定一切正确且没有错误,您可以尝试stackdriver-agent多次重启并等待约 30 分钟。

    缺乏任何mongo相关的东西/var/log/syslog是一个问题。我希望@Corey-Kosak 可以提供更多信息。

    • 1
  2. Best Answer
    Simon Moses
    2019-09-14T05:26:27+08:002019-09-14T05:26:27+08:00

    谷歌正在弃用他们专注于非 GCP 的 Stackdriver 集成(如 Mongo),并转向 BindPlane MIaaS 平台作为他们支持的非 GCP 数据源监控集成平台。

    更多详情可在这找到:

    https://cloud.google.com/monitoring/agent/plugins/bindplane-transition

    和这里:

    https://bluemedora.com/how-to-monitor-mongodb-bindplane-for-stackdriver-blue-medora/

    • 1

相关问题

  • 如何监控系统在哪里写/读磁盘?[关闭]

  • 如何监控 SAN 服务器(通过 iSCSI)?

  • 共享点管理?

  • 安全地授予对 SQL 2005 复制监视器的访问权限以创建快照

  • SNMP HOSTMIB.MIB 未加载?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve