prometheus_custom_values.yaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # Define persistent storage for Prometheus (PVC)
  2. prometheus:
  3. prometheusSpec:
  4. storageSpec:
  5. volumeClaimTemplate:
  6. spec:
  7. accessModes: ["ReadWriteOnce"]
  8. storageClassName: do-block-storage
  9. resources:
  10. requests:
  11. storage: 5Gi
  12. # Define persistent storage for Grafana (PVC)
  13. grafana:
  14. # Set password for Grafana admin user
  15. adminPassword: letmein
  16. persistence:
  17. enabled: true
  18. storageClassName: do-block-storage
  19. accessModes: ["ReadWriteOnce"]
  20. size: 5Gi
  21. # Define persistent storage for Alertmanager (PVC)
  22. alertmanager:
  23. alertmanagerSpec:
  24. storage:
  25. volumeClaimTemplate:
  26. spec:
  27. accessModes: ["ReadWriteOnce"]
  28. storageClassName: do-block-storage
  29. resources:
  30. requests:
  31. storage: 5Gi
  32. # Change default node-exporter port
  33. prometheus-node-exporter:
  34. service:
  35. port: 30206
  36. targetPort: 30206
  37. # Disable Etcd metrics
  38. kubeEtcd:
  39. enabled: false
  40. # Disable Controller metrics
  41. kubeControllerManager:
  42. enabled: false
  43. # Disable Scheduler metrics
  44. kubeScheduler:
  45. enabled: false
  46. prometheus:
  47. prometheusSpec:
  48. additionalScrapeConfigs:
  49. # Scrape config for service endpoints.
  50. #
  51. # The relabeling allows the actual service scrape endpoint to be configured
  52. # via the following annotations:
  53. #
  54. # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
  55. # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
  56. # to set this to `https` & most likely set the `tls_config` of the scrape config.
  57. # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
  58. # * `prometheus.io/port`: If the metrics are exposed on a different port to the
  59. # service then set this appropriately.
  60. - job_name: 'kubernetes-service-endpoints'
  61. kubernetes_sd_configs:
  62. - role: endpoints
  63. relabel_configs:
  64. - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
  65. action: keep
  66. regex: true
  67. - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
  68. action: replace
  69. target_label: __scheme__
  70. regex: (https?)
  71. - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
  72. action: replace
  73. target_label: __metrics_path__
  74. regex: (.+)
  75. - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
  76. action: replace
  77. target_label: __address__
  78. regex: ([^:]+)(?::\d+)?;(\d+)
  79. replacement: $1:$2
  80. - action: labelmap
  81. regex: __meta_kubernetes_service_label_(.+)
  82. - source_labels: [__meta_kubernetes_namespace]
  83. action: replace
  84. target_label: kubernetes_namespace
  85. - source_labels: [__meta_kubernetes_service_name]
  86. action: replace
  87. target_label: kubernetes_name
  88. - source_labels: [__meta_kubernetes_service_name]
  89. action: drop
  90. regex: 'node-exporter'
  91. # Example scrape config for pods
  92. #
  93. # The relabeling allows the actual pod scrape endpoint to be configured via the
  94. # following annotations:
  95. #
  96. # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
  97. # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
  98. # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
  99. - job_name: 'kubernetes-pods'
  100. kubernetes_sd_configs:
  101. - role: pod
  102. relabel_configs:
  103. - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
  104. action: keep
  105. regex: true
  106. - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
  107. action: replace
  108. target_label: __metrics_path__
  109. regex: (.+)
  110. - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
  111. action: replace
  112. regex: ([^:]+)(?::\d+)?;(\d+)
  113. replacement: $1:$2
  114. target_label: __address__
  115. - action: labelmap
  116. regex: __meta_kubernetes_pod_label_(.+)
  117. - source_labels: [__meta_kubernetes_namespace]
  118. action: replace
  119. target_label: kubernetes_namespace
  120. - source_labels: [__meta_kubernetes_pod_name]
  121. action: replace
  122. target_label: kubernetes_pod_name