Skip to content

Commit

Permalink
add response_ms metric when ping failed
Browse files Browse the repository at this point in the history
  • Loading branch information
hel2o authored Sep 16, 2022
1 parent fbf152c commit fb303ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inputs/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ func (ins *Instance) gather(slist *types.SampleList, target string) {
log.Println("D! no packets received, target:", target)
}
fields["result_code"] = 1
fields["minimum_response_ms"] = float64(-1)
fields["average_response_ms"] = float64(-1)
fields["maximum_response_ms"] = float64(-1)
fields["percent_packet_loss"] = float64(100)
return
}
Expand Down

0 comments on commit fb303ab

Please sign in to comment.