RRDTool数据源类型选择
我有一个与 RRDTool DST 相关的问题。我需要以这样的方式创建一个数据库,即使数据也是相同的(例如,我每小时有六个具有相同值的条目)。 RRDTool 必须计算该数据的平均值。
我正在使用以下命令创建数据库:
rrdtool create test.rrd --step 15 DS:na:GAUGE:15:0:U RRA:AVERAGE:0.99:1:244 RRA:AVERAGE:0.99:24:244 RRA:AVERAGE:0.99:168:244 RRA:AVERAGE:0.99:672:244 RRA:AVERAGE:0.99:5760:374
并且我正在使用以下命令更新数据库:
rrdtool update test.rrd 1296231519:0.6039
在创建 10 个具有相同值的条目(更改时间戳但值相同)后,我执行 rrdtool dump test.rrd test.xml< /code>,但我没有看到任何数据...它不包含 10 个条目。
在创建 10 个具有不同值的条目(更改时间戳和更改值)后,我转储数据库,并且有我已完成的 10 个条目。
我做错了什么?也许 DST 'GAUGE' 在创建 rrd 时是错误的?
I have a question related to RRDTool DST. I need to create a database in such a way that even the data is the same (for example, I have six entries per hour with the same value). RRDTool must calculate the AVERAGE of this data.
I'm creating database with following command:
rrdtool create test.rrd --step 15 DS:na:GAUGE:15:0:U RRA:AVERAGE:0.99:1:244 RRA:AVERAGE:0.99:24:244 RRA:AVERAGE:0.99:168:244 RRA:AVERAGE:0.99:672:244 RRA:AVERAGE:0.99:5760:374
And I'm updating database with following command:
rrdtool update test.rrd 1296231519:0.6039
After making 10 entries with the same value (changing timestamp but the same value), I do rrdtool dump test.rrd test.xml
, but I don't see any data... It does not contain the 10 entries.
After making 10 entries with a different value (changing timestamp and changing value), I do the dump of database and there are the 10 entries I have done.
What I'm doing wrong? Maybe DST 'GAUGE' is wrong on creation of rrd?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
数据源类型很好,但您已将更新间隔设置为 15 秒,并将最大更新间隔设置为 15 秒...我建议将最大值提高到 30 秒,因为您可能无法准确提供更新每 15 秒 ...
此外,您的第一个 RRA 将以 15 秒的间隔保存数据 61 分钟,第二个 RRA 以 6 分钟的间隔保存 144 小时。这些对我来说似乎很奇怪……这是故意的吗?也许看看 rrdtool 教程 看看其他人是如何解决这个问题的。
The data source type is fine, but you have set the update interval to 15 seconds and ALSO set the maximum update interval to 15 seconds ... I would suggest raising to maximum to 30 seconds as you might not be able to provide an update exactly every 15 seconds ...
Further your first RRA will keep data for 61 minutes in 15 second intervals, the second one for 144 hours in 6 minute intervals. These seem odd numbers to me ... is this intentional? Maybe have a look at the rrdtool tutorials to see how others approach this.