Skip to content

Enabling separate metrics pull  #39

@danijel-zima

Description

@danijel-zima

To get separate metrics per JAVA process, following modifications have to be done:
in metrics-java-heap-graphite-java8.sh
Lines 40 & 65 instead:
PID=$(sudo jps | grep " $NAME$" | awk '{ print $1}')
&
projectName=$(sudo jps | grep $PID | awk '{ print $2}' | cut -d. -f1)

It would be nice to have:

PID=$(sudo jps -l | grep " $NAME$" | awk '{ print $1}')
&
projectName=$(sudo jps -l | grep $PID | awk '{ print $2}' | cut -d. -f1)

And

in metrics-java-heap-graphite.sh

Line 50
project=$(sudo jps | grep $PID | awk '{ print $2 }' | cut -d. -f1)
to
project=$(sudo jps -l | grep $PID | awk '{ print $2 }' | cut -d. -f1)

-l is added after jps command

Best Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions