Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrape Kubernetes service, endpoints, and ingress #5822

Closed
derailment opened this issue May 9, 2019 · 3 comments · Fixed by #6105
Closed

Scrape Kubernetes service, endpoints, and ingress #5822

derailment opened this issue May 9, 2019 · 3 comments · Fixed by #6105
Assignees
Labels
area/k8s feature request Requests for new plugin and for new features to existing plugins

Comments

@derailment
Copy link

Feature Request

I want to ask whether scraping K8s service, endpoints, and ingress feature exists?
Or someone is doing this?

Proposal:

Scrape K8s service, endpoints, ingress.

Current behavior:

For scraping node and pod stuff, kubernetes input plugin has already existed.
For scraping daemonset, deployment, and pvc stuff, kube_inventory input plugin has already existed.

Desired behavior:

But for service, endpoints, and ingress, does it exist? or does anyone mean to do?

Use case:

Get endpoint data like:

__meta_kubernetes_namespace
__meta_kubernetes_endpoints_name
__meta_kubernetes_endpoint_ready
__meta_kubernetes_endpoint_port_name
__meta_kubernetes_endpoint_port_protocol
__meta_kubernetes_endpoint_address_target_kind
__meta_kubernetes_endpoint_address_target_name

Get service data like:

__meta_kubernetes_namespace
__meta_kubernetes_service_annotation_<annotationname>
__meta_kubernetes_service_annotationpresent_<annotationname>
__meta_kubernetes_service_cluster_ip
__meta_kubernetes_service_external_name
__meta_kubernetes_service_label_<labelname>
__meta_kubernetes_service_labelpresent_<labelname>
__meta_kubernetes_service_name
__meta_kubernetes_service_port_name
__meta_kubernetes_service_port_number
__meta_kubernetes_service_port_protocol

Get ingress data like:

__meta_kubernetes_namespace
__meta_kubernetes_ingress_name
__meta_kubernetes_ingress_label_<labelname>
__meta_kubernetes_ingress_labelpresent_<labelname>
__meta_kubernetes_ingress_annotation_<annotationname>
__meta_kubernetes_ingress_annotationpresent_<annotationname>
__meta_kubernetes_ingress_scheme
__meta_kubernetes_ingress_path
@danielnelson
Copy link
Contributor

This looks like a way to do k8s service discovery of prometheus endpoints?

We have most of this type of discovery in the prometheus input, and currently we support looking up annotated pods or via Kubernetes DNS A record discovery using the monitor_kubernetes_pods and kubernetes_services options respectively.

@danielnelson danielnelson added area/prometheus feature request Requests for new plugin and for new features to existing plugins labels May 9, 2019
@derailment
Copy link
Author

This looks like a way to do k8s service discovery of prometheus endpoints?

No, the architecture is several services, endpoints, ingresses for some apps, also Prometheus and its collectd exporter, and Telegraf running in K8s. We want to use Telegraf collect those K8s service, endpoint, ingress data into Prometheus collectd exporter.

This means:
Telegraf output plugin is Prometheus collectd exporter that we already self implemented.

We are looking for Telegraf input plugin that can collect K8s services, endpoints, ingresses without using Prometheus service discovery feature.

Any suggestion?

@danielnelson
Copy link
Contributor

Okay, I think I understand. We don't have these objects now but they could potentially be added to the kube_inventory input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants