Просмотр исходного кода

Add Athena cloud-integration Error Logging (#3581)

Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
Hunter Metcalfe 3 месяцев назад
Родитель
Сommit
9c7057c142
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      pkg/cloud/aws/athenaintegration.go

+ 2 - 1
pkg/cloud/aws/athenaintegration.go

@@ -74,12 +74,13 @@ func (ai *AthenaIntegration) GetCloudCost(start, end time.Time) (*opencost.Cloud
 
 
 func (ai *AthenaIntegration) RefreshStatus() cloud.ConnectionStatus {
 func (ai *AthenaIntegration) RefreshStatus() cloud.ConnectionStatus {
 	end := time.Now().UTC().Truncate(timeutil.Day)
 	end := time.Now().UTC().Truncate(timeutil.Day)
-	start := end.Add(-7 * timeutil.Day)
+	start := end.Add(-3 * timeutil.Day) // lookback 72 hours
 
 
 	// getCloudCost already sets ConnectionStatus in the event there is no error, so we don't need to handle the positive
 	// getCloudCost already sets ConnectionStatus in the event there is no error, so we don't need to handle the positive
 	// case here
 	// case here
 	_, err := ai.getCloudCost(start, end, 1)
 	_, err := ai.getCloudCost(start, end, 1)
 	if err != nil {
 	if err != nil {
+		log.Errorf("AthenaIntegration: RefreshStatus: error while refreshing status: %s", err.Error())
 		ai.ConnectionStatus = cloud.FailedConnection
 		ai.ConnectionStatus = cloud.FailedConnection
 	}
 	}