Skip to content

Commit

Permalink
Merge pull request #4 from mbarper/master
Browse files Browse the repository at this point in the history
Adds responsetime_threshold to TCP type checks
  • Loading branch information
DrFaust92 authored Nov 14, 2023
2 parents 40576eb + 93fffbc commit 8427ab7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pingdom/check_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type TCPCheck struct {
Port int `json:"port"`
ProbeFilters string `json:"probe_filters,omitempty"`
Resolution int `json:"resolution,omitempty"`
ResponseTimeThreshold int `json:"responsetime_threshold,omitempty"`
SendNotificationWhenDown int `json:"sendnotificationwhendown,omitempty"`
StringToExpect string `json:"stringtoexpect,omitempty"`
StringToSend string `json:"stringtosend,omitempty"`
Expand Down Expand Up @@ -288,6 +289,10 @@ func (ck *TCPCheck) PutParams() map[string]string {
m["resolution"] = strconv.Itoa(ck.Resolution)
}

if ck.ResponseTimeThreshold != 0 {
m["responsetime_threshold"] = strconv.Itoa(ck.ResponseTimeThreshold)
}

if ck.SendNotificationWhenDown != 0 {
m["sendnotificationwhendown"] = strconv.Itoa(ck.SendNotificationWhenDown)
}
Expand Down

0 comments on commit 8427ab7

Please sign in to comment.