the flink operator tracks known versions in a metr...
# troubleshooting
t
the flink operator tracks known versions in a metric like
flink_k8soperator_namespace_FlinkVersion_1_17_1_Count
i’ve been looking at a various metric excludes/additional variables/whatever and can’t quite make heads or tails whether it’s possible to: • exclude the version from the metric (i think
metrics.reporter.prom.scope.variables.excludes: FlinkVersion
might accomplish this?) • add
FlinkVersion: 1_17_1
to the labels of the prom metrics. i’m not sure if this is possible because the operator adds two groups, rather than a group with a key/value:
Copy code
.addGroup(FLINK_VERSION_GROUP_NAME)
.addGroup(flinkVersion)
and not
Copy code
.addGroup(FLINK_VERSION_GROUP_NAME, flinkVersion)
why do i want to do this? it’d be handy to track counts of known versions with a simple sum, instead of having to write a complex regex metric name query
t
To track Flink versions with labels instead of in the metric name, you might need to customize your setup. Consider using Prometheus's relabeling feature to extract version info from metric names and turn them into labels. If that's not sufficient, you might look into creating a custom metric exporter or modifying the Flink Kubernetes operator itself, although these options would require more effort and technical expertise.
t
thanks tim! yes, relabeling on scrape will work too. our current infra apparently has trouble with this for mundane reasons but yes, good point. that being said this strikes me as a common use case (track jobs by version) and i wonder how difficult it’d be to bake into the operator directly