Azure 監視器中 Prometheus 計量的最小擷取設定檔
Azure 監視器計量附加元件依預設會收集許多 Prometheus 計量。 Minimal ingestion profile
是有助於降低計量擷取量的設定,因為只會收集預設儀表板、預設錄製規則與預設警示所使用的計量。 本文說明如何設定這項設定。 本文也會列出在 minimal ingestion profile
啟用時依預設收集的計量。 您可以修改收集以便收集更多計量,如下所示。
注意
對於以附加元件為基礎的收集,依預設會啟用 Minimal ingestion profile
設定。
依預設會啟用/開啟下列目標 - 這表示您不需要提供任何抓取作業設定來抓取這些目標,因為計量附加元件依預設會自動抓取這些目標
cadvisor
(job=cadvisor
)nodeexporter
(job=node
)kubelet
(job=kubelet
)kube-state-metrics
(job=kube-state-metrics
)controlplane-apiserver
(job=controlplane-apiserver
)controlplane-etcd
(job=controlplane-etcd
)
下列目標可供抓取,但依預設不會啟用抓取 (停用/關閉) - 這表示您不需要提供任何抓取作業設定來抓取這些目標,但依預設會加以停用/關閉,您必須使用 default-scrape-settings-enabled
區段底下的 ama-metrics-settings-configmap 為這些目標開啟/啟用抓取
core-dns
(job=kube-dns
)kube-proxy
(job=kube-proxy
)api-server
(job=kube-apiserver
)controlplane-cluster-autoscaler
(job=controlplane-cluster-autoscaler
)controlplane-kube-scheduler
(job=controlplane-kube-scheduler
)controlplane-kube-controller-manager
(job=controlplane-kube-controller-manager
)
注意
所有預設目標與抓取的預設抓取頻率為 30 seconds
。 您可以使用 default-targets-scrape-interval-settings
區段下的 ama-metrics-settings-configmap,對每個目標覆寫此值。
控制平面目標的固定抓取間隔為 30 seconds
,且無法覆寫。
您可以在這裡深入了解計量附加元件所使用的四個不同的設定對應
組態設定
預設會在計量附加元件上啟用此設定 default-targets-metrics-keep-list.minimalIngestionProfile="true"
。 您可以在 default-targets-metrics-keep-list
區段下的 ama-metrics-settings-configmap 中指定此設定。
案例
有四種您可能想要自訂此行為的情節:
僅擷取每個預設目標的最小計量。
這是設定 default-targets-metrics-keep-list.minimalIngestionProfile="true"
的預設行為。 系統只會為每個預設目標擷取下列計量。
除了最小計量以外,還會擷取一或多個預設目標的一些其他計量。
保留 minimalIngestionProfile="true"
並指定該目標特有的適當 keeplistRegexes.*
,例如 keeplistRegexes.coreDns="X``Y"
。 X,Y 會與目標的預設計量清單合併,然後受到擷取。 ``
僅擷取一組特定的目標計量,而沒有其他項目。
設定 minimalIngestionProfile="false"
並在 ama-metrics-settings-configmap
中指定該目標特有的適當 default-targets-metrics-keep-list.="X``Y"
。
擷取針對預設目標抓取的所有計量。
設定 minimalIngestionProfile="false"
且請勿為該目標指定任何 default-targets-metrics-keep-list.<targetname>
。 變更為 false
,可讓每個目標的計量擷取量倍增。
注意
up
計量不是允許/保留清單的一部分,因為不論是否指定 keepLists
,都會針對每個目標在每次抓取時擷取該計量。 實際上不會抓取此計量,而是由計量附加元件的抓取作業產生的。 若是長條圖和摘要,清單中必須明確包含每個序列 (*bucket
、*sum
、*count
序列)。
預設 ON 目標的擷取下限
下列計量被允許列入預設 ON 目標的 minimalingestionprofile=true
。 依預設會收集下列計量,因為預設會抓取這些目標。
kubelet
kubelet_volume_stats_used_bytes
kubelet_node_name
kubelet_running_pods
kubelet_running_pod_count
kubelet_running_containers
kubelet_running_container_count
volume_manager_total_volumes
kubelet_node_config_error
kubelet_runtime_operations_total
kubelet_runtime_operations_errors_total
kubelet_runtime_operations_duration_seconds
kubelet_runtime_operations_duration_seconds_bucket
kubelet_runtime_operations_duration_seconds_sum
kubelet_runtime_operations_duration_seconds_count
kubelet_pod_start_duration_seconds
kubelet_pod_start_duration_seconds_bucket
kubelet_pod_start_duration_seconds_sum
kubelet_pod_start_duration_seconds_count
kubelet_pod_worker_duration_seconds
kubelet_pod_worker_duration_seconds_bucket
kubelet_pod_worker_duration_seconds_sum
kubelet_pod_worker_duration_seconds_count
storage_operation_duration_seconds
storage_operation_duration_seconds_bucket
storage_operation_duration_seconds_sum
storage_operation_duration_seconds_count
storage_operation_errors_total
kubelet_cgroup_manager_duration_seconds
kubelet_cgroup_manager_duration_seconds_bucket
kubelet_cgroup_manager_duration_seconds_sum
kubelet_cgroup_manager_duration_seconds_count
kubelet_pleg_relist_duration_seconds
kubelet_pleg_relist_duration_seconds_bucket
kubelet_pleg_relist_duration_sum
kubelet_pleg_relist_duration_seconds_count
kubelet_pleg_relist_interval_seconds
kubelet_pleg_relist_interval_seconds_bucket
kubelet_pleg_relist_interval_seconds_sum
kubelet_pleg_relist_interval_seconds_count
rest_client_requests_total
rest_client_request_duration_seconds
rest_client_request_duration_seconds_bucket
rest_client_request_duration_seconds_sum
rest_client_request_duration_seconds_count
process_resident_memory_bytes
process_cpu_seconds_total
go_goroutines
kubelet_volume_stats_capacity_bytes
kubelet_volume_stats_available_bytes
kubelet_volume_stats_inodes_used
kubelet_volume_stats_inodes
kubernetes_build_info"
cadvisor
container_spec_cpu_period
container_spec_cpu_quota
container_cpu_usage_seconds_total
container_memory_rss
container_network_receive_bytes_total
container_network_transmit_bytes_total
container_network_receive_packets_total
container_network_transmit_packets_total
container_network_receive_packets_dropped_total
container_network_transmit_packets_dropped_total
container_fs_reads_total
container_fs_writes_total
container_fs_reads_bytes_total
container_fs_writes_bytes_total
container_memory_working_set_bytes
container_memory_cache
container_memory_swap
container_cpu_cfs_throttled_periods_total
container_cpu_cfs_periods_total
container_memory_usage_bytes
kubernetes_build_info"
kube-state-metrics
kube_node_status_capacity
kube_job_status_succeeded
kube_job_spec_completions
kube_daemonset_status_desired_number_scheduled
kube_daemonset_status_number_ready
kube_deployment_spec_replicas
kube_deployment_status_replicas_ready
kube_pod_container_status_last_terminated_reason
kube_node_status_condition
kube_pod_container_status_restarts_total
kube_pod_container_resource_requests
kube_pod_status_phase
kube_pod_container_resource_limits
kube_node_status_allocatable
kube_pod_info
kube_pod_owner
kube_resourcequota
kube_statefulset_replicas
kube_statefulset_status_replicas
kube_statefulset_status_replicas_ready
kube_statefulset_status_replicas_current
kube_statefulset_status_replicas_updated
kube_namespace_status_phase
kube_node_info
kube_statefulset_metadata_generation
kube_pod_labels
kube_pod_annotations
kube_horizontalpodautoscaler_status_current_replicas
kube_horizontalpodautoscaler_status_desired_replicas
kube_horizontalpodautoscaler_spec_min_replicas
kube_horizontalpodautoscaler_spec_max_replicas
kube_node_status_condition
kube_node_spec_taint
kube_pod_container_status_waiting_reason
kube_job_failed
kube_job_status_start_time
kube_deployment_spec_replicas
kube_deployment_status_replicas_available
kube_deployment_status_replicas_updated
kube_job_status_active
kubernetes_build_info
kube_pod_container_info
kube_replicaset_owner
kube_resource_labels
(範例 - kube_pod_labels、kube_deployment_labels)kube_resource_annotations
(範例 - kube_pod_annotations、kube_deployment_annotations)
node-exporter (linux)
node_cpu_seconds_total
node_memory_MemAvailable_bytes
node_memory_Buffers_bytes
node_memory_Cached_bytes
node_memory_MemFree_bytes
node_memory_Slab_bytes
node_memory_MemTotal_bytes
node_netstat_Tcp_RetransSegs
node_netstat_Tcp_OutSegs
node_netstat_TcpExt_TCPSynRetrans
node_load1``node_load5
node_load15
node_disk_read_bytes_total
node_disk_written_bytes_total
node_disk_io_time_seconds_total
node_filesystem_size_bytes
node_filesystem_avail_bytes
node_filesystem_readonly
node_network_receive_bytes_total
node_network_transmit_bytes_total
node_vmstat_pgmajfault
node_network_receive_drop_total
node_network_transmit_drop_total
node_disk_io_time_weighted_seconds_total
node_exporter_build_info
node_time_seconds
node_uname_info"
controlplane-apiserver
apiserver_request_total
apiserver_cache_list_fetched_objects_total
apiserver_cache_list_returned_objects_total
apiserver_flowcontrol_demand_seats_average
apiserver_flowcontrol_current_limit_seats
apiserver_request_sli_duration_seconds_bucket
apiserver_request_sli_duration_seconds_count
apiserver_request_sli_duration_seconds_sum
process_start_time_seconds
apiserver_request_duration_seconds_bucket
apiserver_request_duration_seconds_count
apiserver_request_duration_seconds_sum
apiserver_storage_list_fetched_objects_total
apiserver_storage_list_returned_objects_total
apiserver_current_inflight_requests
controlplane-etcd
etcd_server_has_leader
rest_client_requests_total
etcd_mvcc_db_total_size_in_bytes
etcd_mvcc_db_total_size_in_use_in_bytes
etcd_server_slow_read_indexes_total
etcd_server_slow_apply_total
etcd_network_client_grpc_sent_bytes_total
etcd_server_heartbeat_send_failures_total
預設 OFF 目標的擷取下限
下列計量透過 minimalingestionprofile=true
列為預設關閉目標允許的計量。 依預設不會收集這些計量,因為這些目標預設為不抓取 (因為預設為 OFF)。 您可以使用 default-scrape-settings-enabled
區段下的 ama-metrics-settings-configmap,使用 default-scrape-settings-enabled.<target-name>=true
為這些目標開啟抓取。
core-dns
coredns_build_info
coredns_panics_total
coredns_dns_responses_total
coredns_forward_responses_total
coredns_dns_request_duration_seconds
coredns_dns_request_duration_seconds_bucket
coredns_dns_request_duration_seconds_sum
coredns_dns_request_duration_seconds_count
coredns_forward_request_duration_seconds
coredns_forward_request_duration_seconds_bucket
coredns_forward_request_duration_seconds_sum
coredns_forward_request_duration_seconds_count
coredns_dns_requests_total
coredns_forward_requests_total
coredns_cache_hits_total
coredns_cache_misses_total
coredns_cache_entries
coredns_plugin_enabled
coredns_dns_request_size_bytes
coredns_dns_request_size_bytes_bucket
coredns_dns_request_size_bytes_sum
coredns_dns_request_size_bytes_count
coredns_dns_response_size_bytes
coredns_dns_response_size_bytes_bucket
coredns_dns_response_size_bytes_sum
coredns_dns_response_size_bytes_count
coredns_dns_response_size_bytes
coredns_dns_response_size_bytes_bucket
coredns_dns_response_size_bytes_sum
coredns_dns_response_size_bytes_count
process_resident_memory_bytes
process_cpu_seconds_total
go_goroutines
kubernetes_build_info"
kube-proxy
kubeproxy_sync_proxy_rules_duration_seconds
kubeproxy_sync_proxy_rules_duration_seconds_bucket
kubeproxy_sync_proxy_rules_duration_seconds_sum
kubeproxy_sync_proxy_rules_duration_seconds_count
kubeproxy_network_programming_duration_seconds
kubeproxy_network_programming_duration_seconds
kubeproxy_network_programming_duration_seconds_bucket
kubeproxy_network_programming_duration_seconds_sum
kubeproxy_network_programming_duration_seconds_count
rest_client_requests_total
rest_client_request_duration_seconds
rest_client_request_duration_seconds_bucket
rest_client_request_duration_seconds_sum
rest_client_request_duration_seconds_count
process_resident_memory_bytes
process_cpu_seconds_total
go_goroutines
kubernetes_build_info"
api-server
apiserver_request_duration_seconds
apiserver_request_duration_seconds_bucket
apiserver_request_duration_seconds_sum
apiserver_request_duration_seconds_count
apiserver_request_total
workqueue_adds_total``workqueue_depth
workqueue_queue_duration_seconds
workqueue_queue_duration_seconds_bucket
workqueue_queue_duration_seconds_sum
workqueue_queue_duration_seconds_count
process_resident_memory_bytes
process_cpu_seconds_total
go_goroutines
kubernetes_build_info"
windows-exporter (job=windows-exporter)
windows_system_system_up_time
windows_cpu_time_total
windows_memory_available_bytes
windows_os_visible_memory_bytes
windows_memory_cache_bytes
windows_memory_modified_page_list_bytes
windows_memory_standby_cache_core_bytes
windows_memory_standby_cache_normal_priority_bytes
windows_memory_standby_cache_reserve_bytes
windows_memory_swap_page_operations_total
windows_logical_disk_read_seconds_total
windows_logical_disk_write_seconds_total
windows_logical_disk_size_bytes
windows_logical_disk_free_bytes
windows_net_bytes_total
windows_net_packets_received_discarded_total
windows_net_packets_outbound_discarded_total
windows_container_available
windows_container_cpu_usage_seconds_total
windows_container_memory_usage_commit_bytes
windows_container_memory_usage_private_working_set_bytes
windows_container_network_receive_bytes_total
windows_container_network_transmit_bytes_total
kube-proxy-windows (job=kube-proxy-windows)
kubeproxy_sync_proxy_rules_duration_seconds
kubeproxy_sync_proxy_rules_duration_seconds_bucket
kubeproxy_sync_proxy_rules_duration_seconds_sum
kubeproxy_sync_proxy_rules_duration_seconds_count
rest_client_requests_total
rest_client_request_duration_seconds
rest_client_request_duration_seconds_bucket
rest_client_request_duration_seconds_sum
rest_client_request_duration_seconds_count
process_resident_memory_bytes
process_cpu_seconds_total
go_goroutines
controlplane-cluster-autoscaler
rest_client_requests_total
cluster_autoscaler_last_activity
cluster_autoscaler_cluster_safe_to_autoscale
cluster_autoscaler_scale_down_in_cooldown
cluster_autoscaler_scaled_up_nodes_total
cluster_autoscaler_unneeded_nodes_count
cluster_autoscaler_unschedulable_pods_count
cluster_autoscaler_nodes_count
cloudprovider_azure_api_request_errors
cloudprovider_azure_api_request_duration_seconds_bucket
cloudprovider_azure_api_request_duration_seconds_count
controlplane-kube-scheduler
scheduler_pending_pods
scheduler_unschedulable_pods
scheduler_pod_scheduling_attempts
scheduler_queue_incoming_pods_total
scheduler_preemption_attempts_total
scheduler_preemption_victims
scheduler_scheduling_attempt_duration_seconds
scheduler_schedule_attempts_total
scheduler_pod_scheduling_duration_seconds
controlplane-kube-controller-manager
rest_client_request_duration_seconds
rest_client_requests_total
workqueue_depth