entigolabs/pod-to-pod-prometheus
A health checker for kubernetes workers that creates probmetheus metrics.
553
A health checker for kubernetes workers that creates probmetheus metrics. By creating a daemonset with pod to pod installed the pods will do basic network tests to measure pod to pod and pod to node network stability. It uses ricoberger/script_exporter to create the webservers.
docker build -t entigolabs/pod-to-pod-prometheus .
Docker image is in docker hub https://hub.docker.com/r/entigolabs/pod-to-pod-prometheus
docker pull entigolabs/pod-to-pod-prometheus:latest
You need to:
Install the daemonset and service to the kubernetes cluster.
k8s-pod-to-pod-prometheus.yaml
So prometheus could find the pods use auto discovery. You can add this configuration to prometehus scrape_configs.
- job_name: pod-to-pod-prometheus
metrics_path: '/probe'
params:
script: [ping]
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- pod-to-pod-prometheus
selectors:
- role: pod
label: "app=pod-to-pod-prometheus"
relabel_configs:
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: kubernetes_pod_name
- source_labels: [__address__]
target_label: env
replacement: "my-env-here"
Import the Grafana-Pod-to-Pod-Prometheus.json dashboard file to grafana. If you want to use short hostnames not FQDN then replace {{node}}
-> {{nodeshort}}
and {{dstnode}}
-> {{dstnodeshort}}
in the json.
Using perl for it.
perl -p -i -e "s/\{\{node\}\}/\{\{nodeshort\}\}/g" Grafana-Pod-to-Pod-Prometheus.json
perl -p -i -e "s/\{\{dstnode\}\}/\{\{dstnodeshort\}\}/g" Grafana-Pod-to-Pod-Prometheus.json
docker pull entigolabs/pod-to-pod-prometheus