Add and HTTP metrics collector

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
This commit is contained in:
Arjun Naik
2020-04-01 20:32:09 +02:00
parent 405e347620
commit 2d3ddc53ef
16 changed files with 928 additions and 357 deletions

View File

@@ -190,6 +190,8 @@ func (o AdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-chan struct
collectorFactory.RegisterExternalCollector([]string{collector.InfluxDBMetricName}, influxdbPlugin)
}
plugin, _ := collector.NewHTTPCollectorPlugin()
collectorFactory.RegisterExternalCollector([]string{collector.HTTPMetricName}, plugin)
// register generic pod collector
err = collectorFactory.RegisterPodsCollector("", collector.NewPodCollectorPlugin(client))
if err != nil {