Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

post_metric_data method of MonitoringClient class uses wrong endpoint #366

Open
pastyGRB opened this issue Jul 8, 2021 · 2 comments
Open
Labels
Monitoring Issue pertains to the Monitoring service

Comments

@pastyGRB
Copy link

pastyGRB commented Jul 8, 2021

There is a defect with the post_metric_data function of the python SDK for the monitoring client class.
https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/api/monitoring/client/oci.monitoring.MonitoringClient.html#oci.monitoring.MonitoringClient.post_metric_data

In the example provided by Oracle it gives this code:
post_metric_data.py (oracle.com)

Line 18 of the code has the following:
monitoring_client = oci.monitoring.MonitoringClient(config)

When I run that code (with my own values), it fails with a 404 error. After a bunch of troubleshooting, I figured out that the code in that example is wrong. You actually need to explicitly define the client with service_endpoint like I have below:
monitoring_client = oci.monitoring.MonitoringClient(config,service_endpoint="https://telemetry-ingestion.us-phoenix-1.oraclecloud.com")

When I run that, it works just fine. Maybe this is expected behavior, but if that’s the case, the documentation is really unclear and the example is wrong.

@jodoglevy jodoglevy added the Monitoring Issue pertains to the Monitoring service label Jul 14, 2021
@jodoglevy
Copy link
Contributor

@pastyGRB thanks for reporting - we'll pass this feedback to the Monitoring service team to fix this

@noprobsdk
Copy link

This is still an issue..

Have to do the same fix.

@pastyGRB Thx! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Monitoring Issue pertains to the Monitoring service
Projects
None yet
Development

No branches or pull requests

3 participants