// process collector/metrics URL
process collector/metrics URL
// process collector / metrics URL
func CollectorMetrics(w http.ResponseWriter, r *http.Request) {
	type ApexMetricMessage struct {
		meta    map[string]string
		metrics map[string]string
	}
	body, err := ioutil.ReadAll(r.Body)
	if err != nil {
		panic(err)
	}
	var f interface{}
	json.Unmarshal([]byte(body), &f)
	fmt.Printf("%+v\n", f)
	event := common.MapStr{
		"@timestamp": common.Time(time.Now()),
		"type":       "metricmessage",
		"meta":       f.(map[string]interface{})["meta"],
		"metrics":    f.(map[string]interface{})["metrics"],
	}
	abt.client.PublishEvent(event)
	fmt.Fprintf(w, "OK")
	logp.Info("Event sent")
}
func CollectorMetrics ( w http . ResponseWriter , r * http . Request ) { type ApexMetricMessage struct { meta map [ string ] string metrics map [ string ] string } body , err := ioutil . ReadAll ( r . Body ) if err != nil { panic ( err ) } var f interface { } json . Unmarshal ( [ ] byte ( body ) , & f ) fmt . Printf ( " \n " , f ) event := common . MapStr { " " : common . Time ( time . Now ( ) ) , " " : " " , " " : f . ( map [ string ] interface { } ) [ " " ] , " " : f . ( map [ string ] interface { } ) [ " " ] , } abt . client . PublishEvent ( event ) fmt . Fprintf ( w , " " ) logp . Info ( " " ) }
process collector/metrics URL
process collector / metrics URL