Hi everyone, I’ve running the K8s operator and hav...
# troubleshooting
a
Hi everyone, I’ve running the K8s operator and have a job deployed to my cluster (session mode) successfully. I’ve got prometheus metrics being scraped and am building a dashboard. Everything is working great, save for 1 issue: I can’t find a way to add labels to the FlinkSessionJob CRD so that I can distinguish the jobs apart from each other in prometheus. I’ve tried adding a label under
metadata
in the CRD, but it doesn’t seem to get discovered by prometheus. Example:
Copy code
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkSessionJob
metadata:
  namespace: flink
  name: my-flink-job
  labels:
    customLabel: my-flink-application
But “customLabel” does not show up in Prometheus. Maybe I’m going about this the wrong way? Basically I just need a way to distinguish between multiple jobs running on the same
FlinkDeployment
so I can toggle between them in a Grafana dashboard. Thanks for any help!
g
Hey! Most metrics are scoped to resource type / namespace. There are some resource level metrics that expose the resourcetype.namespace.name but we don’t expose other metadata such as labels during metric reporting
If you are interested in working on this you could open a JIRA for this. It should not be extremely difficult to make this configurable through the metrics scope
a
Thanks @Gyula Fóra, I”ll consider working on this - but first just wanted to make sure I’m not missing something obvious. I’m looking at a grafana dashboard that Ververica created which includes a “deploymentId” and appears to be exactly what I need. Not sure where they’re getting that.. Must be something they’re adding themselves? https://github.com/ververica/ververica-platform-playground/blob/release-2.6/grafana-dashboard.json