The /run/fapolicyd/fapolicyd.metrics file contains the most
recent daemon metrics report requested through
fapolicyd-cli --check-metrics,
fapolicyd-cli --reset-metrics, or periodic interval
reporting.
The metrics report answers where runtime hot paths and cache
effects are. The state report, written to
/run/fapolicyd/fapolicyd.state, answers whether the daemon is healthy
and configured as expected. Each field is printed as a name: value
line. Section headers end in a colon. Worker-specific drill-down fields are
indented by two spaces under the related aggregate section.
- Last metrics
reset
- The wall-clock time of the last successful metrics reset, or never
when metrics have not been reset since daemon start. Reset reports show
the counter window that is about to be reset; later metrics reports show
the new reset time.
- Config
generation
- The active decision configuration generation at report time. The counters
may span earlier generations when configuration was reloaded after the
last metrics reset.
- Ruleset
generation
- The active ruleset generation that the counters and rule hit table apply
to.
- Trust database
generation
- The active trust database generation used by new decision reads at report
time. This is a daemon-runtime generation that starts at 1 during startup.
The counters may span earlier trust database generations when reloads
occurred after the last metrics reset.
- LMDB environment
generation
- The active physical LMDB environment generation at report time. This
increments only when fapolicyd closes the live environment and publishes a
validated replacement environment for compaction or high-water reset. It
complements the trust database generation: trust generations publish
logical content inside an environment, while LMDB environment generations
identify the storage file currently backing those logical
generations.
- Trust database
entries
- The number of records in the active trust database generation at report
time.
- Allowed
accesses
- The number of policy decisions that allowed access.
- Denied
accesses
- The number of policy decisions that denied access.
- Allowed by
rule
- The number of allow decisions produced by a matching rule.
- Allowed by
fallthrough
- The number of allow decisions produced when no rule had an opinion and the
daemon used the default allow behavior. Detailed fallthrough dimensions
are printed when this value is non-zero.
- Trust DB
lookups
- The number of trust database lookup attempts since the last metrics
reset.
- Trust DB reader slots
full
- The number of lookup attempts that could not open an LMDB read transaction
because all LMDB reader slots were in use.
Trust database lookup latency is reported by
fapolicyd.timing(5) only while manual timing collection is armed, so
normal metrics collection does not add per-lookup clock reads.
- Hits/rule
- One line per configured rule in rule order. The line includes the
one-based rule number, hit count, and rule text. Rule hit counters are
naturally scoped to the active ruleset generation and start at zero when a
new ruleset is loaded. A metrics reset also clears the counters after
reporting them, which allows focused tests against the currently loaded
rules without forcing a rule reload.
- Subject
attr
- One line is printed for each counted subject attribute in the form
name requests=count lookups=count. The
requests count increments when policy evaluation or syslog
formatting asks for the attribute. The lookups count increments
only when that attribute was absent from the event subject cache and
fapolicyd had to compute or fetch it.
- Object
attr
- One line is printed for each counted object attribute in the form
name requests=count lookups=count. The
requests count increments when policy evaluation or syslog
formatting asks for the attribute. The lookups count increments
only when that attribute was absent from the event object cache and
fapolicyd had to compute or fetch it.
Metrics resets affect counters in this report. Static
configuration, current utilization snapshots, watched mounts, and health
indicators are reported in fapolicyd.state(5) and are not reset by
fapolicyd-cli --reset-metrics.
- /run/fapolicyd/fapolicyd.metrics
- Runtime metrics report file.
- /run/fapolicyd/fapolicyd.state
- Runtime state report file.
- /run/fapolicyd/fapolicyd.timing
- Manual decision timing report written when a privileged stop request ends
an armed timing run, when a stop request finds timing unarmed, or when
timing collection stops to avoid counter overflow.