From cd4377fab21e0f500bef7f06543fa848a039c1e0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jul 2023 06:50:01 +0200 Subject: Merging upstream version 1.41.0. Signed-off-by: Daniel Baumann --- collectors/timex.plugin/metadata.yaml | 90 ++++++++++++++++++++++++++++++++++ collectors/timex.plugin/plugin_timex.c | 6 +-- 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 collectors/timex.plugin/metadata.yaml (limited to 'collectors/timex.plugin') diff --git a/collectors/timex.plugin/metadata.yaml b/collectors/timex.plugin/metadata.yaml new file mode 100644 index 000000000..27a54575a --- /dev/null +++ b/collectors/timex.plugin/metadata.yaml @@ -0,0 +1,90 @@ +meta: + plugin_name: timex.plugin + module_name: timex.plugin + monitored_instance: + name: Timex + link: '' + categories: + - data-collection.system-clock-and-ntp + icon_filename: 'syslog.png' + related_resources: + integrations: + list: [] + info_provided_to_referring_integrations: + description: '' + keywords: [] + most_popular: false +overview: + data_collection: + metrics_description: 'Examine Timex metrics to gain insights into system clock operations. Study time sync status, clock drift, and adjustments to ensure accurate system timekeeping.' + method_description: '' + supported_platforms: + include: [] + exclude: [] + multi-instance: true + additional_permissions: + description: '' + default_behavior: + auto_detection: + description: '' + limits: + description: '' + performance_impact: + description: '' +setup: + prerequisites: + list: [] + configuration: + file: + name: '' + description: '' + options: + description: '' + folding: + title: '' + enabled: true + list: [] + examples: + folding: + enabled: true + title: '' + list: [] +troubleshooting: + problems: + list: [] +alerts: +- name: system_clock_sync_state + link: https://github.com/netdata/netdata/blob/master/health/health.d/timex.conf + metric: system.clock_sync_state + info: when set to 0, the system kernel believes the system clock is not properly synchronized to a reliable server + os: "linux" +metrics: + folding: + title: Metrics + enabled: false + description: "" + availability: [] + scopes: + - name: global + description: "" + labels: [] + metrics: + - name: system.clock_sync_state + description: System Clock Synchronization State + unit: "state" + chart_type: line + dimensions: + - name: state + - name: system.clock_status + description: System Clock Status + unit: "status" + chart_type: line + dimensions: + - name: unsync + - name: clockerr + - name: system.clock_sync_offset + description: Computed Time Offset Between Local System and Reference Clock + unit: "milliseconds" + chart_type: line + dimensions: + - name: offset diff --git a/collectors/timex.plugin/plugin_timex.c b/collectors/timex.plugin/plugin_timex.c index 84147c851..025b699a1 100644 --- a/collectors/timex.plugin/plugin_timex.c +++ b/collectors/timex.plugin/plugin_timex.c @@ -37,7 +37,7 @@ static void timex_main_cleanup(void *ptr) struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr; static_thread->enabled = NETDATA_MAIN_THREAD_EXITING; - info("cleaning up..."); + netdata_log_info("cleaning up..."); static_thread->enabled = NETDATA_MAIN_THREAD_EXITED; } @@ -57,7 +57,7 @@ void *timex_main(void *ptr) int do_offset = config_get_boolean(CONFIG_SECTION_TIMEX, "time offset", CONFIG_BOOLEAN_YES); if (unlikely(do_sync == CONFIG_BOOLEAN_NO && do_offset == CONFIG_BOOLEAN_NO)) { - info("No charts to show"); + netdata_log_info("No charts to show"); goto exit; } @@ -79,7 +79,7 @@ void *timex_main(void *ptr) prev_sync_state = sync_state; if (non_seq_failure) { - error("Cannot get clock synchronization state"); + netdata_log_error("Cannot get clock synchronization state"); continue; } -- cgit v1.2.3