# Change chart resolution for ntpd plugin

**URL:** <https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411>\
**Category:** Help\
**Tags:** agent\
**Created:** [June 8, 2021, 10:12pm UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411 "2021-06-08T22:12:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkarls](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/tkarls/32/896_2.png) [@tkarls](https://community.netdata.cloud/u/tkarls)\
**Post date:** [June 8, 2021, 10:12pm UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411/1 "2021-06-08T22:12:25Z")

</div>

## Problem/Question

I have a server where I need to monitor the ntpd statistics. However, for example the offset graph is displaying milliseconds, and seems to default to one decimal which gives a scale where all lables have the same value because they are all rounded to the .1 millisecond.

## What I expected to happen

I would prefer to have the data in microseconds instead. Is this possible to accomplish with some configuration setting somewhere? Or if the plugin can be modified to request another resolution? The data seems to be stored in micro or nano seconds because the actual graph look ok. Just the labels and value when I hover a data-point are displaying the same .1 millisecond.

I appreciate any help!

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [June 9, 2021, 5:34am UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411/2 "2021-06-09T05:34:34Z")

</div>

You can’t configure precision, but you can change `PRECISION = 1000000` (this is a divisor) and all occurences of `milliseconds` in `/usr/libexec/netdata/python.d/ntpd.chart.py`.

---

<div class="post-metadata">

**Author:** ![tkarls](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/tkarls/32/896_2.png) [@tkarls](https://community.netdata.cloud/u/tkarls)\
**Post date:** [June 9, 2021, 12:40pm UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411/3 "2021-06-09T12:40:48Z")

</div>

Thanks!

You got me on the right track. However, if any one else reads this. It is not enough to change PRECISION to 1000 instead since PRECISION is also used when scaling up the value read from ntpd. But when only changing the PRECISION value on the charts I got the expected behavior.

Added this as a RUN command to my netdata Dockerfile so pretty neat “hack” I think.

---

<div class="post-metadata">

**Author:** ![tkarls](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/tkarls/32/896_2.png) [@tkarls](https://community.netdata.cloud/u/tkarls)\
**Post date:** [June 9, 2021, 1:48pm UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411/4 "2021-06-09T13:48:18Z")

</div>

Ok, while the above hack did work Netdata actullay include a way to override this using config options.

just putting

[ntpd\_local.sys\_offset]  
dim offset divisor = 1000  
units = microseconds

in my /etc/netdata/netdata.conf file does the trick. Much more clean then hacking the code of the plugin.

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [June 10, 2021, 1:24pm UTC](https://community.netdata.cloud/t/change-chart-resolution-for-ntpd-plugin/1411/5 "2021-06-10T13:24:55Z")

</div>

Yeah, configuration change is much better than fiddling with the source code!

For anyone interested, you can find the docs for this collector here:

> **[NTP daemon monitoring with Netdata | Learn Netdata](https://learn.netdata.cloud/docs/agent/collectors/python.d.plugin/ntpd)**
>
> Monitors the system variables of the local ntpd daemon (optional incl. variables of the polled peers) using the NTP Control Message Protocol via UDP socket, similar to ntpq, the standard NTP query program.
