| @PLUGIN@ Metrics | |
| ================ | |
| These counters describe IP-policy evaluation at project permission scope, | |
| not HTTP/SSH request counts or final Gerrit authorization outcomes. One | |
| request may cause multiple project permission checks. Metrics are recorded | |
| regardless of `logDecisions`. | |
| `ip_subnet_acl/decision_total{result,reason}` | |
| : Incremented once per IP-policy decision. `result` is `allow` or `deny`; | |
| `reason` is a lowercase decision reason, such as `deny_project_block`. | |
| `allow` means the check delegates to Gerrit's normal permissions. | |
| After a global-policy error with fail-open enabled, a project violation | |
| retains its own reason; an otherwise-allowed check uses | |
| `allow_global_policy_error`. | |
| `ip_subnet_acl/policy_invalid_total` | |
| : Incremented for each invalid global or per-project policy encountered | |
| during a project permission check, including load errors. Repeated | |
| checks of a cached invalid policy each increment the counter; this is | |
| not a count of unique parsing failures. | |
| `ip_subnet_acl/missing_remote_peer_total` | |
| : Incremented for each project permission check whose checked user's | |
| remote IP cannot be resolved, including other-account inquiries that | |
| bypass IP policy. |