POST/GET metrics to 
http://127.0.0.1:6188/ws/v1/timeline/metrics/<http://{metric_collector_host}:{metric_collector_port}/ws/v1/timeline/metrics/>?


________________________________
From: matt Lieber <[email protected]>
Sent: Thursday, December 10, 2015 7:08 PM
To: [email protected]
Subject: Fwd: Posting Metrics to Ambari - Metrics Collector



hi,

I am trying to post metrics to Ambari. I started the Metric collector in Ambari 
on their sandbox. Then i followed instructions on 
https://cwiki.apache.org/confluence/display/AMBARI/Metrics+Collector+API+Specification
 and posted:


$ wget --post-data="{

  "metrics": [

    {

      "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric",

      "appid": "amssmoketestfake",

      "hostname": "127.0.0.1",

      "timestamp": 1432075898000,

      "starttime": 1432075898000,

      "metrics": {

        "1432075898000": 0.963781711428,

        "1432075899000": 1432075898000

      }

    }

  ]

}" http://127.0.0.1:6188


--2015-12-10 08:48:42--  (try: 6)  http://127.0.0.1:6188/

Connecting to 127.0.0.1:6188... connected.

HTTP request sent, awaiting response... 302 Found

Location: http://127.0.0.1:6188/applicationhistory [following]

--2015-12-10 08:48:44--  http://127.0.0.1:6188/applicationhistory

Reusing existing connection to 127.0.0.1:6188<http://127.0.0.1:6188>.

HTTP request sent, awaiting response... 200 OK

Length: 5218 (5.1K) [text/html]

Saving to: `index.html.1'


100%[====================================================================================================================================================>]
 5,218       --.-K/s   in 0s


2015-12-10 08:48:45 (237 MB/s) - `index.html.1' saved [5218/5218]


Then i looked at the log, started in debug mode, but cant find a trace of the 
metric ..?

# cat /var/log/ambari-metrics-collector/ambari-metrics-collector.log | grep 
SmokeTest

[root@sandbox ~]#

I also looked via a query on Phoenix, but to no availability.

anyone knows what's going on ?


cheers,
Matt

Reply via email to