diff options
Diffstat (limited to 'exporting/send_internal_metrics.c')
-rw-r--r-- | exporting/send_internal_metrics.c | 76 |
1 files changed, 60 insertions, 16 deletions
diff --git a/exporting/send_internal_metrics.c b/exporting/send_internal_metrics.c index e4347964f..677a57bbb 100644 --- a/exporting/send_internal_metrics.c +++ b/exporting/send_internal_metrics.c @@ -18,8 +18,18 @@ void create_main_rusage_chart(RRDSET **st_rusage, RRDDIM **rd_user, RRDDIM **rd_ return; *st_rusage = rrdset_create_localhost( - "netdata", "exporting_main_thread_cpu", NULL, "exporting", "exporting_cpu_usage", "Netdata Main Exporting Thread CPU Usage", - "milliseconds/s", "exporting", NULL, 130600, localhost->rrd_update_every, RRDSET_TYPE_STACKED); + "netdata", + "exporting_main_thread_cpu", + NULL, + "exporting", + "netdata.exporting_cpu_usage", + "Netdata Main Exporting Thread CPU Usage", + "milliseconds/s", + "exporting", + NULL, + 130600, + localhost->rrd_update_every, + RRDSET_TYPE_STACKED); *rd_user = rrddim_add(*st_rusage, "user", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL); *rd_system = rrddim_add(*st_rusage, "system", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL); @@ -65,16 +75,22 @@ void send_internal_metrics(struct instance *instance) if (!stats->initialized) { char id[RRD_ID_LENGTH_MAX + 1]; - BUFFER *family = buffer_create(0, &netdata_buffers_statistics.buffers_exporters); - - buffer_sprintf(family, "exporting_%s", instance->config.name); - snprintf(id, RRD_ID_LENGTH_MAX, "exporting_%s_metrics", instance->config.name); netdata_fix_chart_id(id); stats->st_metrics = rrdset_create_localhost( - "netdata", id, NULL, buffer_tostring(family), "exporting_buffer", "Netdata Buffered Metrics", "metrics", "exporting", NULL, - 130610, instance->config.update_every, RRDSET_TYPE_LINE); + "netdata", + id, + NULL, + "exporting", + "netdata.exporting_buffer", + "Netdata Buffered Metrics", + "metrics", + "exporting", + NULL, + 130610, + instance->config.update_every, + RRDSET_TYPE_LINE); stats->rd_buffered_metrics = rrddim_add(stats->st_metrics, "buffered", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); stats->rd_lost_metrics = rrddim_add(stats->st_metrics, "lost", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); @@ -86,8 +102,18 @@ void send_internal_metrics(struct instance *instance) netdata_fix_chart_id(id); stats->st_bytes = rrdset_create_localhost( - "netdata", id, NULL, buffer_tostring(family), "exporting_data_size", "Netdata Exporting Data Size", "KiB", "exporting", NULL, - 130620, instance->config.update_every, RRDSET_TYPE_AREA); + "netdata", + id, + NULL, + "exporting", + "netdata.exporting_data_size", + "Netdata Exporting Data Size", + "KiB", + "exporting", + NULL, + 130620, + instance->config.update_every, + RRDSET_TYPE_AREA); stats->rd_buffered_bytes = rrddim_add(stats->st_bytes, "buffered", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); stats->rd_lost_bytes = rrddim_add(stats->st_bytes, "lost", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); @@ -100,8 +126,18 @@ void send_internal_metrics(struct instance *instance) netdata_fix_chart_id(id); stats->st_ops = rrdset_create_localhost( - "netdata", id, NULL, buffer_tostring(family), "exporting_operations", "Netdata Exporting Operations", "operations", "exporting", - NULL, 130630, instance->config.update_every, RRDSET_TYPE_LINE); + "netdata", + id, + NULL, + "exporting", + "netdata.exporting_operations", + "Netdata Exporting Operations", + "operations", + "exporting", + NULL, + 130630, + instance->config.update_every, + RRDSET_TYPE_LINE); stats->rd_transmission_successes = rrddim_add(stats->st_ops, "write", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); stats->rd_data_lost_events = rrddim_add(stats->st_ops, "discard", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); @@ -115,14 +151,22 @@ void send_internal_metrics(struct instance *instance) netdata_fix_chart_id(id); stats->st_rusage = rrdset_create_localhost( - "netdata", id, NULL, buffer_tostring(family), "exporting_instance", "Netdata Exporting Instance Thread CPU Usage", - "milliseconds/s", "exporting", NULL, 130640, instance->config.update_every, RRDSET_TYPE_STACKED); + "netdata", + id, + NULL, + "exporting", + "netdata.exporting_instance", + "Netdata Exporting Instance Thread CPU Usage", + "milliseconds/s", + "exporting", + NULL, + 130640, + instance->config.update_every, + RRDSET_TYPE_STACKED); stats->rd_user = rrddim_add(stats->st_rusage, "user", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL); stats->rd_system = rrddim_add(stats->st_rusage, "system", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL); - buffer_free(family); - stats->initialized = 1; } |