forked from yusheng-guo/kube-metrics-adapter
Allow Prometheus metrics for External target
Fix #45 Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
@@ -156,9 +156,11 @@ func (o AdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-chan struct
|
||||
|
||||
err = collectorFactory.RegisterObjectCollector("", "prometheus", promPlugin)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to register prometheus collector plugin: %v", err)
|
||||
return fmt.Errorf("failed to register prometheus object collector plugin: %v", err)
|
||||
}
|
||||
|
||||
collectorFactory.RegisterExternalCollector([]string{collector.PrometheusMetricName}, promPlugin)
|
||||
|
||||
// skipper collector can only be enabled if prometheus is.
|
||||
if o.SkipperIngressMetrics {
|
||||
skipperPlugin, err := collector.NewSkipperCollectorPlugin(client, promPlugin, o.SkipperBackendWeightAnnotation)
|
||||
|
Reference in New Issue
Block a user