Bug 2094095 - Integration with Jaeger fails for ServiceMonitor
Summary: Integration with Jaeger fails for ServiceMonitor
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jeff Cantrill
QA Contact: Anping Li
Depends On:
TreeView+ depends on / blocked
Reported: 2022-06-06 20:04 UTC by iwatson
Modified: 2023-09-15 01:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-06-07 08:23:35 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description iwatson 2022-06-06 20:04:06 UTC
Description of problem:

A user creates a Jaeger CR with strategy production. This in turn creates a Elastic search CR. The elastic search CR creates a service monitor.

The service monitor does not work in this situation.

Version-Release number of selected component (if applicable):

Elasticsearch / logging 5.4.1-24 
Jaeger 1.30.2
OCP 4.10.13

How reproducible: 100%

Steps to Reproduce:
1. Enable user-workload-monitoring
2. Create a Jaeger CR as attached
3. oc get servicemonitor -o yaml
4. Observe the matchLabels are incorrect
5. Observe the prometheus-operator user-workload-monitoring pod and error of level=warn ts=<timestamp> caller=operator.go:1832 component=prometheusoperatormsg="skipping servicemonitor" error"it accesses file system via bearer token file which Prometheus specification prohibits" servicemonitor=<namespace>/<name> namespace=openshift-user-workload-monitoring prometheus=user-workload

Additional info:

Jaeger creates the elastic search CR here and sets the following labels https://github.com/jaegertracing/jaeger-operator/blob/1a76367a3771c96806309a071ca0ef72d95796e9/pkg/storage/elasticsearch.go#L177-L188

Elastic search uses these labels to create its service monitor here https://github.com/openshift/elasticsearch-operator/blob/805a01044c26dda35b7ef84c3034247e24e886b8/internal/elasticsearch/service_monitor.go#L54

Either the elastic search pods require additional labels or the service monitor needs less.

Comment 3 Red Hat Bugzilla 2023-09-15 01:55:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days

Note You need to log in before you can comment on or make changes to this bug.