Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

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

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...

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.

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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.