kubernetes - Docker Exporter for Prometheus -


i have application different endpoints (rest services) runs in docker container in kubernetes pods.

these endpoints reachable like:

localhost:8080/myapp/status/health or

localhost:8080/myapp/status/version

i add of these endpoints (like health , version) prometheus metrics. need write exporter or exporters recommended use in senario?

it sounds looking key words , place start configure prometheus, running in kubernetes cluster, scrape data metrics end point.

i suggest add job_name 2 paths myapp/status/version , myapp/status/health prometheus configmap scrape_config section , make target ever app name called based on kube-dns assignment. actual domain name app_name appended namespace in: <app_name>.<k8s_namespace>.svc.cluster.local> localhost resolves on immediate system (i.e. laptop or pod itself) , tied 127.0.0.1 not routed within network kube-dns, pods & nodes technically have interface , there no way differentiate between them.

you can verify fqdn resolves getting k8s pod , issuing nslookup on combination. fqdn won't resolve outside of cluster meant routable within cluster -- unless build otherwise.

hth , luck configuration.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -