@Setter
private static XacmlPdpStatisticsManager current = null;
protected static final String PROMETHEUS_NAMESPACE = "pdpx";
+ protected static final String POLICY_DECISIONS_METRIC = "policy_decisions";
+ public static final String POLICY_DECISIONS_HELP = "The total number of policy decisions.";
+ public static final String PERMIT_OPERATION = "permit";
+ public static final String DENY_OPERATION = "deny";
+ public static final String INDETERMINANT_OPERATION = "indeterminant";
+ public static final String NOT_APPLICABLE_OPERATION = "not_applicable";
protected static final Counter deploymentsCounter =
Counter.build().namespace(PROMETHEUS_NAMESPACE).name(PrometheusUtils.POLICY_DEPLOYMENTS_METRIC)
.help(PrometheusUtils.POLICY_DEPLOYMENT_HELP)
.register();
+ protected static final Counter decisionsCounter =
+ Counter.build().namespace(PROMETHEUS_NAMESPACE).name(POLICY_DECISIONS_METRIC)
+ .labelNames(PrometheusUtils.STATUS_METRIC_LABEL)
+ .help(POLICY_DECISIONS_HELP)
+ .register();
+
private long totalPolicyTypesCount;
private long totalPoliciesCount;
private long errorCount;
*/
@Synchronized
public long updatePermitDecisionsCount() {
+ decisionsCounter.labels(PERMIT_OPERATION).inc();
return ++permitDecisionsCount;
}
*/
@Synchronized
public long updateDenyDecisionsCount() {
+ decisionsCounter.labels(DENY_OPERATION).inc();
return ++denyDecisionsCount;
}
*/
@Synchronized
public long updateIndeterminantDecisionsCount() {
+ decisionsCounter.labels(INDETERMINANT_OPERATION).inc();
return ++indeterminantDecisionsCount;
}
*/
@Synchronized
public long updateNotApplicableDecisionsCount() {
+ decisionsCounter.labels(NOT_APPLICABLE_OPERATION).inc();
return ++notApplicableDecisionsCount;
}