Skip to content

Commit

Permalink
Setting custom labels in prometheus.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Jul 24, 2024
1 parent f406379 commit 9b39ab8
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/monitoring/alertmanager/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: default
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/alertmanager/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: default
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/grafana/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: aerospike-monitoring-stack-grafana
namespace: default
namespace: monitoring
labels:
app: aerospike-monitoring-stack-grafana
chart: aerospike-monitoring-stack
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/grafana/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-grafana
namespace: default
namespace: monitoring
labels: &Labels
app: aerospike-monitoring-stack-grafana
chart: aerospike-monitoring-stack
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
namespace: monitoring

labels:
- includeSelectors: true
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/prometheus/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aerospike-monitoring-stack
namespace: default
namespace: monitoring
6 changes: 6 additions & 0 deletions config/monitoring/prometheus/config/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ scrape_configs:
- default
- aerospike
relabel_configs:
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: keep
regex: aerospike-cluster
replacement: $1
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/prometheus/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: Service
apiVersion: v1
metadata:
name: aerospike-monitoring-stack-prometheus
namespace: default
namespace: monitoring
labels:
app: aerospike-monitoring-stack-prometheus
chart: aerospike-monitoring-stack
Expand Down
2 changes: 1 addition & 1 deletion config/monitoring/prometheus/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
name: aerospike-monitoring-stack
namespace: default
namespace: monitoring
2 changes: 1 addition & 1 deletion config/monitoring/prometheus/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-prometheus
namespace: default
namespace: monitoring
labels: &Labels
app: aerospike-monitoring-stack-prometheus
chart: aerospike-monitoring-stack
Expand Down

0 comments on commit 9b39ab8

Please sign in to comment.