Skip to content

Commit

Permalink
fix freq
Browse files Browse the repository at this point in the history
  • Loading branch information
MuneebAijaz committed Mar 14, 2024
1 parent f0d1c9b commit ce9eb79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions docs/grafana-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ metadata:
spec:
forceHttps: true
url: https://stakater.com/
gcloudConfig:
frequency: 5000
grafanaConfig:
frequency: 10000
probes:
- Amsterdam
- Singapore
```
4 changes: 1 addition & 3 deletions pkg/monitors/grafana/grafana-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ func (service *GrafanaMonitorService) CreateSyntheticCheck(monitor models.Monito

var probeToSet []synthetic_monitoring.Probe
var configProbeNames []string
var frequency int64
var frequency int64 = service.frequency
providerConfig, _ := monitor.Config.(*endpointmonitorv1alpha1.GrafanaConfig)
if providerConfig != nil {
// load configs from EndpointMonitor CR
if providerConfig.Frequency > 0 {
frequency = providerConfig.Frequency
} else {
frequency = service.frequency
}
if len(providerConfig.Probes) > 0 {
configProbeNames = providerConfig.Probes
Expand Down

0 comments on commit ce9eb79

Please sign in to comment.