diff --git a/pkg/monitors/grafana/grafana-monitor.go b/pkg/monitors/grafana/grafana-monitor.go index 019af8fb..965e2c44 100644 --- a/pkg/monitors/grafana/grafana-monitor.go +++ b/pkg/monitors/grafana/grafana-monitor.go @@ -92,9 +92,10 @@ func (service *GrafanaMonitorService) GetAll() (monitors []models.Monitor) { URL: check.Target, ID: fmt.Sprintf("%v", check.Id), Config: &endpointmonitorv1alpha1.GrafanaConfig{ - TenantId: check.TenantId, - Frequency: check.Frequency, - Probes: probes, + TenantId: check.TenantId, + Frequency: check.Frequency, + Probes: probes, + AlertSensitivity: check.AlertSensitivity, }, }) } diff --git a/pkg/monitors/grafana/grafana-monitor_test.go b/pkg/monitors/grafana/grafana-monitor_test.go index 4400370c..74caef2f 100644 --- a/pkg/monitors/grafana/grafana-monitor_test.go +++ b/pkg/monitors/grafana/grafana-monitor_test.go @@ -61,7 +61,7 @@ func TestAddMonitorWithCorrectValues(t *testing.T) { providerConfig, _ := m.Config.(*endpointmonitorv1alpha1.GrafanaConfig) if monitor.Name != m.Name || monitor.URL != m.URL || monitorConfig.Frequency != providerConfig.Frequency || reflect.DeepEqual(monitorConfig.Probes, providerConfig.Probes) || monitorConfig.AlertSensitivity != providerConfig.AlertSensitivity { - t.Error("URL, name, frequency and probes should be the same", monitor, m) + t.Error("URL, name, frequency, probes and alertSensitivity should be the same", monitor, m) } service.Remove(*monitor)