Logging 显示无效行
我在我的石墨日志中看到很多这样的行:Logging 显示无效行,logging,graphite,Logging,Graphite,我在我的石墨日志中看到很多这样的行: 01/10/2014 21:07:12 :: [listener] invalid line received from client HOST:PORT, ignoring 如果我能看到那条无效的线,那将大有帮助。一些文档和教程建议graphite将在无效警告后直接打印有问题的行,但对我来说不是这样。如何启用此属性 谢谢。所以我试图解决这一问题完全是一个难题,但它对我有效 台阶 在第75行编辑protocol.py(/opt/graphite/lib/
01/10/2014 21:07:12 :: [listener] invalid line received from client HOST:PORT, ignoring
如果我能看到那条无效的线,那将大有帮助。一些文档和教程建议graphite将在无效警告后直接打印有问题的行,但对我来说不是这样。如何启用此属性
谢谢。所以我试图解决这一问题完全是一个难题,但它对我有效 台阶
- 在第75行编辑protocol.py(
),并添加额外的日志行/opt/graphite/lib/carbon/protocols.py
- 在调试模式下重新启动守护程序
/usr/bin/python/opt/graphite/bin/carbon-cache.py--pid/opt/graphite/storage/carbon-cache-a.pid--debug start
- 找到问题度量并修复
- 将更改恢复为
protocol.py
- 作为守护进程重新启动碳缓存
class MetricLineReceiver(MetricReceiver, LineOnlyReceiver):
delimiter = '\n'
def lineReceived(self, line):
try:
metric, value, timestamp = line.strip().split()
datapoint = (float(timestamp), float(value))
except:
log.listener('invalid line received from client %s, ignoring' % self.peerName )
return
self.metricReceived(metric, datapoint)
class MetricLineReceiver(MetricReceiver, LineOnlyReceiver):
delimiter = '\n'
def lineReceived(self, line):
try:
metric, value, timestamp = line.strip().split()
datapoint = (float(timestamp), float(value))
except:
log.listener('invalid line received from client %s, ignoring' % self.peerName )
log.listener('invalid line - [ %s ]' % line)
return
self.metricReceived(metric, datapoint)