|
|
@@ -323,8 +323,10 @@ func main() {
|
|
|
log.Infoln("netdata is:", string(jsonData))
|
|
|
// 创建请求
|
|
|
urlRoute := "/api/v2/ebpf/receive"
|
|
|
+
|
|
|
+ log.Infoln("send url is ", *flags.ServerPrefix + *flags.DataServer + urlRoute)
|
|
|
// req, err := http.NewRequest("POST", "http://10.0.7.115:18080/api/v2/ebpf/receive", bytes.NewBuffer(jsonData))
|
|
|
- req, err := http.NewRequest("POST", *flags.DataServer+urlRoute, bytes.NewBuffer(jsonData))
|
|
|
+ req, err := http.NewRequest("POST", *flags.ServerPrefix + *flags.DataServer + urlRoute, bytes.NewBuffer(jsonData))
|
|
|
if err != nil {
|
|
|
fmt.Println("Error:", err)
|
|
|
return
|
|
|
@@ -359,6 +361,7 @@ func main() {
|
|
|
// 输出响应状态码和响应正文
|
|
|
fmt.Println("Status Code:", response.StatusCode)
|
|
|
fmt.Println("Response Body:", string(responseData))
|
|
|
+ log.Infoln("send data response is ", string(responseData))
|
|
|
}
|
|
|
sendNetDataDone := make(chan struct{})
|
|
|
go func() {
|