Skip to main content

Prometheus

Causely leverages Prometheus to query time-series metrics from your applications and infrastructure with exporters for Kafka, MongoDB, MySQL, Postgres, RabbitMQ, Redis along with Java, Python, Golang mutex and garbage collection metrics, and other custom applications.

To enable Prometheus as a data source with the default exporters, please add the following section to your values.yaml file:

scrapers:
prometheus:
enabled: true
endpoint: http://prometheus-operated.monitoring.svc.cluster.local:9090

To enable Prometheus as a data source with default exporters plus additional custom metrics, please add the following section to your values.yaml file:

scrapers:
prometheus:
enabled: true
endpoint: http://prometheus-operated.monitoring.svc.cluster.local:9090
exporters:
chaosmania:
entities:
- entity:
workload: {}

discovery:
- kubernetes_pod:
namespace: 'namespace'
pod_name: 'pod'

metrics:
- attribute: TransactionCount
query: 'sum by (namespace, service, pod) (rate(chaosmania_processed_transactions_duration_count[1m]))'
- attribute: TransactionDuration
query: 'sum by (namespace, service, pod) (rate(chaosmania_processed_transactions_duration_sum[1m]) / (rate(chaosmania_processed_transactions_duration_count[1m]) > 0 or (rate(chaosmania_processed_transactions_duration_count[1m]) + 1)))'
- attribute: DBQueryDuration
query: 'sum by (namespace, service, pod) (rate(postgres_queries_sum[1m]) / (rate(postgres_queries_count[1m]) > 0 or (rate(postgres_queries_count[1m]) + 1)))'

Causely will automatically pick up metrics from supported exporters.

Supported Exporters:

Use this helm values.yaml file for the kafka exporter to label the broker name "super-heroes-kafka-brokers" for the monitored topics:

kafkaServer:
- super-heroes-kafka-brokers:9092

service:
annotations:
prometheus.io/port: '9308'
prometheus.io/scrape: 'true'
labels:
service_name: super-heroes-kafka-brokers

prometheus:
serviceMonitor:
enabled: true
namespace: quarkus-super-heroes
relabelings:
- sourceLabels: [__meta_kubernetes_service_label_service_name]
targetLabel: target