更新 RRDtool 数据库时出现问题

发布于 2024-11-13 10:19:37 字数 626 浏览 7 评论 0原文

我使用以下语法创建了一个数据库。

rrdtool create mydatabase.rrd -s 60 \
DS:users:COUNTER:600:0:U \
DS:activeusers:GAUGE:600:0:U \
RRA:AVERAGE:0.5:360:576 \
RRA:AVERAGE:0.5:8640:672 \
RRA:AVERAGE:0.5:259200:732 \
RRA:AVERAGE:0.5:3153600:732

我有一个运行以下命令的 crontab 条目。

* * * * * rrdtool update mydatabase.rrd N:$users:$active` 

$users 和 $active 是从外部源获取的,这只是代表性的。

我等了大约 24 小时,RRDtool 获取给了我一堆 NaN 结果。我在这里错过了一些非常基本的东西吗?还是应该按照描述的那样工作?

I created a database with the following syntax.

rrdtool create mydatabase.rrd -s 60 \
DS:users:COUNTER:600:0:U \
DS:activeusers:GAUGE:600:0:U \
RRA:AVERAGE:0.5:360:576 \
RRA:AVERAGE:0.5:8640:672 \
RRA:AVERAGE:0.5:259200:732 \
RRA:AVERAGE:0.5:3153600:732

And I have a crontab entry that runs the following.

* * * * * rrdtool update mydatabase.rrd N:$users:$active` 

$users and $active are pulled from an external source, this is just representative.

I waited about 24 hours, and the RRDtool fetch gave me a pile of NaN results. Am I missing something really basic here, or should that work as described?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰つ倒转 2024-11-20 10:19:37

确保您确实输入了有效数据。发送 N:$users:$active 日志文件。

另外,还有一个分辨率稍高的 RRA 文件。目前,您每 360 分钟 = 6 小时在第一个 RRA 文件中存储一个条目。在最后一个 RRA 文件中,每六年存储一次更新,持续 732 年。

Make sure that you are actually inputting valid data. Send N:$users:$active a logfile.

Also, have an RRA file with a little bit of a higher resolution. At the moment you are storing one entry every 360 minutes = 6 hours in the first RRA file. In the last RRA file you store one update every six years for 732 years.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文