删除/空石墨耳语文件自动重新生成(Deleted/Empty Graphite Whisper Fi

2019-08-17 18:13发布

我想删除一些旧的石墨测试耳语指标没有任何成功。 我可以通过删除文件删除的指标。 (参见: 如何清理石墨耳语的数据? )但是,吹散他们重新生成的文件在几秒钟内(它们是空的指标,并保持下去,因为没有什么是这些文件中创建新的指标)。 我试图删除文件之前停止碳(carbon-cache.py停止),但是当我重新启动碳(carbon-cache.py --debug启动&),他们刚刚回来。

我要如何永久删除这些文件/ metics所以他们再也不会回来?

Answer 1:

你运行statsd或类似的东西?

我有同样的问题,这是因为statsd被刷新它在内存中有后,我删除了耳语文件柜。 我回收statsd和文件现在保持删除。

希望这可以帮助



Answer 2:

By default, Statsd will continue to send 0 for counters it hasn't received in the previous flush period. This causes carbon to recreate the file.

Lets say we want to delete a counter called 'bad_metrics.sent' from Statsd. You can use the Statsd admin interface running on port 8126 by default:

$ telnet <server-ip> 8126
Trying <server-ip>...
Connected to <server-name>.
Escape character is '^]'.

Use 'help' to get a list of commands:

help
Commands: stats, counters, timers, gauges, delcounters, deltimers, delgauges, quit

You can use 'counters' to see a list of all counters:

counters
{ 'statsd.bad_lines_seen': 0,
  'statsd.packets_received': 0,
  'bad_metrics.sent': 0 }
END

Its the 'delcounters', 'deltimers', and 'delgauges' commands that remove metrics from statsd:

delcounters bad_metrics.sent
deleted: bad_metrics.sent
END

After removing the metric from Statsd, you can remove the whisper file associated with it. In this example case, that would be:

/opt/graphite/storage/whisper/bad_metrics/sent.wsp

or (in Ubuntu):

/var/lib/graphite/whisper/bad_metrics/sent.wsp


Answer 3:

最新版本StatsD有一个选择不发送后冲水零了,但只有什么是真正发送给它。 如果你把一个耳语文件不应该获得重建: https://github.com/etsy/statsd/blob/master/exampleConfig.js#L39



Answer 4:

我们没有运行statsd ,但我们确实运行carbon-aggregator ,供应类似的目的。 重新启动它解决了类似的问题。



文章来源: Deleted/Empty Graphite Whisper Files Automatically Re-Generating