openshiftopenshift-originhawkular

hawkular data accessing error


We are getting metrics details by the below command:

curl --insecure --cacert ca.crt -H "Authorization: Bearer 2XwxlTO_ls_HqpwTe5OWhGwuTu5qEzFxVGIhe761V7A" -H "Hawkular-Tenant: openshift-infra" -X GET https://hawkular-metrics.example.com/hawkular/metrics/metrics

We do not get data using below command:

curl --insecure --cacert ca.crt -H "Authorization: Bearer 2XwxlTO_ls_HqpwTe5OWhGwuTu5qEzFxVGIhe761V7A" -H "Hawkular-Tenant: openshift-infra" -X GET https://hawkular-metrics.example.com/hawkular/metrics/counter/data?tags=descrpitor_name:cpu/usage,pod_name:hawkular-cassandra

we are getting below error:

"errorMsg":"RESTEASY003210: Could not find resource for full path: https://hawkular-metrics.example.com/hawkular/metrics/counter"


Solution

  • I think you mistyped the URL, there's a s at counters. See the doc: http://www.hawkular.org/docs/rest/rest-metrics.html#GET__counters_data

    By the way I think you will have to provide at least buckets or bucketDuration parameter to your query, else you'll get another error.