石墨。一些指标丢失,但在 tcpdump 中看到

Graphite. Some metrics lost, but seen in tcpdump

我使用 Graphite 已经很长时间了,第一次遇到一些指标变得……丢失的问题? 通过 tcpdump -nA dst port 2003 我可以看到指标已传递到 Graphite 节点。 此外,其中一些是在 whisper 数据库中创建的,并在 /var/log/carbon/updates.log 中看到 但是他们中的大多数都没有出现在任何地方。

所以我的问题是:我该如何调试它?我如何证明 Graphite 确实从 eth0 接收到这些指标?

我在 carbon 中找不到除 updates.log 以外的任何调试日志。

日志:

sudo tcpdump -An dst port 2003 | grep 172_31_00_01 | grep requests

backend.dev.172_31_00_01.requests.max 60554.34 1453734067 backend.dev.172_31_00_01.requests.mean 16714.87 1453734067 backend.dev.172_31_00_01.requests.min 2.93 1453734067 backend.dev.172_31_00_01.requests.stddev 12185.74 1453734067 backend.dev.172_31_00_01.requests.p50 16415.87 1453734067 backend.dev.172_31_00_01.requests.p75 20314.51 1453734067 backend.dev.172_31_00_01.requests.p95 41526.36 1453734067 backend.dev.172_31_00_01.requests.p98 54370.59 1453734067 backend.dev.172_31_00_01.requests.p99 60368.68 1453734067 backend.dev.172_31_00_01.requests.p999 60553.31 1453734067 backend.dev.172_31_00_01.requests.count 3141 1453734067 backend.dev.172_31_00_01.requests.m1_rate 2.02 1453734067 backend.dev.172_31_00_01.requests.m5_rate 1.95 1453734067 backend.dev.172_31_00_01.requests.m15_rate 1.20 1453734067 backend.dev.172_31_00_01.requests.mean_rate 0.66 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.max 152.59 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.mean 41.86 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.min 0.82 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.stddev 24.84 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.p75 57.51 1453734067 backend.dev.172_31_00_01.requests.mark_sessionid_active.p95 85.78 1453734067

$ pwd
/var/lib/graphite/whisper/backend/dev/172_31_00_01/requests
$ ls -Rl
.:
total 1796
drwxr-xr-x 2 _graphite _graphite    4096 Jan 25 14:25 mark_sessionid_active
-rw-r--r-- 1 _graphite _graphite 1831744 Jan 25 15:05 mean.wsp

./mark_sessionid_active:
total 3584
-rw-r--r-- 1 _graphite _graphite 1831744 Jan 25 15:05 min.wsp
-rw-r--r-- 1 _graphite _graphite 1831744 Jan 25 15:05 stddev.wsp

PS: 这不是新安装,它已经运行了几个月,直到今天才丢失任何指标。

检查 carbon.conf 中的 LOG_DIR 变量。就我而言,它是 /var/log/carbon/,我可以在其中看到很多日志,例如 console.logcreates.loglistener.log。我相信 creates.log 就是你想要的。

如果创建了 .wsp 文件但您无法直接在 Graphite 中看到它,请尝试使用 URL API 无论如何尝试渲染它并查看它是否有效。

carbon.conf中有MAX_CREATES设置。将其设置为高值(如 1000)或 inf 可解决此问题。