Earlier I was using Eclipse-ditto in local and was getting metrics using following setup.I have included Prometheus as a service right now as given below.
prometheus:
image: prom/prometheus:v2.33.1
container_name: prometheus
restart: always
ports:
- "9090:9090"
networks:
default:
aliases:
- ditto-cluster
volumes:
- ./prometheus:/etc/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
depends_on:
- things
- policies
- gateway
- connectivity
also, the prometheus.yml is
global:
scrape_interval: 30s
scrape_configs:
- job_name: 'ditto'
scrape_interval: 5s
scrape_timeout: 5s
metrics_path: '/metrics'
scheme: 'http'
dns_sd_configs:
- names:
- 'things'
- 'things-search'
- 'policies'
- 'connectivity'
- 'gateway'
type: 'A'
port: 9095
relabel_configs:
- source_labels: [__meta_dns_name]
target_label: instance
But Now I want these in Kubernetes, So what is the process of doing so?