Commit 3451cc63 authored by Node- 门 忠鑫's avatar Node- 门 忠鑫

# 删除无用输出

parent 9e7730f0
......@@ -23,7 +23,6 @@ func AgentMsgProcess(msg string) {
func buildMetricsInfluxMsg(chunkMsg end_points.ChunkMsg) {
var ip = inetAtoN(chunkMsg.Ip)
println("ip:%d", ip)
sysNameIndex[ip] = true
var sysNameCount = len(sysNameIndex)
for _, p := range chunkMsg.EndPoints {
......@@ -74,12 +73,10 @@ func buildMetricsInfluxMsg(chunkMsg end_points.ChunkMsg) {
fields["system_load_average"] = metrics.SystemloadAverage
unix := time.Unix(0, p.Timestamp*1000000)
println(p.Timestamp)
if len(pointSlice) >= sysNameCount {
go batchWrite(pointSlice)
pointSlice = make([]*client.Point, 0, batchSize)
}
println(len(pointSlice))
point, _ := client.NewPoint("machine_info", tags, fields, unix)
pointSlice = append(pointSlice, point)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment