ibm-cloud-docs / monitoring

Documentation repository for monitoring
1 stars 11 forks source link

Error 'Not found' return from restful api to extract latest metrics #23

Open wanghh2000 opened 2 years ago

wanghh2000 commented 2 years ago

Monitoring support using restful api to extract latest metrics by doc on 'https://cloud.ibm.com/docs/monitoring?topic=monitoring-metrics_api'. 'Not found' always return from api <SYSDIG_REST_API_ENDPOINT>/prometheus/api/v1/query. But it can be found on web page -> explore -> PromQL Query. Output like below.

root@canoeist1:~# curl https://us-south.monitoring.cloud.ibm.com/api/prometheus/api/v1/query?query=sysdig_host_cpu_used_percent -H "Authorization: $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "content-type: application/json" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   111    0   111    0     0    152      0 --:--:-- --:--:-- --:--:--   152
{
  "timestamp": 1642486725097,
  "status": 404,
  "error": "Not Found",
  "message": "",
  "path": "/api/prometheus/api/v1/query"
}
wanghh2000 commented 2 years ago

Does it caused by time delay between monitoring server and monitoring agent?