Skip to content

Commit

Permalink
Fixing Pingdom error for when SSLDownDaysBefore is set even though Ve…
Browse files Browse the repository at this point in the history
…rifyCertificate is false (#370)
  • Loading branch information
jsokol89 authored Dec 24, 2021
1 parent e811556 commit 344ab75
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/monitors/pingdom/pingdom-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,13 @@ func (service *PingdomMonitorService) addConfigToHttpCheck(httpCheck *pingdom.Ht

// Set certificate not valid before, default to 28 days to accommodate Let's Encrypt 30 day renewals + 2 days grace period.
defaultSSLDownDaysBefore := 28
if providerConfig != nil && providerConfig.SSLDownDaysBefore > 0 {
httpCheck.SSLDownDaysBefore = &providerConfig.SSLDownDaysBefore
} else {
httpCheck.SSLDownDaysBefore = &defaultSSLDownDaysBefore
// Pingdom doesn't allow SSLDownDaysBefore to be set if VerifyCertificate isn't set to true
if providerConfig != nil && providerConfig.VerifyCertificate {
if providerConfig.SSLDownDaysBefore > 0 {
httpCheck.SSLDownDaysBefore = &providerConfig.SSLDownDaysBefore
} else {
httpCheck.SSLDownDaysBefore = &defaultSSLDownDaysBefore
}
}

if providerConfig != nil {
Expand Down

0 comments on commit 344ab75

Please sign in to comment.