Skip to content

Commit

Permalink
Use one run method for all Prometheus metric types
Browse files Browse the repository at this point in the history
  • Loading branch information
jrauh01 committed Aug 19, 2024
1 parent f11ba7b commit 7f26e61
Show file tree
Hide file tree
Showing 2 changed files with 346 additions and 306 deletions.
4 changes: 1 addition & 3 deletions cmd/icinga-kubernetes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ func main() {
}

promApiClient := promv1.NewAPI(promClient)
promMetricSync := metrics.NewPromMetricSync(promApiClient, db2)
promMetricSync := metrics.NewPromMetricSync(promApiClient, db2, logs.GetChildLogger("prom-metric-sync"))

g.Go(func() error {
return promMetricSync.Nodes(ctx, factory.Core().V1().Nodes().Informer())
})

g.Go(func() error {
return promMetricSync.Pods(ctx, factory.Core().V1().Pods().Informer())

//return promMetricSync.Run(ctx)
})
}

Expand Down
Loading

0 comments on commit 7f26e61

Please sign in to comment.