Skip to content

Commit

Permalink
Merge pull request #752 from oxddr/probes-prom
Browse files Browse the repository at this point in the history
Do not run probes if Prometheus is disabled.
  • Loading branch information
k8s-ci-robot committed Aug 12, 2019
2 parents 8df2e8f + 0f293ea commit 22b8615
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clusterloader2/pkg/measurement/common/probes/probes.go
Expand Up @@ -98,9 +98,14 @@ type probesMeasurement struct {
// - gather - Gathers and prints metrics.
func (p *probesMeasurement) Execute(config *measurement.MeasurementConfig) ([]measurement.Summary, error) {
if config.CloudProvider == "kubemark" {
klog.Info("Probes cannot work in Kubemark, skipping the measurement execution")
klog.Infof("%s: Probes cannot work in Kubemark, skipping the measurement!", p)
return nil, nil
}
if config.PrometheusFramework == nil {
klog.Warningf("%s: Prometheus is disabled, skipping the measurement!", p)
return nil, nil
}

action, err := util.GetString(config.Params, "action")
if err != nil {
return nil, err
Expand Down

0 comments on commit 22b8615

Please sign in to comment.