Giter VIP home page Giter VIP logo

Comments (5)

mttradebyte avatar mttradebyte commented on June 12, 2024 2

Ah nice, thanks for the tip. If you want to include a section in the README for AWS users, and for anyone else who may look for this in the future, this is what worked for us:

  - job_name: ec2
    ec2_sd_configs:
      - region: eu-west-1
        access_key: xxx
        secret_key: xxx
        profile: xxx
        port: 9100
    relabel_configs:
      - source_labels: [__meta_ec2_tag_Name]
        target_label: instance
      - source_labels: [instance]
        regex: (.*elasticsearch.*)
        target_label: cluster
        replacement: elasticsearch

Our instances contain the word elasticsearch, so the regex may need to change if yours aren't set up the same way.

from elasticsearch_exporter.

zwopir avatar zwopir commented on June 12, 2024

Hi,
sorry for the late reply. The dashboard relies on a relabeling config that adds a label "cluster" to the elasticsearch_exporter metrics (described in https://github.com/justwatchcom/elasticsearch_exporter#alerts--recording-rules).
If you add such a label, the dashboard should work.

from elasticsearch_exporter.

mttradebyte avatar mttradebyte commented on June 12, 2024

Hi @zwopir - would you be able to elaborate on how this works? For example, I'm using the aws ec2 module for discovery, and the elasticsearch exporter is running on a central prometheus server, so the name of the prometheus server is useless. I've got a relabel_configs block setup in the ec2 job which takes the __meta_ec2_tag_Name and puts it into an "instance" label, which is also in turn labelled as cluster. So it is available in the ec2 job, but it's not showing up in the dashboard.

Any ideas?

from elasticsearch_exporter.

zwopir avatar zwopir commented on June 12, 2024

it's not the elasticsearch_exporter that needs the label cluster added, but the node_exporter(s) that a running on the ES nodes. The elasticsearch_exporter itself gets the cluster label from the ES API.

So if the __meta_ec_tag_Name matches the cluster label value you get from the elasticsearch_exporter, the dashboard should work. Otherwise you need so set the value, either manually in the job definition via labels (https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config) or via rewriting from some aws ec labels.

from elasticsearch_exporter.

zwopir avatar zwopir commented on June 12, 2024

Hi @mtanatwine ,

thanks for getting back on this issue, great it worked for you. Your use case is a bit too specific (how your labels are named) to include in the README, but a link to this issue might help people. I'll add it to the README

from elasticsearch_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.