有没有非常简单的石墨教程?

问题描述 投票:0回答:2

鉴于我在 Docker 中安装了 Graphite,有谁知道某个地方有一个非常简单的 Graphite 教程,它展示了如何输入数据,然后在 Graphite Webapp 中将数据绘制在图表上?我指的是非常基本的东西,而不是无休止的配置和一页又一页地设置各种组件。

我知道有实际的 Graphite 文档,但它是在设置各个组件之后设置的。这足以让任何人放弃使用 Graphite。

考虑到 Graphite 是在 Docker 中运行的,作为开始,我只需要知道使用文本输入数据、在 Graphite Web App 中显示数据以及查询回数据的步骤。

graphite graphite-carbon
2个回答
2
投票

我想您已经容器化并配置了所有石墨组件。

首先,如果您打算从本地或外部主机提供石墨,请确保您发布了明文和 pickle 端口。 (默认:2003-2004)

之后,根据文档,您可以执行一个简单的 Netcat 命令,通过 TCP/UDP 将指标发送到 Carbon,格式为

<metric path> <metric value> <metric timestamp>

while true; do
echo "local.random.diceroll $RANDOM `date +%s`" | nc -q 1 ${SERVER} ${PORT}
done

您应该在石墨网络 GUI 中看到使用随机整数图生成的路径 local/rando/diceroll。

参考:https://graphite.readthedocs.io/en/latest/feeding-carbon.html


0
投票

---> 建议:可能需要使用“date -u %s”而不是“date %s”。 <----- When I spun up the graphite docker container ... I found that it used UTC time, but I ran the command above (echo "local.random.diceroll $RANDOM

date +%s
" | nc -q 1 ${SERVER} ${PORT}) 在我的主机上...并且使用的是我的本地时间。图表是空的(尽管缩放反映了发送的数据),因为“过去2 小时”UTC 与我过去 2 小时的当地时间不同。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.