为什么 Sensu 指标没有直接显示在 Graphite 中?

为什么 Sensu 指标没有直接显示在 Graphite 中?

大约需要 15 分钟,Sensu 发送的指标才会出现在 Graphite 中。

问题

  • 为什么要花15分钟?
  • 有可能加速这个进程吗?

讨论

尽管已配置了 1 分钟的保留时间:

/opt/graphite/conf/storage-schemas.conf

[carbon]
pattern = ^carbon\.
retentions = 60:90d

[default_1min_for_1day]
pattern = .*
retentions = 60s:1d

以及 sensu 客户端:

/var/log/sensu/sensu-client.log

{"timestamp":"2016-08-16T23:17:54.131805+0000","level":"info","message":
"publishing check result","payload":{"client":"rhel","check":{"type":"metric",
"command":"/etc/sensu/plugins/metrics-memory-percent.rb","handlers":["relay"],
"name":"load_metrics3","issued":1471389473,"interval":10,"subscribers":["ALL"],
"executed":1471389473,"duration":0.226,
"output":"box01-ubuntu.memory_percent.free 3.6590918167658453
1471389474\nbox01-ubuntu.memory_percent.buffers 0.0 1471389474\nbox01-ubuntu.memory_percent.cached 22.651064339630178 1471389474\n
box01-ubuntu.memory_percent.dirty 0.01837134070849475 1471389474\n
box01-ubuntu.memory_percent.swapUsed 7.438716420871131 1471389474\
nbox01-ubuntu.memory_percent.usedWOBuffersCaches 73.68984384360398 1471389474\nbox01-ubuntu.memory_percent.freeWOBuffersCaches 26.310156156396022 1471389474\n","status":0}}}

石墨记录活性:

/opt/graphite/storage/log/carbon-cache/carbon-cache-a/creates.log

16/08/2016 23:14:29 :: new metric box01-ubuntu.memory_percent.freeWOBuffersCaches 
matched schema default_1min_for_1day

15分钟后图表出现。

答案1

该问题是由于 sensu-server 上的时间与 sensu-clients 上的时间不同步而引起的。

相关内容