首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >带有RRDTool的MRTG没有显示任何内容

带有RRDTool的MRTG没有显示任何内容
EN

Stack Overflow用户
提问于 2021-01-08 08:27:10
回答 1查看 40关注 0票数 1

我用我的raspi构建了NTP服务器,然后我使用MRTG来监控偏移和抖动,它工作正常。我刚刚在+1000的偏移值之前,负值可以显示出来。现在我想更改可以绘制负值的图形,所以我决定将MRTG与RRDTool一起使用,并遵循https://weberblog.net/basic-ntp-server-monitoring/?fbclid=IwAR3iV_rdwQK95axV8JWSmtBub9bhHtGbn9SGtLHSfSotsRXEVkO8YLuqZFM指南,但它不起作用。这是我的mrtg.cfg

代码语言:javascript
运行
复制
WorkDir: /var/www/html/mrtg 
LogFormat: rrdtool
代码语言:javascript
运行
复制
Target[ntp2-gps-offset-us]: `ntpq -c rv ip | grep offset | sed s/.*$
MaxBytes[ntp2-gps-offset-us]: 100000
Title[ntp2-gps-offset-us]: Offset µs -- ntp2-gps
Options[ntp2-gps-offset-us]: gauge
Colours[ntp2-gps-offset-us]: DARKPURPLE#7608AA, Blue#0000FF, BLACK#000000, Purple#FF00FF
YLegend[ntp2-gps-offset-us]: Offset in microseconds (µs)
Legend1[ntp2-gps-offset-us]: Offset
Legend3[ntp2-gps-offset-us]: Peak Offset
LegendI[ntp2-gps-offset-us]: Offset:
ShortLegend[ntp2-gps-offset-us]: µs
PageTop[ntp2-gps-offset-us]: OFFSET MONITOR
routers.cgi*Options[ntp2-gps-offset-us]: fixunit nototal noo
routers.cgi*ShortDesc[ntp2-gps-offset-us]: Offset µs ntp2-gps
routers.cgi*Icon[ntp2-gps-offset-us]: graph-sm.gif


Target[ntp2-gps-jitter-us]: `ntpq -c rv ip | grep sys_jitter | sed $
MaxBytes[ntp2-gps-jitter-us]: 100000
Title[ntp2-gps-jitter-us]: Jitter µs -- ntp2-gps
Options[ntp2-gps-jitter-us]: gauge
Colours[ntp2-gps-jitter-us]: TURQUOISE#00CCCC, Blue#0000FF, DARKTURQUOISE#377D77, Purple#FF00FF
YLegend[ntp2-gps-jitter-us]: Jitter in microseconds (µs)
Legend1[ntp2-gps-jitter-us]: Jitter
Legend3[ntp2-gps-jitter-us]: Peak Jitter
LegendI[ntp2-gps-jitter-us]: Jitter:
PageTop[ntp2-gps-jitter-us]: <H1>JITTER MONITOR</H1>
ShortLegend[ntp2-gps-jitter-us]: µs
routers.cgi*Options[ntp2-gps-jitter-us]: fixunit nototal noo
routers.cgi*ShortDesc[ntp2-gps-jitter-us]: Jitter µs ntp2-gps
routers.cgi*Icon[ntp2-gps-jitter-us]: link-sm.gif

这是我的结果。enter image description here

EN

回答 1

Stack Overflow用户

发布于 2021-01-09 05:53:53

当MRTG创建RRD文件时,DS的最大/最小范围被设置为从0到MaxBytes。因此,为了允许存储负值(例如偏移量),您需要随后调优RRD文件以允许这样做。不幸的是,Tobi从未添加过MinBytes设置!

这将在targetname.rrd上设置'in‘值,允许的最小值为-1000000

代码语言:javascript
运行
复制
rrdtool tune targetname.rrd --minimum ds0:-1000000

一旦你这样做了,那么它应该能够存储负值。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65621835

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档