Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Send custom metrics to Ambari Metrics, creation ok, but no value

Highlighted

Send custom metrics to Ambari Metrics, creation ok, but no value

Explorer

I send this post request to http://host:6188/ws/v1/timeline/metrics

{ "metrics": [

{

"metricname": "test1",

"appid": "FAST-test",

"hostname": "fr-001slli124",

"timestamp": 1495532440000,

"starttime": 1495532440000,

"metrics": {

"1495532440000": 40

}

} ] }

Response is 200 OK, metric is created but there is no value...

15650-capture.png

Any idea ? Timestamp problem ?

4 REPLIES 4

Re: Send custom metrics to Ambari Metrics, creation ok, but no value

Expert Contributor

Make to reduce your query interval to 1 hour / 2 hours or select Precision = seconds.

Default precision is minutes which means AMS will be sending data aggregated at minute boundary (5 min default). You have sent 1 point and it would take at least 5 minutes for first aggregation to pick it up.

https://cwiki.apache.org/confluence/display/AMBARI/Metrics+Collector+API+Specification

Highlighted

Re: Send custom metrics to Ambari Metrics, creation ok, but no value

Explorer

I try many value for precision (seconds, minutes...) but even after 30 mins I don't have any datapoints. Even if i send many POST request with many value during 20 mins, grafana don't receive it...

Highlighted

Re: Send custom metrics to Ambari Metrics, creation ok, but no value

Expert Contributor

If you see the drop down populated with your appId that means the metrics were received by the backend. Note: When we receive data that is older that the

timeline.metrics.service.outofband.time.allowance.millis

we discard that data, as long as your timesatmps are not older than 5 minute which is default setting the data should be persisted as well.

Highlighted

Re: Send custom metrics to Ambari Metrics, creation ok, but no value

Explorer

Where can I find this property ?

Nevertheless I change my solution, now I use a AmbariReportingTask of Apache Nifi.

And despite a log :

o.a.n.r.ambari.AmbariReportingTask AmbariReportingTask[id=5f2b8531-015c-1000-abe9-967b981c04f3] Successfully sent metrics to Ambari in 0 ms

I have the same problem, no datapoint in grafana.

Don't have an account?
Coming from Hortonworks? Activate your account here