summaryrefslogtreecommitdiffstats
path: root/daemon/global_statistics.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /daemon/global_statistics.c
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/global_statistics.c')
-rw-r--r--daemon/global_statistics.c101
1 files changed, 94 insertions, 7 deletions
diff --git a/daemon/global_statistics.c b/daemon/global_statistics.c
index ab910e189..9fb1df5f8 100644
--- a/daemon/global_statistics.c
+++ b/daemon/global_statistics.c
@@ -65,6 +65,11 @@ static struct global_statistics {
uint64_t backfill_queries_made;
uint64_t backfill_db_points_read;
+ uint64_t tier0_hot_gorilla_buffers;
+
+ uint64_t tier0_disk_compressed_bytes;
+ uint64_t tier0_disk_uncompressed_bytes;
+
uint64_t db_points_stored_per_tier[RRD_STORAGE_TIERS];
} global_statistics = {
@@ -80,6 +85,10 @@ static struct global_statistics {
.api_data_queries_made = 0,
.api_data_db_points_read = 0,
.api_data_result_points_generated = 0,
+
+ .tier0_hot_gorilla_buffers = 0,
+ .tier0_disk_compressed_bytes = 0,
+ .tier0_disk_uncompressed_bytes = 0,
};
void global_statistics_rrdset_done_chart_collection_completed(size_t *points_read_per_tier_array) {
@@ -108,6 +117,18 @@ void global_statistics_backfill_query_completed(size_t points_read) {
__atomic_fetch_add(&global_statistics.backfill_db_points_read, points_read, __ATOMIC_RELAXED);
}
+void global_statistics_gorilla_buffer_add_hot() {
+ __atomic_fetch_add(&global_statistics.tier0_hot_gorilla_buffers, 1, __ATOMIC_RELAXED);
+}
+
+void global_statistics_tier0_disk_compressed_bytes(uint32_t size) {
+ __atomic_fetch_add(&global_statistics.tier0_disk_compressed_bytes, size, __ATOMIC_RELAXED);
+}
+
+void global_statistics_tier0_disk_uncompressed_bytes(uint32_t size) {
+ __atomic_fetch_add(&global_statistics.tier0_disk_uncompressed_bytes, size, __ATOMIC_RELAXED);
+}
+
void global_statistics_rrdr_query_completed(size_t queries, uint64_t db_points_read, uint64_t result_points_generated, QUERY_SOURCE query_source) {
switch(query_source) {
case QUERY_SOURCE_API_DATA:
@@ -210,6 +231,11 @@ static inline void global_statistics_copy(struct global_statistics *gs, uint8_t
gs->backfill_queries_made = __atomic_load_n(&global_statistics.backfill_queries_made, __ATOMIC_RELAXED);
gs->backfill_db_points_read = __atomic_load_n(&global_statistics.backfill_db_points_read, __ATOMIC_RELAXED);
+ gs->tier0_hot_gorilla_buffers = __atomic_load_n(&global_statistics.tier0_hot_gorilla_buffers, __ATOMIC_RELAXED);
+
+ gs->tier0_disk_compressed_bytes = __atomic_load_n(&global_statistics.tier0_disk_compressed_bytes, __ATOMIC_RELAXED);
+ gs->tier0_disk_uncompressed_bytes = __atomic_load_n(&global_statistics.tier0_disk_uncompressed_bytes, __ATOMIC_RELAXED);
+
for(size_t tier = 0; tier < storage_tiers ;tier++)
gs->db_points_stored_per_tier[tier] = __atomic_load_n(&global_statistics.db_points_stored_per_tier[tier], __ATOMIC_RELAXED);
@@ -816,7 +842,7 @@ static void global_statistics_charts(void) {
for(size_t tier = 0; tier < storage_tiers ;tier++) {
char buf[30 + 1];
- snprintfz(buf, 30, "tier%zu", tier);
+ snprintfz(buf, sizeof(buf) - 1, "tier%zu", tier);
rds[tier] = rrddim_add(st_points_stored, buf, NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
}
}
@@ -828,6 +854,72 @@ static void global_statistics_charts(void) {
}
ml_update_global_statistics_charts(gs.ml_models_consulted);
+
+ // ----------------------------------------------------------------
+
+#ifdef ENABLE_DBENGINE
+ if (tier_page_type[0] == PAGE_GORILLA_METRICS)
+ {
+ static RRDSET *st_tier0_gorilla_pages = NULL;
+ static RRDDIM *rd_num_gorilla_pages = NULL;
+
+ if (unlikely(!st_tier0_gorilla_pages)) {
+ st_tier0_gorilla_pages = rrdset_create_localhost(
+ "netdata"
+ , "tier0_gorilla_pages"
+ , NULL
+ , "tier0_gorilla_pages"
+ , NULL
+ , "Number of gorilla_pages"
+ , "count"
+ , "netdata"
+ , "stats"
+ , 131004
+ , localhost->rrd_update_every
+ , RRDSET_TYPE_LINE
+ );
+
+ rd_num_gorilla_pages = rrddim_add(st_tier0_gorilla_pages, "count", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ }
+
+ rrddim_set_by_pointer(st_tier0_gorilla_pages, rd_num_gorilla_pages, (collected_number)gs.tier0_hot_gorilla_buffers);
+
+ rrdset_done(st_tier0_gorilla_pages);
+ }
+
+ if (tier_page_type[0] == PAGE_GORILLA_METRICS)
+ {
+ static RRDSET *st_tier0_compression_info = NULL;
+
+ static RRDDIM *rd_compressed_bytes = NULL;
+ static RRDDIM *rd_uncompressed_bytes = NULL;
+
+ if (unlikely(!st_tier0_compression_info)) {
+ st_tier0_compression_info = rrdset_create_localhost(
+ "netdata"
+ , "tier0_compression_info"
+ , NULL
+ , "tier0_compression_info"
+ , NULL
+ , "Tier 0 compression info"
+ , "bytes"
+ , "netdata"
+ , "stats"
+ , 131005
+ , localhost->rrd_update_every
+ , RRDSET_TYPE_LINE
+ );
+
+ rd_compressed_bytes = rrddim_add(st_tier0_compression_info, "compressed", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ rd_uncompressed_bytes = rrddim_add(st_tier0_compression_info, "uncompressed", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ }
+
+ rrddim_set_by_pointer(st_tier0_compression_info, rd_compressed_bytes, (collected_number)gs.tier0_disk_compressed_bytes);
+ rrddim_set_by_pointer(st_tier0_compression_info, rd_uncompressed_bytes, (collected_number)gs.tier0_disk_uncompressed_bytes);
+
+ rrdset_done(st_tier0_compression_info);
+ }
+#endif
}
// ----------------------------------------------------------------------------
@@ -1881,8 +1973,6 @@ static void dbengine2_statistics_charts(void) {
static RRDDIM *rd_mrg_metrics = NULL;
static RRDDIM *rd_mrg_acquired = NULL;
static RRDDIM *rd_mrg_collected = NULL;
- static RRDDIM *rd_mrg_with_retention = NULL;
- static RRDDIM *rd_mrg_without_retention = NULL;
static RRDDIM *rd_mrg_multiple_writers = NULL;
if (unlikely(!st_mrg_metrics)) {
@@ -1903,8 +1993,6 @@ static void dbengine2_statistics_charts(void) {
rd_mrg_metrics = rrddim_add(st_mrg_metrics, "all", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_mrg_acquired = rrddim_add(st_mrg_metrics, "acquired", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_mrg_collected = rrddim_add(st_mrg_metrics, "collected", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
- rd_mrg_with_retention = rrddim_add(st_mrg_metrics, "with retention", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
- rd_mrg_without_retention = rrddim_add(st_mrg_metrics, "without retention", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_mrg_multiple_writers = rrddim_add(st_mrg_metrics, "multi-collected", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
priority++;
@@ -1912,8 +2000,6 @@ static void dbengine2_statistics_charts(void) {
rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_metrics, (collected_number)mrg_stats.entries);
rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_acquired, (collected_number)mrg_stats.entries_referenced);
rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_collected, (collected_number)mrg_stats.writers);
- rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_with_retention, (collected_number)mrg_stats.entries_with_retention);
- rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_without_retention, (collected_number)mrg_stats.entries - (collected_number)mrg_stats.entries_with_retention);
rrddim_set_by_pointer(st_mrg_metrics, rd_mrg_multiple_writers, (collected_number)mrg_stats.writers_conflicts);
rrdset_done(st_mrg_metrics);
@@ -3445,6 +3531,7 @@ static struct worker_utilization all_workers_utilization[] = {
{ .name = "TC", .family = "workers plugin tc", .priority = 1000000 },
{ .name = "TIMEX", .family = "workers plugin timex", .priority = 1000000 },
{ .name = "IDLEJITTER", .family = "workers plugin idlejitter", .priority = 1000000 },
+ { .name = "LOGSMANAGPLG",.family = "workers plugin logs management", .priority = 1000000 },
{ .name = "RRDCONTEXT", .family = "workers contexts", .priority = 1000000 },
{ .name = "REPLICATION", .family = "workers replication sender", .priority = 1000000 },
{ .name = "SERVICE", .family = "workers service", .priority = 1000000 },