func (r *RemoteSysProbeUtil) GetStats() (map[string]interface{}, error) {
	req, err := http.NewRequest("GET", statsURL, nil)
	if err != nil {
		return nil, err
	}

	resp, err := r.httpClient.Do(req)
	if err != nil {
		return nil, err
	} else if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("conn request failed: Path %s, url: %s, status code: %d", r.path, statsURL, resp.StatusCode)
	}

	body, err := ioutil.ReadAll(resp.Body)
	defer resp.Body.Close()
	if err != nil {
		return nil, err
	}

	stats := make(map[string]interface{})
	err = json.Unmarshal(body, &stats)
	if err != nil {
		return nil, err
	}

	return stats, nil
}
// GetStats returns the expvar stats of the system probe
GetStats returns the expvar stats of the system probe
// GetStats returns the expvar stats of the system probe
func (r *RemoteSysProbeUtil) GetStats() (map[string]interface{}, error) {
	req, err := http.NewRequest("GET", statsURL, nil)
	if err != nil {
		return nil, err
	}
	resp, err := r.httpClient.Do(req)
	if err != nil {
		return nil, err
	} else if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("conn request failed: Path %s, url: %s, status code: %d", r.path, statsURL, resp.StatusCode)
	}
	body, err := ioutil.ReadAll(resp.Body)
	defer resp.Body.Close()
	if err != nil {
		return nil, err
	}
	stats := make(map[string]interface{})
	err = json.Unmarshal(body, &stats)
	if err != nil {
		return nil, err
	}
	return stats, nil
}
func ( r * RemoteSysProbeUtil ) GetStats ( ) ( map [ string ] interface { } , error ) { req , err := http . NewRequest ( " " , statsURL , nil ) if err != nil { return nil , err } resp , err := r . httpClient . Do ( req ) if err != nil { return nil , err } else if resp . StatusCode != http . StatusOK { return nil , fmt . Errorf ( " " , r . path , statsURL , resp . StatusCode ) } body , err := ioutil . ReadAll ( resp . Body ) defer resp . Body . Close ( ) if err != nil { return nil , err } stats := make ( map [ string ] interface { } ) err = json . Unmarshal ( body , & stats ) if err != nil { return nil , err } return stats , nil }
GetStats returns the expvar stats of the system probe
GetStats returns the expvar stats of the system probe