Giter Club home page Giter Club logo

Comments (5)

brian-brazil avatar brian-brazil commented on May 13, 2024

The textfile module is a better way to do this, and we want to get rid of the config file.

For example you can drop in a file to it with the content:
attributes{myauoracluster="A"} 1

from node_exporter.

swsnider avatar swsnider commented on May 13, 2024

That doesn't fo what I described. I want to know what the total used disk space is across nodes in cluster 'a', for instance, so I want the fs metrics to all have a cluster label. Your solution doesn't help with that.

Also, I only have a couple of such labels, so putting them in a flag is fine.

from node_exporter.

brian-brazil avatar brian-brazil commented on May 13, 2024

For that you need to configure that as target labels in the prometheus config, no feature of the node exporter can do that for you.

Set labels in the prometheus config to do this, see https://github.com/prometheus/prometheus/blob/master/config/config.proto#L48

from node_exporter.

juliusv avatar juliusv commented on May 13, 2024

Setting custom server-side labels only works for statically configured targets at the moment (that will change when we add more generalized SD support).

What @swsnider suggests would add a separate set of time series that would contain attribute information about this exporter. These could be correlated via and and the instance label with the other time series outputted by the node exporters to select only a certain group of exporters. That might be fine too?

But yeah, there's currently no node exporter feature to just add a label to every time series exported, if that is what you want.

from node_exporter.

brian-brazil avatar brian-brazil commented on May 13, 2024

These days we have both all the support needed to do this via the attribute approach, and service discovery in Prometheus would also allow you to do this in few ways including file_sd discovery. Setting target labels on an exporter is an anti-pattern we want to avoid, that concern belongs on the Prometheus server.

from node_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.