summaryrefslogtreecommitdiffstats
path: root/collectors/timex.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /collectors/timex.plugin
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/timex.plugin')
-rw-r--r--collectors/timex.plugin/plugin_timex.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/collectors/timex.plugin/plugin_timex.c b/collectors/timex.plugin/plugin_timex.c
index 0390b9920..46cfc5796 100644
--- a/collectors/timex.plugin/plugin_timex.c
+++ b/collectors/timex.plugin/plugin_timex.c
@@ -109,8 +109,6 @@ void *timex_main(void *ptr)
RRDSET_TYPE_LINE);
rd_sync_state = rrddim_add(st_sync_state, "state", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
- } else {
- rrdset_next(st_sync_state);
}
rrddim_set_by_pointer(st_sync_state, rd_sync_state, sync_state != TIME_ERROR ? 1 : 0);
@@ -137,13 +135,11 @@ void *timex_main(void *ptr)
sta_codes[i].rd =
rrddim_add(st_clock_status, sta_codes[i].name, NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
- } else {
- rrdset_next(st_clock_status);
}
- for (int i = 0; sta_codes[i].name != NULL; i++) {
+ for (int i = 0; sta_codes[i].name != NULL; i++)
rrddim_set_by_pointer(st_clock_status, sta_codes[i].rd, timex_buf.status & sta_codes[i].code ? 1 : 0);
- }
+
rrdset_done(st_clock_status);
}
@@ -167,8 +163,6 @@ void *timex_main(void *ptr)
RRDSET_TYPE_LINE);
rd_offset = rrddim_add(st_offset, "offset", NULL, 1, divisor, RRD_ALGORITHM_ABSOLUTE);
- } else {
- rrdset_next(st_offset);
}
rrddim_set_by_pointer(st_offset, rd_offset, timex_buf.offset);