@Leonardo Apolonio
Ambari Metrics collector allows the user to send metrics to it in a particular format as described in the : https://cwiki.apache.org/confluence/display/AMBARI/Metrics+Collector+API+Specification
So you can write a custom script on every host to run regularly and provide the JSON like this:
Example:
{
"metrics": [{
"metricname": "test.diskstat_Metric",
"appid": "testdiskstate",
"hostname": "host1.example.com",
"timestamp": 1520720082573,
"starttime": 1520720082000,
"metrics": {
"1520720082573": 315
}
}]
}
Here you will need your custom script to produce the above kind of JSON format data and then post it to Abari Metrics Collector using http POST method.
Please review the following blog for similar implementation: AMSSMOKETESTFAKE
https://bryanbende.com/development/2015/07/31/ambari-metrics-part1-metrics-collector
.