Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing gh77 - Missing support for Prometheus scraping
Fixes #77 - Weaviate v1.14.0 supports Prometheus scraping, so you can have Grafana dashboards to monitor Weaviate. Unfortunately for Prometheus to be able to scrape the exposed endpoint (/metrics on port 2112), that port need to be added to the StatefulSet's container port. This changes adds that container port (2112) to the Helm chart, in case the `PROMETHEUS_MONITORING_ENABLED` env variable is set to true (which is the same env variable the Weaviate app watches out for). Once that env variable is set, to setup the Prometheus scarping config to discover your Weaviate endpoints (assuming it is running in the `weaviate` namespace), add the following to your Prometheus config: ``` - job_name: weaviate scrape_interval: 5s scrape_timeout: 5s scheme: http metrics_path: /metrics # see more options at https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config # and https://github.com/prometheus/prometheus/blob/099df0c5f00c45c007a9779a2e4ab51cf4d076bf/config/config.go#L1026-L1037 kubernetes_sd_configs: - role: pod namespaces: names: - weaviate relabel_configs: - source_labels: [__meta_kubernetes_pod_container_port_number] action: keep regex: 2112 ```
- Loading branch information