Merge pull request #48106 from timstclair/audit-metrics

Automatic merge from submit-queue (batch tested with PRs 48106, 46761)

s/count/total/ in audit prometheus metrics

Responding to https://github.com/kubernetes/kubernetes/pull/46732#discussion_r124057806, making the metric names conform with the [metric naming convention](https://prometheus.io/docs/practices/naming/#metric-names).

kubernetes/features#22

/cc @ericchiang @ihmccreery
This commit is contained in:
Kubernetes Submit Queue 2017-06-27 15:01:57 -07:00 committed by GitHub
commit fd884b7eb6

View File

@ -32,13 +32,13 @@ var (
eventCounter = prometheus.NewCounter( eventCounter = prometheus.NewCounter(
prometheus.CounterOpts{ prometheus.CounterOpts{
Subsystem: subsystem, Subsystem: subsystem,
Name: "event_count", Name: "event_total",
Help: "Counter of audit events generated and sent to the audit backend.", Help: "Counter of audit events generated and sent to the audit backend.",
}) })
errorCounter = prometheus.NewCounterVec( errorCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{ prometheus.CounterOpts{
Subsystem: subsystem, Subsystem: subsystem,
Name: "error_count", Name: "error_total",
Help: "Counter of audit events that failed to be audited properly. " + Help: "Counter of audit events that failed to be audited properly. " +
"Plugin identifies the plugin affected by the error.", "Plugin identifies the plugin affected by the error.",
}, },
@ -47,7 +47,7 @@ var (
levelCounter = prometheus.NewCounterVec( levelCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{ prometheus.CounterOpts{
Subsystem: subsystem, Subsystem: subsystem,
Name: "level_count", Name: "level_total",
Help: "Counter of policy levels for audit events (1 per request).", Help: "Counter of policy levels for audit events (1 per request).",
}, },
[]string{"level"}, []string{"level"},