Git Product home page Git Product logo

Comments (10)

low-on-mana avatar low-on-mana commented on June 12, 2024 1

@stoader I used new regex, but this issue is right. It only replaces driver metrics it doesn't considers others.

*.sink.prometheus.metrics-name-capture-regex=(.*(mgck_|application_))([0-9_]*)(.+)
*.sink.prometheus.metrics-name-replacement=$4

Screenshot 2021-03-18 at 2 54 06 PM

from spark-metrics.

stoader avatar stoader commented on June 12, 2024

Can you show examples of the original driver and executor metrics without name pre-processing enabled that are provided by Spark in your environment?

from spark-metrics.

low-on-mana avatar low-on-mana commented on June 12, 2024

@stoader Facing this same issue, I am running latest master on spark3 emr and using

*.sink.prometheus.metrics-name-capture-regex=(.+driver_)(.+)
*.sink.prometheus.metrics-name-replacement=$2
*.sink.prometheus.group-key=ns=stream-ns

and following in spark defaults.

spark.metrics.namespace          ${spark.app.name}

Is there any way to get rid application name & id from all metric names. They are in labels ( via job, number, role ) already.

Screenshot of application master group
Screenshot 2021-03-17 at 10 02 41 PM

Screenshot of driver group ( here the replacement has worked )
Screenshot 2021-03-17 at 10 02 28 PM

Screenshot of executor 2 ( Here instead of applicationId, job is coming in metric name)
Screenshot 2021-03-17 at 10 02 20 PM

Screenshot of executor 1
Screenshot 2021-03-17 at 10 02 12 PM

from spark-metrics.

low-on-mana avatar low-on-mana commented on June 12, 2024

Screenshot 2021-03-18 at 12 02 29 PM

If I dont provide any namespace, then executor metrics come with applicationId instead of name which is easier to replace with regex. But this create another issue that now we have group based on applicationId instead.

from spark-metrics.

stoader avatar stoader commented on June 12, 2024

@t0il3ts0ap your config is incorrect:

*.sink.prometheus.metrics-name-capture-regex=(.+driver_)(.+)

This regex will replace only metric names that includes driver in the name.

In order to have the applicationMaster replaced you need something like:

*.sink.prometheus.metrics-name-capture-regex=(.+applicationMaster_)(.+)

from spark-metrics.

low-on-mana avatar low-on-mana commented on June 12, 2024

@stoader As you can see executor metrics are starting with appName delta_streamer_request_details_1.
Do you know how I can replace those as well ?

It will be difficult to provide dynamic metrics.properties based on application name.

from spark-metrics.

stoader avatar stoader commented on June 12, 2024

I'd suggest to check the executor metric names pushed by the executor first without any regex and than create the appropriate regex for extracting only the needed part from the name

from spark-metrics.

stoader avatar stoader commented on June 12, 2024

I'm closing this issue as it's not a spark-metrics issue but rather using the appropriate regex in the configuration.

from spark-metrics.

beryllw avatar beryllw commented on June 12, 2024

@stoader I used new regex, but this issue is right. It only replaces driver metrics it doesn't considers others.

*.sink.prometheus.metrics-name-capture-regex=(.*(mgck_|application_))([0-9_]*)(.+)
*.sink.prometheus.metrics-name-replacement=$4
Screenshot 2021-03-18 at 2 54 06 PM

yeah,I think you are right.It's so inconvenient

from spark-metrics.

low-on-mana avatar low-on-mana commented on June 12, 2024

@Kwafoor
It doesn't works for executor if you get the jar from s3.
Instead first store the jar in local filesystem ( ex-> /usr/lib/spark) in each node of your cluster ( In emr, can do via bootstrap action ), then it will work for both driver/executor.

from spark-metrics.

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.