diff --git a/src/collectors/ntpd/ntpd.py b/src/collectors/ntpd/ntpd.py index 06f5a13ac..bed84ffcf 100644 --- a/src/collectors/ntpd/ntpd.py +++ b/src/collectors/ntpd/ntpd.py @@ -76,7 +76,7 @@ def get_ntpq_stats(self): data['poll'] = {'val': parts[5], 'precision': 0} data['reach'] = {'val': parts[6], 'precision': 0} data['delay'] = {'val': parts[7], 'precision': 6} - data['offset'] = {'val': parts[7], 'precision': 0} + data['offset'] = {'val': parts[8], 'precision': 0} data['jitter'] = {'val': parts[9], 'precision': 6} def convert_to_second(when_ntpd_ouput): diff --git a/src/diamond/utils/scheduler.py b/src/diamond/utils/scheduler.py index 7e14d53fc..e46d76370 100644 --- a/src/diamond/utils/scheduler.py +++ b/src/diamond/utils/scheduler.py @@ -52,7 +52,7 @@ def collector_process(collector, metric_queue, log): # avoid having all collectors running at the same time next_window = math.floor(time.time() / interval) * interval - if str_to_bool(self.config['stagger_collection']): + if str_to_bool(collector.config['stagger_collection']): stagger_offset = random.uniform(0, interval - 1) # Allocate time till the end of the window for the collector to run. With a