Skip to content

Commit

Permalink
http探测异常时,在日志中打印target用于快速定位
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangpeng committed Dec 26, 2024
1 parent 9d7fb45 commit b1c5da3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inputs/http_response/http_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ func (ins *Instance) httpGather(target string) (map[string]string, map[string]in
bs, err := io.ReadAll(resp.Body)
if err != nil {
log.Println("E! failed to read response body:", err)
// 增加打印target,当探测目标较多时,可以快速定位有问题的target
log.Println("E! http target:", target)
return tags, fields, nil
}

Expand Down

0 comments on commit b1c5da3

Please sign in to comment.