I was built NTP server with my raspi and then I use MRTG to monitor OFFSET and JITTER and It's work correctly. I was just +1000 at the offset values before for Negative values can show up. Now I want to change the graph that can plot the negative values, so I decided to use MRTG with RRDTool and follow the guide https://weberblog.net/basic-ntp-server-monitoring/?fbclid=IwAR3iV_rdwQK95axV8JWSmtBub9bhHtGbn9SGtLHSfSotsRXEVkO8YLuqZFM but it's doesn't work. Here's my mrtg.cfg
WorkDir: /var/www/html/mrtg
LogFormat: rrdtool
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
Here's my result.enter image description here
When MRTG creates an RRD file, the max/min range for the DS is set to be from 0 to MaxBytes. Thus, in order to allow negative values (such as for offset) to be stored, you need to subsequently tune the RRD file to allow this. Unfortunately Tobi never added a MinBytes setting!
This will set the 'in' value on targetname.rrd to allow a minimum of -1000000
Once you have done this, then it should be able to store negative values.