191191 ]},
192192
193193 {auth_attempt_metrics , [
194- {2 , undefined , auth_attempts_total , counter , " Total number of authorization attempts on a node " },
195- {3 , undefined , auth_attempts_succeeded_total , counter , " Total number of successful authentication attempts on a node " },
196- {4 , undefined , auth_attempts_failed_total , counter , " Total number of failed authentication attempts on a node " }
194+ {2 , undefined , auth_attempts_total , counter , " Total number of authorization attempts" },
195+ {3 , undefined , auth_attempts_succeeded_total , counter , " Total number of successful authentication attempts" },
196+ {4 , undefined , auth_attempts_failed_total , counter , " Total number of failed authentication attempts" }
197197 ]},
198198
199199 {auth_attempt_detailed_metrics , [
200- {2 , undefined , auth_attempts_total , counter , " Total number of authorization attempts on a node " },
201- {3 , undefined , auth_attempts_succeeded_total , counter , " Total number of successful authorization attempts on a node " },
202- {4 , undefined , auth_attempts_failed_total , counter , " Total number of failed authorization attempts on a node " }
200+ {2 , undefined , auth_attempts_detailed_total , counter , " Total number of authorization attempts with source info " },
201+ {3 , undefined , auth_attempts_detailed_succeeded_total , counter , " Total number of successful authorization attempts with source info " },
202+ {4 , undefined , auth_attempts_detailed_failed_total , counter , " Total number of failed authorization attempts with source info " }
203203 ]}
204204
205205]).
@@ -231,7 +231,7 @@ collect(PerObjectMetrics, Callback) ->
231231 [begin
232232 Data = get_data (Table , PerObjectMetrics ),
233233 mf (Callback , Contents , Data )
234- end || {Table , Contents } <- ? METRICS_RAW , needs_processing (PerObjectMetrics , Table )],
234+ end || {Table , Contents } <- ? METRICS_RAW , include_when_per_object_metrics (PerObjectMetrics , Table )],
235235 [begin
236236 Size = ets :info (Table , size ),
237237 mf_totals (Callback , Name , Type , Help , Size )
@@ -240,11 +240,9 @@ collect(PerObjectMetrics, Callback) ->
240240 add_metric_family (identity_info (), Callback ),
241241 ok .
242242
243- needs_processing (false , auth_attempt_detailed_metrics ) ->
244- % % When per object metrics are disabled the detailed authentication attempt metrics
245- % % create duplicates. Totals are carried on `auth_attempt_metrics`
243+ include_when_per_object_metrics (false , auth_attempt_detailed_metrics ) ->
246244 false ;
247- needs_processing (_ , _ ) ->
245+ include_when_per_object_metrics (_ , _ ) ->
248246 true .
249247
250248build_info () ->
0 commit comments