{"id":21627,"date":"2022-04-27T14:16:24","date_gmt":"2022-04-27T05:16:24","guid":{"rendered":"https:\/\/labs.gree.jp\/blog\/?p=21627"},"modified":"2022-04-27T14:16:24","modified_gmt":"2022-04-27T05:16:24","slug":"post21627","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2022\/04\/21627\/","title":{"rendered":"Managed Prometheus\u3092\u7528\u3044\u305fGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u306e\u5c0f\u6797\u3067\u3059\u3002<\/p>\n<p>GCP\u74b0\u5883\u306e\u76e3\u8996\u57fa\u76e4\u304c\u4e00\u6bb5\u843d\u3057\u5b9f\u7e3e\u3082\u7a4d\u3081\u3066\u304d\u305f\u306e\u3067\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u30e1\u30c8\u30ea\u30c3\u30af\u306b\u7126\u70b9\u3092\u5f53\u3066\u3066\u3044\u307e\u3059\u3002Prometheus\u3092\u7528\u3044\u305fGCP\u76e3\u8996\u57fa\u76e4\u3092\u691c\u8a0e\u3057\u3066\u3044\u308b\u65b9\u3084\u3001Managed Prometheus\u3092\u691c\u8a0e\u3057\u3066\u3044\u308b\u65b9\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<h2 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\">\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/h2>\n<p>\u6bd4\u8f03\u306e\u305f\u3081\u306bAWS EKS\u74b0\u5883\u3068\u5408\u308f\u305b\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-AWS(EKS)\">AWS (EKS)<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-21639\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring-600x277.png\" alt=\"\" width=\"600\" height=\"277\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring-600x277.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring-830x383.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring-276x127.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring-768x355.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/eks-monitoring.png 892w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>AWS EKS\u74b0\u5883\u3067\u306f\u3001\u76e3\u8996\u7528EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u3042\u308a\u3001k8s Cluster\u5185\u306b\u306fExporter\u306e\u307f\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<p>k8s Cluster\u5916\u90e8\u304b\u3089kubernetes_sd_config\u3092\u7528\u3044\u305fService Discovery\u3092\u884c\u3044\u3001\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u56de\u53ce\u3057\u307e\u3059\u3002AWS\u74b0\u5883\u306f\u30d7\u30ed\u30c0\u30af\u30c8\u306b\u3088\u3063\u3066VM, \u30b3\u30f3\u30c6\u30ca\u306e\u5229\u7528\u304c\u307e\u3061\u307e\u3061\u306a\u305f\u3081\u3001\u4e21\u30b1\u30fc\u30b9\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u3088\u3046\u76e3\u8996\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u30b3\u30f3\u30c6\u30ca\u3067\u306f\u306a\u304fVM\u3068\u3057\u3066\u72ec\u7acb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>RDS\u306a\u3069Managed Service\u306f\u5f8c\u8ff0\u3059\u308bMulti Target\u65b9\u5f0f\u3067\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u56de\u53ce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Yusura\u3068\u306f\u3001\u793e\u5185\u3067\u4f5c\u6210\u3055\u308c\u305f\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u57fa\u76e4\u3067\u3059\u3002\u30a2\u30e9\u30fc\u30c8\u306e\u632f\u308a\u5206\u3051\u3084\u96c6\u7d04\u3001\u6291\u5236\u51e6\u7406\u3092\u884c\u3044PagerDuty\u3084Slack\u3078\u901a\u77e5\u3057\u307e\u3059\u3002\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u89e6\u308c\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"blog-card\">\n<div class=\"blog-card-body-outer\">\n<div class=\"blog-card-body\">\n<h5 class=\"blog-card-title\">\n\t\t\t\t\t\t\t\t<a href=\"https:\/\/labs.gree.jp\/blog\/2017\/05\/16483\/\">SQS\u3001ElastiCache\u3001Lambda\u3067\u4f5c\u308b\u9ad8\u53ef\u7528\u306a\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u30b7\u30b9\u30c6\u30e0<\/a><br \/>\n\t\t\t\t\t\t\t<\/h5>\n<p class=\"blog-card-text\">\n\t\t\t\t\t\t\t\t\u30a4\u30f3\u30d5\u30e9\u306e\u3044\u308f\u307b\u308a\uff08@egmc\uff09\u3067\u3059\u3002 \u30b5\u30fc\u30d0\u76e3\u8996\u3092\u69cb\u6210\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306f\u8272\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306fAWS\u74b0\u5883\u4e0a\u3067\u306e\u76e3\u8996\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306e\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3055\u305b\u3066\u9802\u304d\u2026\t\t\t\t\t\t\t<\/p>\n<div class=\"blog-card-site-title\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/labs.gree.jp\/blog\"><br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/01\/favicon.png\" width=\"16\" height=\"16\" alt=\"\" ><br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGREE Engineering\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"blog-card-image-outer\">\n\t\t\t\t\t\t<a href=\"https:\/\/labs.gree.jp\/blog\/2017\/05\/16483\/\" class=\"blog-card-image-frame\"><br \/>\n\t\t\t\t\t\t\t<img decoding=\"async\" class=\"blog-card-image-src\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1.png\" alt=\"\"><br \/>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/div>\n<\/p><\/div>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-GCP(GKE)\">GCP (GKE)<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-21640\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring-600x331.png\" alt=\"\" width=\"600\" height=\"331\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring-600x331.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring-830x458.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring-276x152.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring-768x424.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2022\/04\/gke-monitoring.png 892w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>GCP\u74b0\u5883\u306f\u57fa\u672c\u7684\u306b\u30b3\u30f3\u30c6\u30ca\u30d9\u30fc\u30b9\u3068\u3044\u3046\u793e\u5185\u65b9\u91dd\u306e\u305f\u3081\u3001\u76e3\u8996\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3082\u30b3\u30f3\u30c6\u30ca\u30d9\u30fc\u30b9\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>Prometheus\u306e\u69cb\u6210\u7ba1\u7406\u306b\u306f <a href=\"https:\/\/github.com\/prometheus-community\/helm-charts\/tree\/main\/charts\/kube-prometheus-stack\">kube-prometheus-stack<\/a> \u3092\u5229\u7528\u3057\u3001Prometheus Operator CRD(PodMonitor, ServiceMonitor)\u3067scrape config\u3092\u7ba1\u7406\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001Prometheus\u306eLong Term Storage\u306b\u306f <a href=\"https:\/\/grafana.com\/products\/cloud\/\">Grafana Cloud<\/a> \u306eHosted Prometheus(Cortex)\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Cloud SQL\u306a\u3069Managed Service\u306b\u5bfe\u3057\u3066MySQL\u306a\u3069\u306eExporter\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001AWS\u540c\u69d8Multi Target\u65b9\u5f0f\u3067\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u56de\u53ce\u3057\u307e\u3059\u3002Cloud Functions\u306a\u3069GCP\u56fa\u6709\u306eService\u306b\u95a2\u3057\u3066\u306f\u3001Cloud Monitoring Alert Policy\u3067\u30a2\u30e9\u30fc\u30c8\u3092\u8a55\u4fa1\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30e9\u30fc\u30c8\u6291\u5236\u3092Alertmanager\u3067\u7d71\u4e00\u3059\u308b\u90fd\u5408\u4e0a\u3001Payload\u3092\u5909\u63db\u3059\u308bFunction\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-\u8a2d\u8a08\u6642\u306b\u8003\u616e\u3057\u305f\u3053\u3068\">\u8a2d\u8a08\u6642\u306b\u8003\u616e\u3057\u305f\u3053\u3068<\/h2>\n<p>AWS EKS\u74b0\u5883\u3068\u6bd4\u8f03\u3057\u3001GCP GKE\u74b0\u5883\u306f\u30b3\u30f3\u30c6\u30ca\u30d9\u30fc\u30b9\u3067\u3042\u308b\u70b9\u3001Managed Prometheus\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u70b9\u3067\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306b\u3064\u3044\u3066\u8a2d\u8a08\u6642\u306e\u8003\u616e\u4e8b\u9805\u3092\u3044\u304f\u3064\u304b\u8ff0\u3079\u307e\u3059\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-AWS\u74b0\u5883\u3068UI\/UX\u3092\u63c3\u3048\u308b\">AWS\u74b0\u5883\u3068UI\/UX\u3092\u63c3\u3048\u308b<\/h3>\n<p>\u5229\u7528\u8005\u306e\u5b66\u7fd2\u30b3\u30b9\u30c8\u3092\u4e0b\u3052\u308b\u305f\u3081\u3001AWS\u74b0\u5883\u3068\u4f7f\u3044\u52dd\u624b\u3092\u305d\u308d\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>AWS\u74b0\u5883\u3068\u5171\u901a\u306eExporter\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u5171\u901a\u5316<\/li>\n<li>\u30a2\u30e9\u30fc\u30c8\u306e\u4e00\u6642\u7684\u306a\u6291\u5236\u306b\u306fAlertmanager\u3092\u5229\u7528<\/li>\n<li>\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u57fa\u76e4\u306fYusura\u3092\u5229\u7528<\/li>\n<\/ul>\n<p>\u793e\u5185\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u306f\u65e2\u5b58\u306e\u30aa\u30f3\u30d7\u30ec\u30df\u30b9, AWS\u3068\u3082\u306bOpenMetrics\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3078\u7d71\u4e00\u3055\u308c\u3001\u30e9\u30d9\u30eb\u3053\u305d\u9055\u3044\u306f\u3042\u308a\u307e\u3059\u304c\u30e1\u30c8\u30ea\u30c3\u30af\u306f\u307b\u307c\u5171\u901a\u306e\u305f\u3081\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9, \u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u306e\u8ee2\u7528\u304c\u5bb9\u6613\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30e9\u30fc\u30c8\u306e\u6291\u5236\u306b\u3064\u3044\u3066\u306f\u30e9\u30d9\u30eb\u5358\u4f4d\u3067\u6291\u5236\u3059\u308b\u8981\u4ef6\u304c\u3042\u308b\u305f\u3081\u3001Cloud Monitoring Alert Policy\u3067\u8a2d\u5b9a\u3057\u305f\u30a2\u30e9\u30fc\u30c8\u3092Alertmanager\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306e\u632f\u308a\u5206\u3051\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u3082AWS\u74b0\u5883\u3068\u540c\u69d8\u306e\u904b\u7528\u30d5\u30ed\u30fc\u3092\u53d6\u308c\u308b\u305f\u3081\u3001GCP\u74b0\u5883\u306e\u305f\u3081\u306b\u624b\u9806\u304c\u5206\u5c90\u3059\u308b\u3088\u3046\u306a\u3053\u3068\u306a\u304f\u904b\u7528\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-ContainerNative,Community\u306b\u5bc4\u305b\u308b\">Container Native, Community\u306b\u5bc4\u305b\u308b<\/h3>\n<p>AWS\u74b0\u5883\u306e\u76e3\u8996\u57fa\u76e4\u306f7\u5e74\u4ee5\u4e0a, \u691c\u8a3c\u671f\u9593\u3092\u542b\u3081\u308b\u3068Prometheus v0.13\u304b\u3089\u904b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5f53\u6642\u793e\u5185\u3067\u306f\u30b3\u30f3\u30c6\u30ca\u3067\u306a\u304fVM\u304c\u4e3b\u6d41\u3067\u3042\u3063\u305f\u308a\u3001Long Term Storage\u306eOSS\u304c\u5b58\u5728\u3057\u306a\u3044\u306e\u3067downsampler\u3092\u5b9f\u88c5\u3057\u305f\u308a\u3068\u3001\u69cb\u6210\u7ba1\u7406\u30fb\u5b89\u5b9a\u904b\u7528\u3059\u308b\u305f\u3081\u306b\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u304c\u793e\u5185\u3067\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u5b9f\u7e3e\u304c\u3042\u308a\u5b89\u5b9a\u3057\u3066\u3044\u308b\u4e00\u65b9\u3067\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u72ec\u81ea\u9032\u5316\u3057\u3001\u65b0\u898f\u30e1\u30f3\u30d0\u30fc\u306e\u5b66\u7fd2\u30b3\u30b9\u30c8\u3068\u3044\u3046\u9762\u3067\u306f\u8ab2\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u30671\u3064\u306e\u8a66\u307f\u3068\u3057\u3066\u3001GCP\u74b0\u5883\u3067\u306f\u76e3\u8996\u57fa\u76e4\u3082VM\u30d9\u30fc\u30b9\u304b\u3089\u30b3\u30f3\u30c6\u30ca\u30d9\u30fc\u30b9\u3078\u5909\u66f4\u3059\u308b\u3068\u3044\u3046\u9078\u629e\u3092\u53d6\u308a\u307e\u3057\u305f\u3002Prometheus Operator\u3084kube-prometheus(-stack)\u306a\u3069\u3001\u30b3\u30f3\u30c6\u30ca\u30d9\u30fc\u30b9\u306e\u69cb\u6210\u7ba1\u7406\u306b\u3064\u3044\u3066\u306f\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3067\u975e\u5e38\u306b\u4fbf\u5229\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002VM Image\u306e\u4f5c\u6210\u30fb\u7ba1\u7406\u304c\u4e0d\u8981\u306b\u306a\u308b\u3001Deploy, Auto Healing\u306fk8s\u304c\u53d7\u3051\u6301\u3063\u3066\u304f\u308c\u308b\u3001\u306a\u3069\u904b\u7528\u30b3\u30b9\u30c8\u306e\u30e1\u30ea\u30c3\u30c8\u3082\u53d7\u3051\u3089\u308c\u307e\u3057\u305f\u3002\u307e\u305f\u3001kubernetes-mixin\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u3084\u30ec\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30eb\u30fc\u30eb\u306fAWS EKS\u74b0\u5883\u306b\u3082\u53cd\u6620\u3055\u308c\u3001AWS EKS\u74b0\u5883\u306e\u54c1\u8cea\u3092\u4e0a\u3052\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-ManagedPrometheus\u306e\u63a1\u7528\">Managed Prometheus\u306e\u63a1\u7528<\/h3>\n<p>AWS\u74b0\u5883\u3067\u306fLong Term Storage\u306f\u72ec\u81ea\u306e\u6a5f\u69cb\u3067\u3057\u305f\u304c\u3001\u6700\u8fd1\u3067\u306fThanos\u3084Cortex\u306a\u3069Long Term Storage\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u754c\u9688\u304c\u6d3b\u767a\u3067\u3059\u3002\u5408\u308f\u305b\u3066Grafana Cloud\u306eHosted Prometheus\u3084\u3001AWS\u306eAmazon Managed Service for Prometheus\u306a\u3069\u3001Prometheus\u306eManaged Service\u304c\u3053\u3053\u6570\u5e74\u3067\u7acb\u3066\u7d9a\u3051\u306b\u767b\u5834\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u591a\u69d8\u306a\u4e8b\u696d\u5f62\u614b\u3084\u3055\u307e\u3056\u307e\u306a\u90fd\u5408\u4e0a\u3001\u5f0a\u793e\u3067\u306f\u30d7\u30ed\u30c0\u30af\u30c8\u3054\u3068\u306bPrometheus\u3092\u5206\u96e2\u3057\u3066\u3044\u307e\u3059\u3002Long Term Storage\u306f\u5de8\u5927\u306a1\u30af\u30e9\u30b9\u30bf\u3092\u904b\u7528\u3059\u308b\u4e0a\u3067\u306f\u30b3\u30b9\u30c8\u30e1\u30ea\u30c3\u30c8\u306b\u512a\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5c0f\u3055\u306a\u30af\u30e9\u30b9\u30bf\u3092\u5927\u91cf\u306b\u7ba1\u7406\u3059\u308b\u306e\u306f\u904b\u7528\u8ca0\u8377\u304c\u9ad8\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u30672\u3064\u76ee\u306e\u8a66\u307f\u3068\u3057\u3066Managed Prometheus\u3092\u5229\u7528\u3057\u307e\u3057\u305f\u3002\u691c\u8a3c\u5f53\u6642\u306fAMP\u304c\u3061\u3087\u3046\u3069\u767a\u8868\u3055\u308c\u305f\u3053\u308d\u3067\u3001GA\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3068\u3057\u3066\u306fGrafana Cloud1\u629e\u3067\u3057\u305f\u3002\u4eca\u306a\u3089Google Cloud Managed Service for Prometheus\u3082\u6709\u529b\u306a\u9078\u629e\u80a2\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<h2 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-\u76f4\u9762\u3057\u305f\u8ab2\u984c\">\u76f4\u9762\u3057\u305f\u8ab2\u984c<\/h2>\n<p>\u691c\u8a3c\u3084\u5b9f\u904b\u7528\u306e\u904e\u7a0b\u3067\u76f4\u9762\u3057\u305f\u8ab2\u984c\u3068\u305d\u306e\u5bfe\u5fdc\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-TimeSeries\u524a\u6e1b\">Time Series\u524a\u6e1b<\/h3>\n<blockquote><p>Default deployments of preconfigured Prometheus-Grafana-Alertmanager stacks like kube-prometheus scrape and store tens of thousands of active series when launched into a K8s cluster. A vanilla deployment of kube-prometheus in an unloaded 3-Node cluster, configured to remote_write to Grafana Cloud will count towards roughly ~50,000 active series of metrics usage.<\/p>\n<p><a href=\"https:\/\/grafana.com\/docs\/grafana-cloud\/metrics-control-usage\/control-prometheus-metrics-usage\/usage-reduction-k8s\/\">https:\/\/grafana.com\/docs\/grafana-cloud\/metrics-control-usage\/control-prometheus-metrics-usage\/usage-reduction-k8s\/<\/a><\/p><\/blockquote>\n<p>k8s\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3067\u306f\u30e1\u30c8\u30ea\u30c3\u30af\u304c\u591a\u304f\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u73fe\u72b6Managed Prometheus\u306e\u591a\u304f\u306f\u3001\u30e1\u30c8\u30ea\u30c3\u30af\u3068\u30e9\u30d9\u30eb\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3042\u308btime series\u306e\u5358\u4f4d\u3067\u8ab2\u91d1\u304c\u884c\u308f\u308c\u307e\u3059\u3002kube-prometheus(-stack)\u3092\u5229\u7528\u3057\u3001\u3046\u3063\u304b\u308a\u3059\u3079\u3066\u306etime series\u3092remote write\u3057\u3066\u3057\u307e\u3046\u3068\u60f3\u5b9a\u4ee5\u4e0a\u306e\u91d1\u984d\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3084\u30a2\u30e9\u30fc\u30c8\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u305d\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u898b\u3066\u3044\u308b\u4eba\u306f\u3044\u308b\u304b\u3001\u306a\u3069\u9700\u8981\u3068\u8981\u4ef6\u3092\u6574\u7406\u3057\u3064\u3064\u3001\u5730\u9053\u306btime series\u3092\u524a\u6e1b\u3057\u307e\u3059\u3002<\/p>\n<p>\u9700\u8981\u3068\u8981\u4ef6\u3067\u306f\u5177\u4f53\u6027\u304c\u3042\u307e\u308a\u306a\u3044\u306e\u3067\u3001\u6211\u3005\u304c\u3068\u3063\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u30923\u70b9\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h4 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-scrape\u3059\u308bmetrics\u3092\u6e1b\u3089\u3059\">scrape\u3059\u308bmetrics\u3092\u6e1b\u3089\u3059<\/h4>\n<p>node-exporter\u306ecollector option\u3084kube-state-metrics\u306eresources option\u306a\u3069\u3001\u30b3\u30de\u30f3\u30c9\u5f15\u6570\u3067\u30e1\u30c8\u30ea\u30c3\u30af\u306eexport\u3092\u505c\u6b62\u3057\u307e\u3059\u3002exporter option\u3067\u5236\u5fa1\u304c\u96e3\u3057\u3044\u5834\u5408\u306f\u3001Prometheus\u306escrape config(PodMonitor,ServiceMonitor)\u306erelabeling\u3067drop\u3057\u307e\u3059\u3002node-exporter\u306ffilesystem\u3084network\u304c\u3001kube-state-metrics\u306fconfigmap, secret\u304c\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u9ad8\u3081\u3067\u524a\u6e1b\u52b9\u679c\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-remotewrite\u3059\u308bmetrics\u3092\u6e1b\u3089\u3059\">remote write\u3059\u308bmetrics\u3092\u6e1b\u3089\u3059<\/h4>\n<p>Local Prometheus\u306b\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u4fdd\u6301\u3057\u306a\u304c\u3089\u3082\u3001Remote Prometheus\u306b\u306f\u4fdd\u5b58\u3057\u306a\u3044\u3068\u3044\u3046\u5272\u308a\u5207\u308a\u3092\u3057\u307e\u3059\u3002remote write\u6642\u306erelabeling\u306f\u3059\u3079\u3066\u306ejob\u3092\u5bfe\u8c61\u3068\u3057\u305ffilter rule\u3068\u306a\u308b\u305f\u3081\u3001\u4e71\u7528\u3059\u308b\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u56f0\u96e3\u306b\u306a\u308a\u307e\u3059\u3002\u53ef\u80fd\u306a\u9650\u308ascrape config\u306e\u6bb5\u968e\u3067drop\u3067\u304d\u308b\u3068\u7ba1\u7406\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<p>Local Prometheus\u306b\u3060\u3051\u4fdd\u6301\u3057\u3066\u304a\u304d\u305f\u3044\u3068\u3044\u3046\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306f\u4e3b\u306b2\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30ec\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30eb\u30fc\u30eb\u7528\u9014\n<ul>\n<li>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u9ad8\u3044\u30e1\u30c8\u30ea\u30c3\u30af\u306f\u30ec\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30eb\u30fc\u30eb\u3067\u751f\u6210\u3057\u305f\u30e1\u30c8\u30ea\u30c3\u30af\u3060\u3051\u3092remote write\u3057\u307e\u3059<\/li>\n<li>kubelet(cAdvisor)\u306f\u524a\u6e1b\u52b9\u679c\u304c\u9ad8\u3081\u3067\u3059<\/li>\n<li>kube-state-metrics\u306epod,container\u306a\u3069\u306f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u4f5c\u308b\u4e0a\u3067\u6709\u7528\u306a\u306e\u3067remote write\u3057\u3066\u3044\u307e\u3059\n<ul>\n<li>pod, container\u306b\u5bfe\u3057\u3066\u5272\u308a\u5207\u308a\u304c\u3067\u304d\u308b\u3068\u3088\u308a\u5927\u5e45\u306b\u524a\u6e1b\u3067\u304d\u307e\u3059<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8\u7528\u9014\n<ul>\n<li>\u901a\u5e38\u306e\u904b\u7528\u6642\u306f\u307b\u307c\u6c17\u306b\u306a\u3089\u306a\u3044\u304c\u3001\u5165\u308a\u7d44\u3093\u3060\u969c\u5bb3\u6642\u306b\u306f\u3042\u308b\u3068\u52a9\u304b\u308b\u30e1\u30c8\u30ea\u30c3\u30af\u304c\u8a72\u5f53\u3057\u307e\u3059<\/li>\n<li>namespace\u306a\u3069\u30e9\u30d9\u30eb\u30d9\u30fc\u30b9\u3067filter\u3057\u307e\u3059<\/li>\n<li>\u8cbb\u7528\u5bfe\u52b9\u679c\u3092\u9451\u307fkube-system\u306emetrics\u306fremote write\u3092\u3084\u3081\u307e\u3057\u305f\n<ul>\n<li>\u76e3\u8996\u7528agent\u306f\u5225\u306enamespace\u3067\u7ba1\u7406\u3057\u3066\u304a\u308a\u3001\u3053\u306e\u5834\u5408kube-system\u306b\u306fGKE\u306e\u30b7\u30b9\u30c6\u30e0\u7528\u30b3\u30f3\u30c6\u30ca\u306e\u307f\u304c\u5c5e\u3057\u307e\u3059<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-stackdriver_exporter\u306e\u5229\u7528\u3092\u63a7\u3048\u308b\">stackdriver_exporter\u306e\u5229\u7528\u3092\u63a7\u3048\u308b<\/h4>\n<p>Prometheus\u306b\u6163\u308c\u3066\u3044\u308b\u3068\u3059\u3079\u3066\u3092PromQL\u3067\u66f8\u304d\u305f\u304f\u306a\u308a\u307e\u3059\u3002Cloud Monitoring\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u3092Prometheus\u306b\u53d6\u308a\u8fbc\u3081\u308bstackdriver_exporter\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001PromQL\u3067Cloud Monitoring\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u64cd\u4f5c\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\u3059\u3070\u3089\u3057\u3044OSS\u3067\u3059\u304c\u3001remote read\u3067\u306f\u306a\u304fexporter\u306a\u306e\u3067time series\u306f\u5897\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002time series\u524a\u6e1b\u306e\u89b3\u70b9\u304b\u3089Cloud Monitoring\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u306fCloud Monitoring\u306eDatasource\u3001\u305d\u3057\u3066Cloud Monitoring Alert Policy\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u7528Exporter\u3068\u306e\u30e9\u30d9\u30eb\u6574\u5408\u6027\u3092\u53d6\u308a\u305f\u3044\u5834\u5408\u306a\u3069\u3001\u5fc5\u8981\u306a\u3082\u306e\u306b\u95a2\u3057\u3066\u306fstackdrvier_exporter\u3067\u56de\u53ce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>time series\u306e\u524a\u6e1b\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u3082\u89e6\u308c\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"blog-card\">\n<div class=\"blog-card-body-outer\">\n<div class=\"blog-card-body\">\n<h5 class=\"blog-card-title\">\n\t\t\t\t\t\t\t\t<a href=\"https:\/\/labs.gree.jp\/blog\/2021\/10\/21408\/\">10\u5e74\u3082\u306e\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u53ce\u96c6\u6a5f\u69cb\u3092\u30ea\u30d7\u30ec\u30fc\u30b9\u3057\u305f\u8a71<\/a><br \/>\n\t\t\t\t\t\t\t<\/h5>\n<p class=\"blog-card-text\">\n\t\t\t\t\t\t\t\t\u30a4\u30f3\u30d5\u30e9\u306e\u3044\u308f\u307b\u308a\uff08@egmc\uff09\u3067\u3059\u3002 \u4e45\u3005\u306e\u30a8\u30f3\u30c8\u30ea\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30a4\u30f3\u30d5\u30e9\u306eMonitoring Unit\u3068\u3057\u3066\u9577\u671f\u7684\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u305f\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306e\u30ea\u30d7\u30ec\u30fc\u30b9\u306b\u3064\u3044\u3066\u306e\u304a\u8a71\u2026\t\t\t\t\t\t\t<\/p>\n<div class=\"blog-card-site-title\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/labs.gree.jp\/blog\"><br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/01\/favicon.png\" width=\"16\" height=\"16\" alt=\"\" ><br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGREE Engineering\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-GrafanaAlert\u306e\u5229\u7528\">Grafana Alert\u306e\u5229\u7528<\/h3>\n<p>\u30a2\u30e9\u30fc\u30c8\u8a55\u4fa1\u306b\u3064\u3044\u3066\u3001Prometheus Alert Engine, Cloud Monitoring Alert Engine\u30682\u3064\u3042\u308b\u3053\u3068\u306b\u9055\u548c\u611f\u3092\u611f\u3058\u305f\u65b9\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u521d\u671f\u306e\u76e3\u8996\u57fa\u76e4\u3067\u306fGrafana\u306e\u30a2\u30e9\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u306e\u307f\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3067Prometheus, Cloud Monitoring\u4e21\u30e1\u30c8\u30ea\u30c3\u30af\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u8a55\u4fa1\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u306e\u7d99\u7d9a\u6761\u4ef6\u306e\u8a55\u4fa1\u65b9\u6cd5\u306b\u7656\u304c\u3042\u308a\u3001\u5f0a\u793e\u3067\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u30de\u30c3\u30c1\u3057\u306a\u304b\u3063\u305f\u305f\u3081\u5229\u7528\u3092\u4e2d\u6b62\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Grafana Alert\u3067\u306fFor 5m\u306a\u3069\u7d99\u7d9a\u6642\u9593\u306e\u6307\u5b9a\u304c\u3042\u308b\u5834\u5408\u3001\u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u3068\u3057\u3066\u771f\u304c5\u5206\u7d99\u7d9a\u3059\u308c\u3070\u767a\u7832\u3068\u3044\u3046\u8a55\u4fa1\u30ed\u30b8\u30c3\u30af\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u3068\u304dtime series\u304c\u540c\u4e00\u304b\u3069\u3046\u304b\u306f <a href=\"https:\/\/github.com\/grafana\/grafana\/issues\/17432\">\u8003\u616e\u3055\u308c\u307e\u305b\u3093<\/a> \u3002\u3053\u308c\u306b\u3088\u308a\u30b3\u30f3\u30c6\u30ca\u30c7\u30d7\u30ed\u30a4\u6642\u306a\u3069\u3001\u5358\u4e00\u306e\u30b3\u30f3\u30c6\u30ca(time series)\u3068\u3057\u3066\u306f\u5373\u6642\u5fa9\u65e7\u3059\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u30b3\u30f3\u30c6\u30ca\u6570\u304c\u591a\u3044\u5834\u5408\u306a\u3069\u306f\u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u3068\u3057\u3066\u306e\u771f\u304c\u7d99\u7d9a\u3057\u3066\u3057\u307e\u3044\u8aa4\u767a\u7832\u306e\u539f\u56e0\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u5bfe\u51e6\u306e\u305f\u3081\u306b\u3001\u305d\u308c\u305e\u308c\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u6271\u3046\u306e\u304c\u5f97\u610f\u306a\u30a2\u30e9\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u3054\u3068\u306b\u5f0f\u3092\u8a55\u4fa1\u3059\u308b\u3088\u3046\u306b\u5206\u96e2\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3053\u308c\u306f\u6a5f\u80fd\u3068\u3057\u3066\u306f\u53e4\u3044\u8a71\u3067\u3001Grafana v8\u304b\u3089<a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/alerting\/unified-alerting\/\">\u65b0\u3057\u3044\u30a2\u30e9\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3<\/a>\u304c\u5229\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5f0a\u793e\u3067\u306f\u30a2\u30e9\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u306e\u69cb\u6210\u306f\u4e0a\u8ff0\u306e\u901a\u308a\u3067\u3059\u304c\u3001Unified Alert\u3067\u306f\u5148\u306e\u554f\u984c\u304c\u89e3\u6d88\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-ServiceDiscoveryforManagedService\">Service Discovery for Managed Service<\/h3>\n<p>Prometheus Exporter\u306f\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u56de\u53ce\u3057\u305f\u3044\u30b3\u30f3\u30c6\u30ca\u306esidecar\u3068\u3057\u3066\u3001\u307e\u305fNode\u306eDaemonSet\u3068\u3057\u3066\u3001\u3068\u3044\u3063\u305f\u3088\u3046\u306b\u76e3\u8996\u5bfe\u8c61\u306e\u5074\u306bAgent\u30921\u5bfe1\u3067\u914d\u7f6e\u3059\u308b\u3001\u3068\u3044\u3046\u30b7\u30f3\u30d7\u30eb\u306a\u8a2d\u8a08\u601d\u60f3\u3092\u53d6\u3063\u3066\u3044\u307e\u3059\u3002\u76e3\u8996\u5bfe\u8c61\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u304c\u81ea\u8eab\u3067\u7ba1\u7406\u3067\u304d\u308b\u7bc4\u56f2\u3067\u306f\u975e\u5e38\u306b\u3088\u304f\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001Managed RDB\u3084KVS\u306a\u3069\u81ea\u8eab\u306e\u7ba1\u7406\u5916\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u95a2\u3057\u3066\u306f\u5c11\u3057\u3084\u3084\u3053\u3057\u304f\u306a\u308a\u3001\u5404\u793e\u5de5\u592b\u3057\u3066\u3044\u308b\u3053\u3068\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f0a\u793e\u3067\u884c\u3063\u3066\u3044\u308b\u624b\u6cd5\u306e\uff11\u3064\u3068\u3057\u3066\u3001Multi Target\u65b9\u5f0f\u304c\u3042\u308a\u307e\u3059\u3002Multi Target\u65b9\u5f0f\u3067\u306f\u30011\u3064\u306eExporter\u304c\u8907\u6570Target\u304b\u3089\u30e1\u30c8\u30ea\u30c3\u30af\u3092\u56de\u53ce\u3057\u307e\u3059\u3002\u3053\u308c\u306f <a href=\"https:\/\/github.com\/oliver006\/redis_exporter\">redis_exporter<\/a> \u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u3001file_sd, http_sd\u3067target\u3092\u53d6\u5f97\u3057\u3001exporter\u304c\u52d5\u7684\u306b\u30e1\u30c8\u30ea\u30c3\u30af\u56de\u53ce\u5bfe\u8c61\u3092\u5909\u66f4\u3059\u308b\u3068\u3044\u3046\u3057\u304f\u307f\u3067\u3059\u3002<\/p>\n<pre class=\"\">scrape_configs:\n  - job_name: 'redis_exporter_targets'\n    file_sd_configs:\n      - files:\n        - targets-redis-instances.json\n    metrics_path: \/scrape\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - source_labels: [__param_target]\n        target_label: instance\n      - target_label: __address__\n        replacement: REDIS-EXPORTER-HOSTNAME:9121\n<\/pre>\n<p>\u3053\u306eredis_exporter\u306e\u4f8b\u3067\u306fhttp\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u5148\u3068\u3057\u3066exporter\u3001\u30e1\u30c8\u30ea\u30c3\u30af\u306e\u56de\u53ce\u5148\u6307\u5b9a\u3092target\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5b9f\u88c5\u65b9\u6cd5\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u304c\u3042\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u3044\u304f\u3064\u304b\u306eexporter\u304c\u72ec\u81ea\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3067\u63d0\u4f9b\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u72b6\u6cc1\u3067\u3059\u3002mysqld_exporter\u306f <a href=\"https:\/\/github.com\/prometheus\/mysqld_exporter\/issues\/452\">issue<\/a> \u3067\u8b70\u8ad6\u3055\u308c\u3066\u3044\u307e\u3059\u304cMulti Target\u306f\u672a\u5bfe\u5fdc\u3067\u3059\u3002\u793e\u5185\u3067\u306ffork\u3057Multi Target\u306e\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u3066\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f0a\u793e\u306eGCP\u74b0\u5883\u3067\u306fCloud SQL, Memorystore Memcache\/Redis\u304c\u3088\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u306fOSS\u3067Multi Target\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308bRedis\u3092\u4f8b\u3068\u3057\u3066Multi Target\u306e\u5b9f\u88c5\u6982\u8981\u3092\u7c21\u5358\u306b\u8aac\u660e\u3057\u307e\u3059\u3002scrape config\u3068\u3057\u3066\u306f\u5148\u306eredis_exporter\u3068\u304a\u304a\u3080\u306d\u540c\u3058\u3067\u3001 <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/http_sd\/\">http_sd<\/a> \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u70b9\u3060\u3051\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"\">- job_name: redis\n  metrics_path: \/scrape\n  http_sd_configs:\n    - url: http:\/\/gcp-sd:9981\/sd\/redis\n      refresh_interval: 60s\n  relabel_configs:\n    - source_labels: [ __address__ ]\n      target_label: __param_target\n    - source_labels: [ __param_target ]\n      target_label: instance\n    - target_label: __address__\n      replacement: redis-exporter:9121<\/pre>\n<p>file_sd\u3067\u306f\u306a\u304fhttp_sd\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u306f\u3001\u7ba1\u7406\u3059\u308b\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u304c\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308b\u305f\u3081\u3067\u3059\u3002file_sd\u306e\u5834\u5408Prometheus\u306esidecar\u3084\u5171\u6709\u30dc\u30ea\u30e5\u30fc\u30e0\u3067\u5b9f\u73fe\u3057\u307e\u3059\u304c\u3001http_sd\u306e\u5834\u5408Deployment\u30921\u3064\u7528\u610f\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u6b8b\u308a\u306fRedis\u306etarget\u3092\u8fd4\u3059Service Discovery Agent(\u4e0a\u8a18\u3060\u3068gcp-sd)\u3092\u5b9f\u88c5\u3057\u3066\u3042\u3052\u308c\u3070\u826f\u3055\u305d\u3046\u3067\u3059\u3002\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306ffile_sd\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"\">[\n  {\n    \"targets\": [ \"\", ... ],\n    \"labels\": {\n      \"\": \"\", ...\n    }\n  },\n  ...\n]<\/pre>\n<p>file_sd\u3092\u5b9f\u88c5\u3059\u308b\u4e0a\u3067\u4fbf\u5229\u306a\u306e\u304c\u3001\u4e0b\u8a18\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068file_sd adapter\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/prometheus\/prometheus\/tree\/main\/documentation\/examples\/custom-sd\">https:\/\/github.com\/prometheus\/prometheus\/tree\/main\/documentation\/examples\/custom-sd<\/a><\/p>\n<p>adapter-usage\u306b\u5b9f\u88c5\u4f8b\u304c\u3042\u308a\u307e\u3059\u304c\u3001Discovery(\u4eca\u56de\u3067\u306fMemorystore Redis)\u3092\u5b9f\u88c5\u3057\u3001 Adapter.Run() \u3059\u308c\u3070\u7c21\u5358\u306bfile_sd\u3092\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002\u3042\u3068\u306f\u51fa\u529b\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092http\u306eresponse\u3068\u3057\u3066\u8fd4\u3057\u3066\u3042\u3052\u308c\u3070http_sd\u306e\u3067\u304d\u3042\u304c\u308a\u3067\u3059\u3002\u7d20\u76f4\u306b\u5b9f\u88c5\u3059\u308b\u3068Prometheus\u5074\u306erefresh_interval\u3092\u7121\u8996\u3059\u308b\u5f62\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u305d\u3053\u306b\u76ee\u3092\u7791\u308c\u3070http_sd\u3068\u3057\u3066\u306e\u8981\u4ef6\u306f\u6e80\u305f\u305b\u307e\u3059\u3002\u697d\u3067\u3059\u306d\u3002<\/p>\n<h3 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-kube-prometheus(-stack)\u306e\u66f4\u65b0\">kube-prometheus(-stack)\u306e\u66f4\u65b0<\/h3>\n<blockquote><p>Note that everything is experimental and may change significantly at any time.<\/p>\n<p><a href=\"https:\/\/github.com\/prometheus-operator\/kube-prometheus\">https:\/\/github.com\/prometheus-operator\/kube-prometheus<\/a><\/p><\/blockquote>\n<p>\u3068\u3001\u3042\u308b\u3088\u3046\u306b\u3001kube-prometheus(-stack)\u306f\u5f8c\u65b9\u4e92\u63db\u306e\u306a\u3044\u5909\u66f4\u304c\u305d\u308c\u306a\u308a\u306e\u983b\u5ea6\u3067\u767a\u751f\u3057\u307e\u3059\u3002\u3069\u306e\u30c1\u30e3\u30fc\u30c8\u306b\u3082\u8a00\u3048\u308b\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u66f4\u65b0\u3059\u308b\u969b\u306fChangelog\u3092\u773a\u3081\u3064\u3064\u614e\u91cd\u306bversion up\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001kubernetes-mixin\u7531\u6765\u306e\u30ec\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30eb\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001 <a href=\"https:\/\/github.com\/kubernetes-monitoring\/kubernetes-mixin\/pull\/436\">\u30ea\u30cd\u30fc\u30e0\u304c\u767a\u751f\u3059\u308b<\/a> \u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002version up\u3059\u308b\u969b\u306b\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u904b\u7528\u65b9\u91dd\u3092\u6c7a\u3081\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u5272\u308a\u5207\u3063\u3066\u53e4\u3044\u30e1\u30c8\u30ea\u30c3\u30af\u540d\u306e\u30ec\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30eb\u30fc\u30eb\u3092\u81ea\u8eab\u3067\u8ffd\u52a0\u3057\u3001\u5229\u7528\u3092\u7d9a\u3051\u308b<\/li>\n<li>\u65b0\u65e7\u4e21\u65b9\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u540d\u3067\u30c0\u30d6\u30eb\u30e9\u30a4\u30c8\u3057\u3001\u968f\u6642\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3084\u30a2\u30e9\u30fc\u30c8\u3092\u5207\u308a\u66ff\u3048\u3066\u3044\u304f<\/li>\n<\/ul>\n<h2 id=\"id-20220422ManagedPrometheus\u3092\u7528\u3044\u305fGCPGKE\u76e3\u8996\u57fa\u76e4\u306e\u8a71-\u307e\u3068\u3081\">\u307e\u3068\u3081<\/h2>\n<p>GCP GKE\u74b0\u5883\u3067Prometheus\u3092\u7528\u3044\u305f\u76e3\u8996\u57fa\u76e4\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u5404IaaS\u3067Managed Prometheus\u304c\u7d9a\u3005\u3068\u767a\u8868\u3055\u308c\u305f\u308a\u3001Grafana\u304cAlert Next Generation\u3053\u3068Unified Alert\u3092GA\u3057\u305f\u308a\u3068\u3001Prometheus\/Grafana\u754c\u9688\u306f\u6d3b\u767a\u3067\u3059\u306d\u3002<\/p>\n<p>Managed Prometheus\u306ftime series\u3092\u3069\u308c\u3060\u3051\u524a\u6e1b\u3067\u304d\u308b\u304b\u3068\u3044\u3046\u52dd\u8ca0\u306b\u306a\u308a\u307e\u3059\u3002\u5404\u793e\u3069\u3046\u3044\u3063\u305f\u524a\u6e1b\u30fb\u5272\u308a\u5207\u308a\u3092\u884c\u3063\u3066\u3044\u308b\u306e\u304b\u975e\u5e38\u306b\u8208\u5473\u304c\u3042\u308a\u307e\u3059\u3002\u77e5\u898b\u304c\u5897\u3048\u3066\u3044\u304f\u3068\u826f\u3044\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u306e\u5c0f\u6797\u3067\u3059\u3002 GCP\u74b0\u5883\u306e\u76e3\u8996\u57fa\u76e4\u304c\u4e00\u6bb5\u843d\u3057\u5b9f\u7e3e\u3082\u7a4d\u3081\u3066\u304d\u305f\u306e\u3067\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u30e1\u30c8\u30ea\u30c3\u30af\u306b\u7126\u70b9\u3092\u5f53\u3066\u3066\u3044\u307e\u3059\u3002Prometheus\u3092\u7528\u3044\u305fGCP\u76e3\u8996\u57fa\u76e4\u3092\u691c\u8a0e\u3057 [&hellip;]<\/p>\n","protected":false},"author":192,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[141,212,128,22],"class_list":["post-21627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-gcp","tag-grafana","tag-prometheus","tag-22"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/21627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/192"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=21627"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/21627\/revisions"}],"predecessor-version":[{"id":21647,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/21627\/revisions\/21647"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=21627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=21627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=21627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}