Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Untuk menyerap metrik pemantauan mandiri Prometheus dari Managed Service for Prometheus, terapkan manifes PodMonitoring berikut:
# Copyright 2022 Google LLC## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## https://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.apiVersion:monitoring.googleapis.com/v1kind:PodMonitoringmetadata:namespace:gmp-systemname:collectorlabels:app.kubernetes.io/name:collectorapp.kubernetes.io/part-of:google-cloud-managed-prometheusspec:selector:matchLabels:app.kubernetes.io/name:collectorendpoints:-port:prom-metricsinterval:30smetricRelabeling:-sourceLabels:[__name__]regex: > prometheus_target.*|prometheus_sd.*|net_conntrack_.*action:drop-port:cfg-rel-metricsinterval:30s---apiVersion:monitoring.googleapis.com/v1kind:PodMonitoringmetadata:namespace:gmp-systemname:rule-evaluatorlabels:app.kubernetes.io/name:rule-evaluatorapp.kubernetes.io/part-of:google-cloud-managed-prometheusspec:selector:matchLabels:app.kubernetes.io/name:rule-evaluatorendpoints:-port:r-eval-metricsinterval:30s-port:cfg-rel-metricsinterval:30s---apiVersion:monitoring.googleapis.com/v1kind:PodMonitoringmetadata:namespace:gmp-systemname:gmp-operatorlabels:app.kubernetes.io/name:gmp-operatorapp.kubernetes.io/part-of:google-cloud-managed-prometheusspec:selector:matchLabels:app.kubernetes.io/name:gmp-operatorendpoints:-port:metricsinterval:30s---apiVersion:monitoring.googleapis.com/v1kind:PodMonitoringmetadata:namespace:gmp-systemname:alertmanagerlabels:app.kubernetes.io/name:alertmanagerapp.kubernetes.io/part-of:google-cloud-managed-prometheusspec:selector:matchLabels:app.kubernetes.io/name:alertmanagerendpoints:-port:alertmanagerinterval:30s-port:cfg-rel-metricsinterval:30s
Anda dapat menginstal manifes dengan menyalinnya ke file lokal, lalu menjalankan
kubectl apply -f FILE_NAME.
Anda juga dapat menginstal manifes menggunakan Terraform.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-11-27 UTC."],[],[]]