Create UDP collector that listens to UDP messages from monitor.lua and exposes them on /metrics endpoint
This commit is contained in:
parent
764bcd5a1b
commit
2cd2da7c3f
13 changed files with 575 additions and 746 deletions
|
|
@ -39,7 +39,9 @@ import (
|
|||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
||||
"k8s.io/ingress-nginx/internal/file"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations/class"
|
||||
"k8s.io/ingress-nginx/internal/ingress/controller"
|
||||
"k8s.io/ingress-nginx/internal/ingress/metric/collector"
|
||||
"k8s.io/ingress-nginx/internal/k8s"
|
||||
"k8s.io/ingress-nginx/internal/net/ssl"
|
||||
"k8s.io/ingress-nginx/version"
|
||||
|
|
@ -125,6 +127,18 @@ func main() {
|
|||
mux := http.NewServeMux()
|
||||
go registerHandlers(conf.EnableProfiling, conf.ListenPorts.Health, ngx, mux)
|
||||
|
||||
err = collector.InitNGINXStatusCollector(conf.Namespace, class.IngressClass, conf.ListenPorts.Status)
|
||||
|
||||
if err != nil {
|
||||
glog.Fatalf("Error generating metric collector: %v", err)
|
||||
}
|
||||
|
||||
err = collector.InitUDPCollector(conf.Namespace, class.IngressClass, 8000)
|
||||
|
||||
if err != nil {
|
||||
glog.Fatalf("Error generating UDP collector: %v", err)
|
||||
}
|
||||
|
||||
ngx.Start()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue