Bug 2011693 - (release-4.10) "insightsclient_request_recvreport_total" metric is always incremented
Summary: (release-4.10) "insightsclient_request_recvreport_total" metric is always inc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Insights Operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Tomas Remes
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-07 06:18 UTC by Tomas Remes
Modified: 2022-03-10 16:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:17:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift insights-operator pull 514 0 None open Bug 2011693: Increment the "insightsclient_request_recvreport_total" metric only w… 2021-10-07 06:18:51 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:18:30 UTC

Description Tomas Remes 2021-10-07 06:18:16 UTC
Description of problem:

"insightsclient_request_recvreport_total" is always incremented, even when the same Insights report is downloaded again.

Expected results:

The metric should be incremented only when a new Insights report is downloaded


Additional info:

Comment 2 Dmitry Misharov 2021-10-08 12:20:54 UTC
Verified on 4.10.0-0.nightly-2021-10-08-050801.
Verification steps:
1. Provision a cluster
2. Wait until IO will send the archive to console.redhat.com and retrieve the report from it
3. Save the report from this endpoint https://console.redhat.com/api/insights-results-aggregator/v1/clusters/<cluster_id>/report
4. Provision a mock server (https://mock-server.com)
5. Configure it to respond on /api/insights-results-aggregator/v1/clusters/<cluster_id>/report using saved report from paragraph 3
6. Add a new key "reportEndpoint" in the "support" secret in the "openshift-config" namespace with value "https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/%s/report"
7. Restart the Insights Operator
8. Wait until it retrieves several reports

In the logs you should see:
I1008 10:47:17.766877       1 insightsreport.go:72] Pulling report from smart-proxy
I1008 10:47:17.767041       1 insightsreport.go:84] Retrieving report
I1008 10:47:17.767278       1 insightsclient.go:300] Retrieving report for cluster: 98bc3ee3-2461-4e3f-a85f-4dd2476cca8b
I1008 10:47:17.767328       1 insightsclient.go:301] Endpoint: https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/98bc3ee3-2461-4e3f-a85f-4dd2476cca8b/report
I1008 10:47:17.775920       1 insightsclient.go:311] Retrieving report from https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/98bc3ee3-2461-4e3f-a85f-4dd2476cca8b/report
I1008 10:47:18.034649       1 insightsreport.go:119] Report retrieved
I1008 10:47:18.034832       1 insightsreport.go:127] Smart Proxy report correctly parsed
I1008 10:47:18.034872       1 insightsreport.go:130] Retrieved report is equal to previus one. Retrying...
E1008 10:47:18.034889       1 insightsreport.go:171] Unrecoverable problem retrieving the report: report not updated

9. Get cluster's prometheus url in a route in "openshift-monitoring" namespace.
10. Make a query for "insightsclient_request_recvreport_total" metric
it should be not incremented from the time you changed the "reportEndpoint"

Comment 5 errata-xmlrpc 2022-03-10 16:17:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


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