-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating pod-monitors for microservices
- Loading branch information
1 parent
e32de4c
commit c4d2909
Showing
7 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: feeds-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: feeds-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |
22 changes: 22 additions & 0 deletions
22
kubernetes/manifests/microservices/followships/pod-monitor.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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: followships-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: followships-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |
22 changes: 22 additions & 0 deletions
22
kubernetes/manifests/microservices/gateway/pod-monitor.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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: gateway-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: gateway-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |
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
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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: posts-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: posts-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |
22 changes: 22 additions & 0 deletions
22
kubernetes/manifests/microservices/profiles/pod-monitor.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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: profiles-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: profiles-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |
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,22 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: users-microservice-metrics | ||
namespace: prometheus | ||
|
||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- microservices | ||
selector: | ||
matchLabels: | ||
microservice: users-microservice | ||
|
||
# Defines the labels which are transferred from the associated Kubernetes Pod object onto the | ||
# ingested metrics. | ||
podTargetLabels: | ||
- microservice | ||
|
||
# List of endpoints part of this PodMonitor. | ||
podMetricsEndpoints: | ||
- port: metrics |