Custom label for Prometheus Exporter

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom label for Prometheus Exporter

anaray
This post was updated on .
Hi flink team,

Is there a way to add a custom label to flink metrics when using Prometheus
Exporter ? I need to add a label=<jobname> for the JobManager metrics. As of
now I see only host label

for example

flink_jobmanager_Status_JVM_Memory_Direct_Count{host="localhost",} 18.0

This is not of big help if I deploy the service in k8s or swarm. I would
like associate a jobmanager with a jobname atleast in a JOB mode deployment.

Please let me know if there is any way to add a custom label by
cinfiguration?

Thanks,
anaray



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Custom label for Prometheus Exporter

austin.ce
Hey Anaray,

Have you checked out the “scope” configuration?[1]

Best,
Austin



On Wed, Jan 22, 2020 at 4:09 PM anaray <[hidden email]> wrote:
Hi flink team,

Is there a way to add a custom label to flink metrics when using Prometheus
Exporter ? I need to add a label=<jobname> for the JobManager metrics. As of
now I see only host label

for example

*flink_jobmanager_Status_JVM_Memory_Direct_Count{host="localhost",} 18.0*

This is not of big help if I deploy the service in k8s or swarm. I would
like associate a jobmanager with a jobname atleast in a JOB mode deployment.

Please let me know if there is any way to add a custom label by
cinfiguration?

Thanks,
anaray



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Custom label for Prometheus Exporter

austin.ce
Following up, we deploy to K8s with one service per job manager and task manager for metrics, and we add job-identifying labels to those. We also use the Prometheus Operator which makes it easy to add those labels as dimensions when scraping. 

Best,
Austin

On Wed, Jan 22, 2020 at 7:21 PM Austin Cawley-Edwards <[hidden email]> wrote:
Hey Anaray,

Have you checked out the “scope” configuration?[1]

Best,
Austin



On Wed, Jan 22, 2020 at 4:09 PM anaray <[hidden email]> wrote:
Hi flink team,

Is there a way to add a custom label to flink metrics when using Prometheus
Exporter ? I need to add a label=<jobname> for the JobManager metrics. As of
now I see only host label

for example

*flink_jobmanager_Status_JVM_Memory_Direct_Count{host="localhost",} 18.0*

This is not of big help if I deploy the service in k8s or swarm. I would
like associate a jobmanager with a jobname atleast in a JOB mode deployment.

Please let me know if there is any way to add a custom label by
cinfiguration?

Thanks,
anaray



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/