From 63dd76a6c68d1656e7f9fb8ea60eeb4402c1f7d4 Mon Sep 17 00:00:00 2001 From: buzhimingyonghu <42060366+buzhimingyonghu@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:30:28 +0800 Subject: [PATCH] fix: fix pika exporter 336 version match nil and delete optional logs keyspace-stats-clock (#2971) * fix pika_exporter warnf not found valuename * Remove duplicate logs and add version management analysis * fix * add 336 ignore * delete keyspace-stats-clock log --- .../pika_exporter/exporter/metrics/parser.go | 41 +++++++++++++++++++ tools/pika_exporter/exporter/pika.go | 1 - 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/tools/pika_exporter/exporter/metrics/parser.go b/tools/pika_exporter/exporter/metrics/parser.go index b39ef486a..c5771af73 100644 --- a/tools/pika_exporter/exporter/metrics/parser.go +++ b/tools/pika_exporter/exporter/metrics/parser.go @@ -52,9 +52,50 @@ func (v *VersionChecker336) InitVersionChecker() { } } if v.EmptyRegexName == nil { + v.EmptyRegexName = []string{ "hitratio_per_sec", + "total_blob_file_size", + "block_cache_capacity", + "background_errors", + "num_running_flushes", + "mem_table_flush_pending", + "estimate_pending_compaction_bytes", + "block_cache_pinned_usage", + "pending_compaction_bytes_stops", + "estimate_live_data_size", + "pending_compaction_bytes_delays", + "num_running_compactions", + "live_blob_file_size", + "cur_size_active_mem_table", + "block_cache_usage", + "cf_l0_file_count_limit_stops_with_ongoing_compaction", + "cur_size_all_mem_tables", + "num_immutable_mem_table", + "compaction_pending", + "live_sst_files_size", + "memtable_limit_stops", + "total_delays", + "l0_file_count_limit_delays", + "estimate_table_readers_mem", + "num_immutable_mem_table_flushed", + "compaction_Sum", + "size_all_mem_tables", + "total_sst_files_size", + "commandstats_info", + "num_snapshots", + "current_super_version_number", + "memtable_limit_delays", + "estimate_num_keys", + "num_blob_files", + "total_stops", + "cf_l0_file_count_limit_delays_with_ongoing_compaction", + "num_live_versions", + "l0_file_count_limit_stops", + "compaction", + "blob_stats", } + } } func (v *VersionChecker336) CheckContainsEmptyValueName(key string) bool { diff --git a/tools/pika_exporter/exporter/pika.go b/tools/pika_exporter/exporter/pika.go index e3fe2631c..0e74da635 100644 --- a/tools/pika_exporter/exporter/pika.go +++ b/tools/pika_exporter/exporter/pika.go @@ -390,7 +390,6 @@ func (e *exporter) statsKeySpace(hour int) { defer e.wg.Done() if hour < 0 { - log.Infoln("stats KeySpace not open") return }