Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
John2020-cyber committed Jan 15, 2024
1 parent 714fe91 commit 34b547b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/monitors/grafana/grafana-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func (service *GrafanaMonitorService) Setup(provider config.Provider) {
service.smClient = client
service.tenant = tenant
//CHECK if freq is set
if provider.GrafanaConfig.Frequency > 0 {
service.frequency = provider.GrafanaConfig.Frequency
} else {
service.frequency = FrequencyDefaultValue
}
}

func (service *GrafanaMonitorService) GetAll() (monitors []models.Monitor) {
Expand All @@ -60,6 +65,9 @@ func (service *GrafanaMonitorService) GetAll() (monitors []models.Monitor) {
Name: check.Job,
URL: check.Target,
ID: fmt.Sprintf("%v", check.Id),
Config: &endpointmonitorv1alpha1.GrafanaConfig{
TenantId: check.TenantId,
},
})
}
return monitors
Expand All @@ -84,6 +92,11 @@ func (service *GrafanaMonitorService) CreateSyntheticCheck(monitor models.Monito
}
checkId = idResult
}
var tenantID int64

Check failure on line 95 in pkg/monitors/grafana/grafana-monitor.go

View workflow job for this annotation

GitHub Actions / Pull Request

tenantID declared and not used) (typecheck)

Check failure on line 95 in pkg/monitors/grafana/grafana-monitor.go

View workflow job for this annotation

GitHub Actions / Pull Request

tenantID declared and not used (typecheck)
grafanaConfig, _ := monitor.Config.(*endpointmonitorv1alpha1.GrafanaConfig)
if grafanaConfig != nil {
tenantID = grafanaConfig.TenantId
}
// Creating a new Check object
return &synthetic_monitoring.Check{
Id: checkId,
Expand Down

0 comments on commit 34b547b

Please sign in to comment.