-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enhance metrics exporter with monitoring labels and environment…
… variable configurations
- Loading branch information
1 parent
f819797
commit 93c26ee
Showing
9 changed files
with
500 additions
and
16 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 |
---|---|---|
|
@@ -43,3 +43,4 @@ terraform-plugins | |
kubeconfig_* | ||
generated | ||
.external_modules | ||
**.tgz |
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
95 changes: 95 additions & 0 deletions
95
charts/armonik/charts/ingress/templates/metrics-exporter.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,95 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
name: metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
template: | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
name: metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
automountServiceAccountToken: true | ||
containers: | ||
- image: {{ .Values.global.registry }}/armonik_control_metrics:0.14.3 | ||
imagePullPolicy: IfNotPresent | ||
name: metrics-exporter | ||
ports: | ||
- containerPort: 1080 | ||
name: metrics | ||
protocol: TCP | ||
envFrom: | ||
- configMapRef: | ||
name: core-configmap | ||
optional: false | ||
- configMapRef: | ||
name: log-configmap | ||
optional: false | ||
- secretRef: | ||
name: activemq | ||
optional: false | ||
#terminationMessagePath: /dev/termination-log | ||
#terminationMessagePolicy: File | ||
dnsPolicy: ClusterFirst | ||
enableServiceLinks: true | ||
{{- if .Values.nodeSelector -}} | ||
nodeSelector: | ||
service: {{ .Values.nodeSelector }} | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: {} | ||
shareProcessNamespace: false | ||
terminationGracePeriodSeconds: 30 | ||
tolerations: | ||
- effect: NoSchedule | ||
key: service | ||
operator: Equal | ||
value: metrics | ||
{{- end }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
name: metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
selector: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
ports: | ||
- name: metrics-exporter | ||
port: 9419 | ||
protocol: TCP | ||
targetPort: 1080 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: metrics-exporter | ||
type: monitoring | ||
name: metrics-exporter-configmap | ||
namespace: {{ .Values.global.namespace }} | ||
data: | ||
Host: "localhost" | ||
Port: "1080" | ||
Path: "/metrics" |
95 changes: 95 additions & 0 deletions
95
charts/armonik/charts/ingress/templates/partition-metrics-exporter.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,95 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
name: partition-metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
template: | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
name: partition-metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
automountServiceAccountToken: true | ||
containers: | ||
- image: {{ .Values.global.registry }}/armonik_control_partition_metrics:0.14.3 | ||
imagePullPolicy: IfNotPresent | ||
name: partition-metrics-exporter | ||
ports: | ||
- containerPort: 1080 | ||
name: metrics | ||
protocol: TCP | ||
envFrom: | ||
- configMapRef: | ||
name: core-configmap | ||
optional: false | ||
- configMapRef: | ||
name: log-configmap | ||
optional: false | ||
- secretRef: | ||
name: activemq | ||
optional: false | ||
#terminationMessagePath: /dev/termination-log | ||
#terminationMessagePolicy: File | ||
dnsPolicy: ClusterFirst | ||
enableServiceLinks: true | ||
{{- if .Values.nodeSelector -}} | ||
nodeSelector: | ||
service: {{ .Values.nodeSelector }} | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: {} | ||
shareProcessNamespace: false | ||
terminationGracePeriodSeconds: 30 | ||
tolerations: | ||
- effect: NoSchedule | ||
key: service | ||
operator: Equal | ||
value: metrics | ||
{{- end }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
name: partition-metrics-exporter | ||
namespace: {{ .Values.global.namespace }} | ||
spec: | ||
selector: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
ports: | ||
- name: partition-metrics-exporter | ||
port: 9420 | ||
protocol: TCP | ||
targetPort: 1080 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app: armonik | ||
service: partition-metrics-exporter | ||
type: monitoring | ||
name: partition-metrics-exporter-configmap | ||
namespace: {{ .Values.global.namespace }} | ||
data: | ||
Host: "localhost" | ||
Port: "1080" | ||
Path: "/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,141 @@ | ||
- job_name: "metrics-exporter" | ||
static_configs: | ||
- targets: ["http://metrics-exporter.{{ .Release.Namespace }}.svc.cluster.local"] | ||
labels: | ||
namespace: "armonik" | ||
|
||
- job_name: "mongodb-metrics-exporter" | ||
static_configs: | ||
- targets: ["http://mongodb.{{ .Release.Namespace }}.svc.cluster.local"] | ||
labels: | ||
namespace: "armonik" | ||
metrics_path: /metrics | ||
scheme: http | ||
|
||
- 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 | ||
- source_labels: [__meta_kubernetes_pod_name] | ||
action: replace | ||
target_label: kubernetes_pod_name | ||
- source_labels: [__meta_kubernetes_pod_node_name] | ||
action: replace | ||
target_label: kubernetes_pod_node_name | ||
|
||
- job_name: "kubernetes-pods" | ||
kubernetes_sd_configs: | ||
- role: pod | ||
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__ | ||
- action: labelmap | ||
regex: __meta_kubernetes_pod_label_(.+) | ||
- source_labels: [__meta_kubernetes_namespace] | ||
action: replace | ||
target_label: kubernetes_namespace | ||
- source_labels: [__meta_kubernetes_pod_name] | ||
action: replace | ||
target_label: kubernetes_pod_name | ||
- source_labels: [__meta_kubernetes_pod_node_name] | ||
action: replace | ||
target_label: kubernetes_pod_node_name | ||
|
||
- job_name: "kubernetes-cadvisor" | ||
kubernetes_sd_configs: | ||
- role: node | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
metrics_path: /metrics/cadvisor | ||
relabel_configs: | ||
- action: labelmap | ||
regex: __meta_kubernetes_node_label_(.+) | ||
|
||
- job_name: "kubernetes-resource" | ||
kubernetes_sd_configs: | ||
- role: node | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
metrics_path: /metrics/resource | ||
relabel_configs: | ||
- action: labelmap | ||
regex: __meta_kubernetes_node_label_(.+) | ||
|
||
- job_name: "kubernetes-probes" | ||
kubernetes_sd_configs: | ||
- role: node | ||
scheme: https | ||
tls_config: | ||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
metrics_path: /metrics/probes | ||
relabel_configs: | ||
- action: labelmap | ||
regex: __meta_kubernetes_node_label_(.+) | ||
|
||
- job_name: 'metrics-control-plane' | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_container_port_number] | ||
action: keep | ||
regex: "1081" | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "armonik" | ||
- source_labels: [__meta_kubernetes_pod_label_service] | ||
action: keep | ||
regex: "control-plane" | ||
- source_labels: [__meta_kubernetes_namespace] | ||
action: replace | ||
target_label: kubernetes_namespace | ||
- source_labels: [__meta_kubernetes_pod_node_name] | ||
action: replace | ||
target_label: kubernetes_pod_node_name | ||
- source_labels: [__meta_kubernetes_pod_name] | ||
action: replace | ||
target_label: kubernetes_pod_name | ||
|
||
- job_name: 'metrics-polling-agent' | ||
kubernetes_sd_configs: | ||
- role: pod | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_pod_container_port_number] | ||
action: keep | ||
regex: "1080" | ||
- source_labels: [__meta_kubernetes_pod_label_app] | ||
action: keep | ||
regex: "armonik" | ||
- source_labels: [__meta_kubernetes_pod_label_service] | ||
action: keep | ||
regex: "compute-plane" | ||
- source_labels: [__meta_kubernetes_namespace] | ||
action: replace | ||
target_label: kubernetes_namespace | ||
- source_labels: [__meta_kubernetes_pod_node_name] | ||
action: replace | ||
target_label: kubernetes_pod_node_name | ||
- source_labels: [__meta_kubernetes_pod_name] | ||
action: replace | ||
target_label: kubernetes_pod_name |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ArmoniK endpoint URLs | ||
control_plane_url = module.armonik.endpoint_urls.control_plane_url | ||
grafana_url = module.armonik.endpoint_urls.grafana_url | ||
seq_web_url = module.armonik.endpoint_urls.seq_web_url | ||
admin_app_url = module.armonik.endpoint_urls.admin_app_url | ||
control_plane_url = http://control-plane.{{ .Release.Namespace }}.svc.cluster.local | ||
grafana_url = http://grafana.{{ .Release.Namespace }}.svc.cluster.local | ||
seq_web_url = http://seq.{{ .Release.Namespace }}.svc.cluster.local | ||
admin_app_url = http://admin-gui.{{ .Release.Namespace }}.svc.cluster.local |
Oops, something went wrong.