【问题标题】:tcollector not collecting data. TSDB is emptytcollector 不收集数据。 TSDB 为空
【发布时间】:2014-04-15 09:56:11
【问题描述】:

我已成功安装并启动并运行在

http://54.72.4.157:4242/

我在我们的一台服务器上运行 tcollector,我确实在 startstop.sh 中设置了主机

TSD_HOST=54.72.4.157

我做了

./startstop start

运行所有统计信息收集器。甚至注意到在 tsdb 控制台日志中

[id: 0x5fc4bb31, /54.184.79.13:60203 => /172.31.14.125:4242] CONNECTED: /54.184.79.13:60203

在我的 tcollector 节点上,

ps axl | grep tcollector

我可以看到

0     0 16796 16795  20   0 183712  8000 poll_s Sl   ?          2:17 /usr/bin/python /home/mithralaya/tcollector/tcollector.py -c /home/mithralaya/tcollector/collectors -H 54.72.4.157 -t host=ip-172-31-12-203 -P /var/run/tcollector.pid
4 65534 16806 16796  20   0  39864  3748 poll_s Ss   ?          0:08 /usr/bin/python /home/mithralaya/tcollector/collectors/0/procstats.py
4 65534 16808 16796  39  19  39700  3380 poll_s SNs  ?          0:07 /usr/bin/python /home/mithralaya/tcollector/collectors/0/procnettcp.py
4 65534 16816 16796  20   0  39648  3240 poll_s Ss   ?          0:00 /usr/bin/python /home/mithralaya/tcollector/collectors/0/iostat.py
4 65534 16818 16796  20   0  39648  3400 poll_s Ss   ?          0:01 /usr/bin/python /home/mithralaya/tcollector/collectors/0/ifstat.py
4 65534 16822 16796  20   0  41848  3676 poll_s Ss   ?          0:05 /usr/bin/python /home/mithralaya/tcollector/collectors/0/netstat.py
4 65534 16824 16796  20   0  39648  3524 poll_s Ss   ?          0:00 /usr/bin/python /home/mithralaya/tcollector/collectors/0/dfstat.py
0     0 26617 26171  20   0   8108   940 pipe_w S+   pts/0      0:00 grep --color=auto tcollector

我在 /var/log/tcollector 上的 tcollector 日志中看不到任何重大错误。最新日志

2014-04-15 08:59:40,630 tcollector[16796] WARNING: haproxy.py: Error: HAProxy is not running
2014-04-15 08:59:55,090 tcollector[16796] INFO: removing redis-stats.py from the list of collectors (by request)
2014-04-15 08:59:55,091 tcollector[16796] INFO: removing nfsstat.py from the list of collectors (by request)
2014-04-15 08:59:55,091 tcollector[16796] WARNING: collector hbase_master.py terminated after 16 seconds with status code 1, marking dead
2014-04-15 08:59:55,091 tcollector[16796] INFO: removing udp_bridge.py from the list of collectors (by request)
2014-04-15 08:59:55,091 tcollector[16796] INFO: removing elasticsearch.py from the list of collectors (by request)
2014-04-15 08:59:55,092 tcollector[16796] INFO: removing zfsiostats.py from the list of collectors (by request)
2014-04-15 08:59:55,092 tcollector[16796] INFO: removing varnishstat.py from the list of collectors (by request)
2014-04-15 08:59:55,092 tcollector[16796] INFO: removing mongo.py from the list of collectors (by request)
2014-04-15 08:59:55,093 tcollector[16796] INFO: removing couchbase.py from the list of collectors (by request)
2014-04-15 08:59:55,093 tcollector[16796] INFO: removing graphite_bridge.py from the list of collectors (by request)
2014-04-15 08:59:55,093 tcollector[16796] INFO: removing zfskernstats.py from the list of collectors (by request)
2014-04-15 08:59:55,094 tcollector[16796] INFO: removing smart-stats.py from the list of collectors (by request)
2014-04-15 08:59:55,094 tcollector[16796] WARNING: collector mysql.py terminated after 16 seconds with status code 1, marking dead
2014-04-15 08:59:55,094 tcollector[16796] WARNING: collector hbase_regionserver.py terminated after 16 seconds with status code 1, marking dead
2014-04-15 08:59:55,095 tcollector[16796] INFO: removing postgresql.py from the list of collectors (by request)
2014-04-15 08:59:55,095 tcollector[16796] INFO: removing haproxy.py from the list of collectors (by request)
2014-04-15 08:59:55,095 tcollector[16796] INFO: removing riak.py from the list of collectors (by request)
2014-04-15 08:59:55,095 tcollector[16796] INFO: removing zookeeper.py from the list of collectors (by request)
2014-04-15 08:59:55,096 tcollector[16796] INFO: removing opentsdb.sh from the list of collectors (by request)
2014-04-15 09:09:40,651 tcollector[16796] INFO: Heartbeat (6 collectors running)
2014-04-15 09:19:41,217 tcollector[16796] INFO: Heartbeat (6 collectors running)
2014-04-15 09:29:41,794 tcollector[16796] INFO: Heartbeat (6 collectors running)
2014-04-15 09:39:43,586 tcollector[16796] INFO: Heartbeat (6 collectors running)

但是没有收集到任何统计数据。在 hbase 中,tsdb 和 tsdb-uid 都是空的。

hbase(main):002:0> scan 'tsdb'
ROW                                                          COLUMN+CELL                                                                                                                                                                      
0 row(s) in 0.2890 seconds

hbase(main):003:0> 

你也可以在这里看到,

http://54.72.4.157:60010/

如果有人可以帮助我,将不胜感激。

所有基于 Hadoop 的技术都很难安装和配置。我花了一周的时间来解决这个问题,我正在运行 tcollector 24 小时,但 TSDB 中仍然没有数据。

非常感谢,

卡提克

【问题讨论】:

    标签: java logging hbase monitoring opentsdb


    【解决方案1】:

    从日志文件输出看来,实际上没有任何 tcollector 插件在运行。由于错误,它们会生成并在之后立即删除。

    【讨论】:

      【解决方案2】:

      嗯,可能有几个收集器像 procstats.py(它收集 CPU、内存等基本指标)一样运行,我注意到错误日志中没有。

      您没有将数据传输到您的 hbase 可能是因为您的 opentsdb 配置设置为您需要手动创建指标的默认值。如果是这样,那么您必须自己定义指标。

      相反,要创建自动创建的指标,请尝试转到您的 opentsdb 服务器并检查配置并将指标创建设置为自动。

      具体来说,在/etc/opentsdb/opentsdb.conf中,将参数“tsd.core.auto_create_metrics”设置为true,然后重启opentsdb服务。

      然后再次检查你的 hbase,看看你是否可以看到 'tsdb-uid' 中的数据。

      【讨论】:

        【解决方案3】:

        请尝试将conf文件设置为自动创建指标

        # --------- CORE ----------
        # Whether or not to automatically create UIDs for new metric types, default
        # is False
        tsd.core.auto_create_metrics = true
        

        【讨论】:

        • 我们要添加哪个文件名这一行
        猜你喜欢
        • 1970-01-01
        • 2021-11-21
        • 1970-01-01
        • 2014-01-25
        • 1970-01-01
        • 1970-01-01
        • 2016-07-13
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多