Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong endpoint configured for MonitoringClient.postMetricData() #585

Open
bnhmn opened this issue Mar 29, 2024 · 0 comments
Open

Wrong endpoint configured for MonitoringClient.postMetricData() #585

bnhmn opened this issue Mar 29, 2024 · 0 comments
Labels
Monitoring Issue pertains to the Monitoring service

Comments

@bnhmn
Copy link

bnhmn commented Mar 29, 2024

In the OCI Java SDK (and also in the oci CLI tool), the incorrect endpoint for the Monitoring operation PostMetricData is configured. Therefore, I always get a 404 Not Found error when I call MonitoringClient.postMetricData().

I am using latest OCI Java SDK version com.oracle.oci.sdk:oci-java-sdk-monitoring:3.38.0.

Error returned by PostMetricData operation in Monitoring service.(404, NotAuthorizedOrNotFound, false) Authorization failed or requested resource not found. (opc-request-id: 06418A9859954B53BBCE490EC4CBF06A/30AFF4B43339BA03E6480142EEDEA340/E68006EF501653D8D58A0529E9F18718)
Timestamp: 2024-03-29T20:52:13.602Z
Client version: Oracle-JavaSDK/3.38.0
Request Endpoint: https://telemetry.eu-frankfurt-1.oraclecloud.com/20180401/metrics
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_notauthorizedornotfound for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/MetricData/PostMetricData for details on this operation's requirements.

As described in the PostMetricData API docs, a different endpoint must be used for this specific operation.

Incorrect endpoint: https://telemetry.eu-frankfurt-1.oraclecloud.com
Correct endpoint: https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com

When I manually override the endpoint using MonitoringClient.setEndpoint(), it works without any issues.

I think the endpoint should be fixed both in the Java SDK and the oci CLI tool.

@bhagwatvyas bhagwatvyas added the Monitoring Issue pertains to the Monitoring service label Apr 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Monitoring Issue pertains to the Monitoring service
Projects
None yet
Development

No branches or pull requests

2 participants