Conversation
2cc59d1 to
e867c5a
Compare
e867c5a to
5b0734f
Compare
|
Hey @jaingaurav |
| offset_in_s = float(parts[9]) | ||
| offset_in_ms = offset_in_s * 1000 | ||
| offset_in_us = offset_in_s * 1000000 | ||
| data['offset_s'] = {'val': offset_in_s, 'precision': 6} |
There was a problem hiding this comment.
So rather than having all these offset stats, how about you have the unit and precision in the config as an option and then use the unit conversion utils?
There was a problem hiding this comment.
ah, do you have a good example of that?
There was a problem hiding this comment.
|
@jaingaurav made changes per feedback |
3089f92 to
d79ded1
Compare
| # offset is in seconds, convert is to nanoseconds and miliseconds | ||
| offset_in_s = float(parts[9]) | ||
|
|
||
| data['offset_s'] = {'val': offset_in_s, |
There was a problem hiding this comment.
So maybe I wasn't quite clear, but my suggestion was why not use a configuration option such as units and then only have a single offset metric published, or am I missing something here? Also you may want to expose a precision option too then.
There was a problem hiding this comment.
I was looking to have atleast msec and usec exposed but i just exposed sec as well
Is it safe to make the assumption that people are ok with their metric changing scale if they change the config option on a single metric namespace? (i.e. having sec and msec on the same metric name)
There was a problem hiding this comment.
So why do you want both msec and usec exposed?
Regarding your latter point, you can stick with the style that the uptime collector has or use a suffix like you've currently done.
There was a problem hiding this comment.
So why do you want both msec and usec exposed?
Actually, i looked a bit more and in reality i only need one
you can stick with the style that the uptime collector has or use a suffix like you've currently done.
I looked more at the uptime collector, and it sends the metrics in a different namespace depending on the scale you use. I missed that so its probably better if i follow that style :)
cdc379e to
7ed10b2
Compare
7ed10b2 to
d6ef032
Compare
|
@jaingaurav changed |
Collect out of band stats from ntp Uses output from ntpdate: ``` $ ntpdate -q pool.ntp.org server 12.34.56.1, stratum 2, offset -0.000277, delay 0.02878 server 12.34.56.2, stratum 1, offset -0.000128, delay 0.02896 server 12.34.56.3, stratum 2, offset 0.000613, delay 0.02870 server 12.34.56.4, stratum 2, offset -0.000351, delay 0.02864 31 Apr 12:00:00 ntpdate[12]: adjust time server 12.34.56.2 offset -0.000128 sec $
d6ef032 to
98dd405
Compare
|
Thanks a lot |
Collect out of band stats from ntp
Uses output from ntpdate: