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

[Prometheus Integration] Evaluate metrics extraction from Prometheus server using remote_write option with k8s #3488

Closed
gizas opened this issue Jun 8, 2022 · 2 comments
Assignees
Labels
Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team [elastic/obs-cloudnative-monitoring]

Comments

@gizas
Copy link
Contributor

gizas commented Jun 8, 2022

Currently Prometheus Integration is in 0.7.0 Technical Preview .

The goal of this issue is to evaluate current situation for the integration and evaluate the metric extraction from a Prometheus server using remote_write option with k8s.
In more details evaluate K8s metrics extraction by using such configuration.

Existing Prometheus Metricbeat Module:
https://www.elastic.co/guide/en/beats/metricbeat/8.2/metricbeat-module-prometheus.html

Evaluate:

  • K8s metrics extraction
  • OOTB Dashboard validation

Relevant tickets related with this:
a. #3487
b.#3489

@tetianakravchenko
Copy link
Contributor

tetianakravchenko commented Jun 23, 2022

How remote_write works:
when prometheus.remove_write is enabled - metricbeat/elastic-agent start listening on the defined host:port (default: localhost:9201), Prometheus should use this address as a remote_write URL.

Issue in k8s: It is possible to run prometheus.remote_write in both modes: managed and standalone, the only missing part for both - we do not have a Service for elastic-agent to be able to refer it as a remove_write URL (prometheus config).

Current situation

We do already have prometheus integration https://github.com/elastic/integrations/tree/main/packages/prometheus, that supports collecting metrics from a Prometheus server using remote_write (remote_write data_stream).

Evaluation points

K8s metrics extraction:

How-to run managed elasti-agent:

  1. Integration configuration:

Screenshot 2022-06-23 at 15 10 13

  1. Use next manifest - https://github.com/elastic/elastic-agent/blob/main/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml and add Service resource:
---
apiVersion: v1
kind: Service
metadata:
  name: elastic-agent
  namespace: kube-system
  labels:
    app: elastic-agent
spec:
  ports:
    - port: 9201
      protocol: TCP
      targetPort: 9201
  selector:
    app: elastic-agent
  sessionAffinity: None
  type: ClusterIP
  1. Adjust FLEET_URL and FLEET_ENROLLMENT_TOKEN and apply manifests.
  2. Install prometheus with modified configuration
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm upgrade --install prometheus-server prometheus-community/prometheus -f values.yml

$ cat values.yml
server:
  remoteWrite:
    - url: http://elastic-agent.kube-system:9201/write

Dashboard:

We have 1 Overview dashboard - it doesn't work

Few issue here/suggestion:

@tetianakravchenko
Copy link
Contributor

tetianakravchenko commented Jun 24, 2022

Action points:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team [elastic/obs-cloudnative-monitoring]
Projects
None yet
Development

No branches or pull requests

2 participants