Created on 05-23-2017 09:52 AM - edited 08-18-2019 01:47 AM
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...
Any idea ? Timestamp problem ?
Created 05-23-2017 07:13 PM
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
Created 05-24-2017 01:53 PM
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...
Created 05-24-2017 06:26 PM
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.
Created 06-01-2017 03:20 PM
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.