show graphite invalid lines

I see lots of lines like this in my graphite logs:

01/10/2014 21:07:12 :: [listener] invalid line received from client HOST:PORT, ignoring

It would greatly help if I could see the invalid line. Some documentation and tutorials suggest graphite would print the offending line directly after the invalid warning, but for me it doesn't. How can I enable this property?

Thanks.

Answer1:

So my attempt to troubleshoot this was a total hack but it worked for me.

Steps

    <li>Edit protocol.py (/opt/graphite/lib/carbon/protocols.py on line 75 and add an additional log line</li> </ul> Before: 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) After: 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)
      <li>

      restart daemon in debug mode

      /usr/bin/python /opt/graphite/bin/carbon-cache.py --pid /opt/graphite/storage/carbon-cache-a.pid --debug start

      </li> <li>find problem metric and fix</li> <li>revert change to protocol.py</li> <li>restart carbon-cache as daemon </li> </ul>

      By doing this I was able to see exactly which metric was causing me grief and address it.

      Hope that helps!

      人吐槽 人点赞

Recommend

Comment

用户名: 密码:
验证码: 匿名发表

你可以使用这些语言

查看评论:show graphite invalid lines