mirror of
https://github.com/valitydev/helmsdeep.git
synced 2024-11-06 08:55:21 +00:00
Metrics (#28)
* add prometheus operator * Autodeploy internal sservicemonitor * add readme for prom metrics * change port name to api Co-authored-by: Dmitry Skokov <d.skokov@rbkmoney.com>
This commit is contained in:
parent
0ae3aada51
commit
c43e4344b7
@ -140,3 +140,12 @@ kubectl port-forward vault-0 8200:8200 &
|
||||
vault.hashicorp.com/role: "db-app"
|
||||
```
|
||||
После этого в поде с сервисом будет лежать файл `/vault/secrets/db-creds` со строкой подключения к БД
|
||||
|
||||
Как включить сбор метрик
|
||||
----------
|
||||
|
||||
requrements:
|
||||
- Service c именем порта api, на котором слушает http порт приложения
|
||||
- label
|
||||
``` prometheusmetrics.enabled: "true" ```
|
||||
- Метрики приложения в формате prometheus должны отдаваться на локейшене /metrics
|
||||
|
12
config/prometheus/values.yaml
Normal file
12
config/prometheus/values.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
# Look for reference at https://github.com/helm/charts/blob/master/stable/prometheus-operator/values.yaml#L1975
|
||||
prometheus:
|
||||
additionalServiceMonitors:
|
||||
- name: "rbk-intservice"
|
||||
selector:
|
||||
matchLabels:
|
||||
prometheusmetrics.enabled: "true"
|
||||
|
||||
endpoints:
|
||||
- port: "api"
|
||||
path: /metrics
|
||||
scheme: http
|
@ -6,11 +6,14 @@ dependencies:
|
||||
- name: kafka
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com
|
||||
version: 0.21.2
|
||||
- name: prometheus-operator
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
version: 9.3.1
|
||||
- name: vault
|
||||
repository: https://helm.releases.hashicorp.com
|
||||
version: 0.7.0
|
||||
- name: zookeeper
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com
|
||||
version: 2.1.3
|
||||
digest: sha256:65f2c87582a6fee57134df871d6fc07d860248fa99a6c86473195e283089cb00
|
||||
generated: "2020-08-26T14:22:40.087884+03:00"
|
||||
digest: sha256:adf3d2d7db5150fa436914ba61d2183ae84b260b6195cdf97af68748bcff9923
|
||||
generated: "2020-09-04T11:17:29.545997+03:00"
|
||||
|
@ -185,3 +185,8 @@ releases:
|
||||
file: config/api-common/keys/token-encryption-keys/1.jwk
|
||||
- name: wapiPrivkey
|
||||
file: config/api-common/keys/capi.privkey.pem
|
||||
- name: prometheus
|
||||
<<: *default
|
||||
chart: stable/prometheus-operator
|
||||
namespace: monitoring
|
||||
createNamespace: true
|
||||
|
Loading…
Reference in New Issue
Block a user