Skip to content

Commit

Permalink
Merge pull request #3602 from cloudfoundry-incubator/prometheus-metrics
Browse files Browse the repository at this point in the history
Fix bosh prometheus metrics
  • Loading branch information
richard-cox authored May 29, 2019
2 parents 727fa35 + 6f87243 commit 0160938
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jetstream/plugins/metrics/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,17 @@ func (m *MetricsSpecification) createMetadata(metricEndpoint *url.URL, httpClien
url = fmt.Sprintf("wss://%s", environment)
}

// Array for case that metrics are provided for multiple endpoints
var metricsMetadata []*MetricsProviderMetadata
storeMetadata := &MetricsProviderMetadata{
Type: "cf",
URL: url,
Job: job,
Environment: environment,
}
metricsMetadata = append(metricsMetadata, storeMetadata)

jsonMsg, err := json.Marshal(storeMetadata)
jsonMsg, err := json.Marshal(metricsMetadata)
if err != nil {
return "", interfaces.LogHTTPError(res, err)
}
Expand Down

0 comments on commit 0160938

Please sign in to comment.