Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating prometheus metrics names according to naming best practices #1910

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions internal/ingress/controller/metric/collector/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,37 @@ func NewNginxStatus(watchNamespace, ingressClass string, ngxHealthPort int, ngxV

p.data = &nginxStatusData{
active: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "active_connections"),
prometheus.BuildFQName(ns, "", "active_connections_total"),
"total number of active connections",
[]string{"ingress_class", "namespace"}, nil),

accepted: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "accepted_connections"),
prometheus.BuildFQName(ns, "", "accepted_connections_total"),
"total number of accepted client connections",
[]string{"ingress_class", "namespace"}, nil),

handled: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "handled_connections"),
prometheus.BuildFQName(ns, "", "handled_connections_total"),
"total number of handled connections",
[]string{"ingress_class", "namespace"}, nil),

requests: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "total_requests"),
prometheus.BuildFQName(ns, "", "requests_total"),
"total number of client requests",
[]string{"ingress_class", "namespace"}, nil),

reading: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "current_reading_connections"),
prometheus.BuildFQName(ns, "", "current_reading_connections_total"),
"current number of connections where nginx is reading the request header",
[]string{"ingress_class", "namespace"}, nil),

writing: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "current_writing_connections"),
prometheus.BuildFQName(ns, "", "current_writing_connections_total"),
"current number of connections where nginx is writing the response back to the client",
[]string{"ingress_class", "namespace"}, nil),

waiting: prometheus.NewDesc(
prometheus.BuildFQName(ns, "", "current_waiting_connections"),
prometheus.BuildFQName(ns, "", "current_waiting_connections_total"),
"current number of idle client connections waiting for a request",
[]string{"ingress_class", "namespace"}, nil),
}
Expand Down