NiFi JMX exporter
Complete dashboard using metrics from prometheus JMX exporter, with drill down per NiFi release > pod
Dashboard for jvm_* metrics which are exported by jmx_exporter and scraped by prometheus.
Gist is here Based on JMX exporter prometheus
NiFi options to run jmx_exporter
update “conf/bootstrap.conf” with below line
java.arg.jmxopts=-javaagent:/jmx-exporter/jmx_prometheus_javaagent.jar=31300:/etc/nifi/jmx_config/nifi-jmx.yaml
NiFi pod configuration
apiVersion: v1
kind: Pod
metadata:
annotations:
prometheus.io/port: "31300"
prometheus.io/scrape: "true"
Prometheus configuration
scrape_configs:
- job_name: kubernetes-pods
scrape_interval: 1m
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
kubernetes_sd_configs:
- api_server: null
role: pod
namespaces:
names: []
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
separator: ;
regex: "true"
replacement: $1
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
separator: ;
regex: (.+)
target_label: __metrics_path__
replacement: $1
action: replace
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
separator: ;
regex: ([^:]+)(?::\d+)?;(\d+)
target_label: __address__
replacement: $1:$2
action: replace
- separator: ;
regex: __meta_kubernetes_pod_label_(.+)
replacement: $1
action: labelmap
- source_labels: [__meta_kubernetes_namespace]
separator: ;
regex: (.*)
target_label: namespace
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_name]
separator: ;
regex: (.*)
target_label: kubernetes_pod_name
replacement: $1
action: replace
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
Revision | Description | Created | |
---|---|---|---|
Download |