github.com/alibaba/ilogtail/pkg@v0.0.0-20250526110833-c53b480d046c/selfmonitor/metrics_constants_plugin.go (about) 1 // Copyright 2024 iLogtail Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package selfmonitor 16 17 ////////////////////////////////////////////////////////////////////////// 18 // plugin 19 ////////////////////////////////////////////////////////////////////////// 20 21 // label keys 22 const ( 23 MetricLabelKeyMetricCategory = "metric_category" 24 MetricLabelKeyProject = "project" 25 MetricLabelKeyLogstore = "logstore" 26 MetricLabelKeyPipelineName = "pipeline_name" 27 MetricLabelKeyPluginType = "plugin_type" 28 MetricLabelKeyPluginID = "plugin_id" 29 ) 30 31 // label values 32 const ( 33 MetricLabelValueMetricCategoryPlugin = "plugin" 34 ) 35 36 // metric keys 37 const ( 38 MetricPluginInEventsTotal = "in_events_total" 39 MetricPluginInEventGroupsTotal = "in_event_groups_total" 40 MetricPluginInSizeBytes = "in_size_bytes" 41 MetricPluginOutEventsTotal = "out_events_total" 42 MetricPluginOutEventGroupsTotal = "out_event_groups_total" 43 MetricPluginOutSizeBytes = "out_size_bytes" 44 MetricPluginTotalDelayMs = "total_delay_ms" 45 MetricPluginTotalProcessTimeMs = "total_process_time_ms" 46 ) 47 48 /********************************************************** 49 * input_canal 50 **********************************************************/ 51 const ( 52 MetricPluginBinlogRotate = "binlog_rotate" 53 MetricPluginBinlogSync = "binlog_sync" 54 MetricPluginBinlogDdl = "binlog_ddl" 55 MetricPluginBinlogRow = "binlog_row" 56 MetricPluginBinlogXgid = "binlog_xgid" 57 MetricPluginBinlogCheckpoint = "binlog_checkpoint" 58 MetricPluginBinlogFilename = "binlog_filename" 59 MetricPluginBinlogGtid = "binlog_gtid" 60 ) 61 62 /********************************************************** 63 * metric_container_info 64 * service_docker_stdout_v2 65 **********************************************************/ 66 const ( 67 MetricPluginContainerTotal = "container_total" 68 MetricPluginAddContainerTotal = "add_container_total" 69 MetricPluginRemoveContainerTotal = "remove_container_total" 70 MetricPluginUpdateContainerTotal = "update_container_total" 71 ) 72 73 /********************************************************** 74 * service_mysql 75 * service_rdb 76 **********************************************************/ 77 const ( 78 MetricPluginCollectAvgCostTimeMs = "collect_avg_cost_time_ms" 79 MetricPluginCollectTotal = "collect_total" 80 ) 81 82 /********************************************************** 83 * service_k8s_meta 84 **********************************************************/ 85 const ( 86 MetricCollectEntityTotal = "collect_entity_total" 87 MetricCollectLinkTotal = "collect_link_total" 88 ) 89 90 /********************************************************** 91 * all processor(所有解析类的处理插件通用指标。Todo:目前统计还不全、不准确) 92 **********************************************************/ 93 const ( 94 MetricPluginDiscardedEventsTotal = "discarded_events_total" 95 MetricPluginOutFailedEventsTotal = "out_failed_events_total" 96 MetricPluginOutKeyNotFoundEventsTotal = "out_key_not_found_events_total" 97 MetricPluginOutSuccessfulEventsTotal = "out_successful_events_total" 98 ) 99 100 /********************************************************** 101 * processor_anchor 102 * processor_regex 103 * processor_string_replace 104 **********************************************************/ 105 const ( 106 PluginPairsPerLogTotal = "pairs_per_log_total" 107 )