Bug #113136 Prometheus can't get metric data,the service monitor should allow custome labels
Submitted: 20 Nov 2023 3:35 Modified: 24 Nov 2023 8:27
Reporter: Bing Ma (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Operator Severity:S4 (Feature request)
Version:2.1.1 OS:Linux
Assigned to: CPU Architecture:Any

[20 Nov 2023 3:35] Bing Ma
Description:
The setting of your service monitor here only needs to set the content of the spec field(code: https://github.com/mysql/mysql-operator/blob/3dd07b7eec1401302eb3294b0e42a23a6e63dbfe/mysq..., 

the field in cr: spec.metrics.monitorSpec

but the service monitor has a very important label that needs to be consistent with prometheus, but it cannot be customized. Prometheus cannot collect data through the service monitor at all.

How to repeat:
set spec.metrics.monitorSpec, prometheus can't get metric data
[20 Nov 2023 15:35] MySQL Verification Team
Hi,

I'm verifying this as a FeatureRequest, not as a bug.

Thanks
[24 Nov 2023 8:20] Bing Ma
when set monitor true, the service monitor use the service that points to router servcie, not the pod.

too disappoint
[24 Nov 2023 8:27] Bing Ma
ok, you use the headless svc,I misunderstanding