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

How prometheus remote_write to metricbeat #41471

Open
pretystar opened this issue Oct 29, 2024 · 1 comment
Open

How prometheus remote_write to metricbeat #41471

pretystar opened this issue Oct 29, 2024 · 1 comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@pretystar
Copy link

Hey,

I am new to elasti stack.

I want to use prometheus remote_write to send metric to metricbeat.

I deployed metricbeat to k8s with configmap updated:

apiVersion: v1
kind: ConfigMap
metadata:
  name: metricbeat-daemonset-config
  namespace: kube-system
  labels:
    k8s-app: metricbeat
data:
  metricbeat.yml: |-
    metricbeat.modules:
    - module: prometheus
      metricsets: ["remote_write"]
      host: "0.0.0.0"
      port: "9201"
      use_types: true
      rate_counters: true
      period: 60s

expose port and service:

apiVersion: v1
kind: Service
metadata:
  name: metricbeat
  namespace: kube-system
  labels:
    k8s-app: metricbeat
spec:
  ports:
    - port: 9201
      protocol: TCP
      targetPort: 9201
  selector:
    k8s-app: metricbeat
  sessionAffinity: None
  type: ClusterIP

and I enabled the remote write to metricbeat in prometheus:

- url: http://metricbeat.kube-system:9201/write
  remote_timeout: 30s
  follow_redirects: true
  enable_http2: true
  queue_config:
    capacity: 20000
    max_shards: 3
    min_shards: 1
    max_samples_per_send: 10000
    batch_send_deadline: 5s
    min_backoff: 30ms
    max_backoff: 5s

My question is:

  1. How can check that prometheus send the data to metricbeat
  2. How can I query the metric from prometheus in kibana? any examples?
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 29, 2024
@botelastic
Copy link

botelastic bot commented Oct 29, 2024

This issue doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant