-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1445 from arooshap/modify_deploy.sh
Disabling rules for the development clusters.
- Loading branch information
Showing
2 changed files
with
150 additions
and
4 deletions.
There are no files selected for viewing
142 changes: 142 additions & 0 deletions
142
kubernetes/cmsweb/monitoring/prometheus/aps/prometheus.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
global: | ||
scrape_interval: 15s | ||
evaluation_interval: 15s | ||
|
||
alerting: | ||
alertmanagers: | ||
- static_configs: | ||
- targets: | ||
- cms-monitoring.cern.ch:30093 | ||
|
||
#enable remote write to be able to write to the cmsmonit cluster | ||
remote_write: | ||
- url: http://cms-monitoring-ha1.cern.ch:30428/api/v1/write | ||
queue_config: | ||
max_samples_per_send: 10000 | ||
max_shards: 30 | ||
- url: http://cms-monitoring-ha2.cern.ch:30428/api/v1/write | ||
queue_config: | ||
max_samples_per_send: 10000 | ||
max_shards: 30 | ||
scrape_configs: | ||
#first, we define all the custom jobs that we have for the services | ||
- job_name: cern-magnum-kube-state-metrics | ||
scrape_interval: 1m | ||
scrape_timeout: 1m | ||
static_configs: | ||
- targets: [ "cern-magnum-kube-state-metrics.kube-system.svc.cluster.local:8080" ] | ||
- job_name: "nginx-ingress-controller" | ||
kubernetes_sd_configs: | ||
- role: pod | ||
namespaces: | ||
names: | ||
- kube-system | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_container_port_number] | ||
action: keep | ||
regex: ^(10254) | ||
- job_name: 'quota-exporter' | ||
scrape_interval: 120s | ||
scrape_timeout: 110s | ||
static_configs: | ||
- targets: ['quota-exporter.http.svc.cluster.local:18000'] | ||
#Then, the default job configs | ||
|
||
- job_name: "kubernetes-apiservers" | ||
kubernetes_sd_configs: | ||
- role: endpoints | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] | ||
action: keep | ||
regex: default;kubernetes;https | ||
|
||
- job_name: "kubernetes-nodes" | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
kubernetes_sd_configs: | ||
- role: node | ||
relabel_configs: | ||
- action: labelmap | ||
regex: __meta_kubernetes_node_label_(.+) | ||
- target_label: __address__ | ||
replacement: kubernetes.default.svc:443 | ||
- source_labels: [__meta_kubernetes_node_name] | ||
regex: (.+) | ||
target_label: __metrics_path__ | ||
replacement: /api/v1/nodes/${1}/proxy/metrics | ||
|
||
- job_name: "kubernetes-pods" | ||
kubernetes_sd_configs: | ||
- role: pod | ||
# for more information about prometheus relabeling see | ||
# https://blog.freshtracks.io/prometheus-relabel-rules-and-the-action-parameter-39c71959354a | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] | ||
action: keep | ||
regex: true | ||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] | ||
action: replace | ||
target_label: __metrics_path__ | ||
regex: (.+) | ||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] | ||
action: replace | ||
regex: ([^:]+)(?::\d+)?;(\d+) | ||
replacement: $1:$2 | ||
target_label: __address__ | ||
- source_labels: [__meta_kubernetes_pod_node_name] | ||
action: replace | ||
target_label: host | ||
- action: labeldrop | ||
regex: __meta_kubernetes_pod_label_pod_(.+) | ||
- source_labels: [__meta_kubernetes_namespace] | ||
action: replace | ||
target_label: ns | ||
- action: labeldrop | ||
regex: __meta_kubernetes_namespace(.+) | ||
- action: labelmap | ||
regex: __meta_kubernetes_pod_label_(.+) | ||
- source_labels: [__meta_kubernetes_pod_name] | ||
action: replace | ||
target_label: apod | ||
|
||
- job_name: kubernetes-node-exporter | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
insecure_skip_verify: true | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
scheme: https | ||
kubernetes_sd_configs: | ||
- role: node | ||
relabel_configs: | ||
- source_labels: [__address__] | ||
regex: ^(.*):\d+$ | ||
target_label: __address__ | ||
replacement: $1:9100 | ||
- target_label: __scheme__ | ||
replacement: http | ||
# Host name | ||
- source_labels: [__meta_kubernetes_node_name] | ||
target_label: instance | ||
|
||
- job_name: "kubernetes-cadvisor" | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
kubernetes_sd_configs: | ||
- role: node | ||
relabel_configs: | ||
- action: labelmap | ||
regex: __meta_kubernetes_node_label_(.+) | ||
- target_label: __address__ | ||
replacement: kubernetes.default.svc:443 | ||
- source_labels: [__meta_kubernetes_node_name] | ||
regex: (.+) | ||
target_label: __metrics_path__ | ||
replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters