Skip to content

Commit

Permalink
MF-116 - add prometheus annotations so that metrics get properly coll…
Browse files Browse the repository at this point in the history
…ected (#117)

* add prometheus annotations so that metrics get properly collected

Signed-off-by: Mirko Teodorovic <[email protected]>

* fix metrics port

Signed-off-by: Mirko Teodorovic <[email protected]>

---------

Signed-off-by: Mirko Teodorovic <[email protected]>
  • Loading branch information
mteodor authored Jun 19, 2023
1 parent 1c3eb35 commit ae42329
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/mainflux/templates/adapter_coap-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ spec:
component: adapter-coap
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.adapter_coap.port }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: adapter-coap
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/adapter_http-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ spec:
component: adapter-http
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.adapter_http.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: adapter-http
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/adapter_lora-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: adapter-lora
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.adapter_lora.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: adapter-lora
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/adapter_opcua-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: adapter-opcua
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.adapter_opcua.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: adapter-opcua
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/auth-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: auth
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.auth.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: auth
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/bootstrap-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: bootstrap
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.bootstrap.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: bootstrap
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/certs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: certs
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.certs.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: certs
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/influxdbreader-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: influxdb-reader
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.influxdb.reader.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: influxdb-reader
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/influxdbwriter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
component: influxdb-writer
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.influxdb.writer.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: influxdb-writer
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/mongodbreader-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: mongodb-reader
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.mongodb.reader.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: mongodb-reader
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/mongodbwriter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
component: mongodb-writer
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.mongodb.writer.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: mongodb-writer
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/notifier_smtp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
component: notifier-smtp
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.notifier_smtp.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: notifier-smtp
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/things-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: things
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.things.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: things
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/twins-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
component: twins
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.twins.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: twins
Expand Down
4 changes: 4 additions & 0 deletions charts/mainflux/templates/users-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
component: users
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "{{ .Values.users.httpPort }}"
prometheus.io/scrape: "true"
labels:
app: {{ .Release.Name }}
component: users
Expand Down

0 comments on commit ae42329

Please sign in to comment.