Skydns metrics in kube-dns [was: Kubernetes API exporter]

414 views
Skip to first unread message

Tobias Schmidt

unread,
Aug 5, 2016, 3:12:33 AM8/5/16
to Bryce Walter, Prometheus Developers
I took the liberty to fork the thread as it isn't related to the
Kubernetes API exporter anymore.

Kube-dns still exposes skydns metrics among others. As far as I know
there are two ways to retrieve them. For one the kube-dns handler is
active on the -healthz-port under the usual /metrics path. The default
healthz port is 8081 [0]. This is actually an accidental side-effect,
because additionally skydns starts internally another server [1] using
the PROMETHEUS_PORT environment variable (I set that in our pod spec
to 9099). As both the kube-dns and skydns packages use the global http
package registry, they both serve all http handlers. Yay for globals
^^

So, pick your evil, there are two ports to call /metrics on.

[0]: https://github.com/kubernetes/kubernetes/blob/4466531382e59c3c748e672a5c25e93cf6eb0bce/cmd/kube-dns/app/options/options.go#L47
[1]: https://github.com/skynetservices/skydns/blob/f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78/metrics/metrics.go#L121

On Fri, Aug 5, 2016 at 12:53 AM, Bryce Walter <b.t.w...@gmail.com> wrote:
> It would be great if Prometheus could be set up to use kubectl or kubelet with their kube-configs. This would make gathering metrics a lot easier. Especially now that Kubernetes has branched off SkyDNS/Kube2Sky in favor of kube-dns. During the transition, they seemed to have dropped the code that probes and scrapes much needed ClusterDNS
> Data. I know @thawkin posted about it last week, but don't see any movement on it yet.
> The new service doesn't have the /metrics endpoint.
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages