Technical Tip: FortiGate Explicit proxy per policy hit count
| Description | This article describes how to get hit count for Explicit Proxy policies through CLI. |
| Scope | FortiGate. |
| Solution | Firewall policy and explicit proxy policy operate on different levels. The same applies to statistics and how to read them.
An explicit proxy is a service that is handled by the WAD process. Knowing this, to get statistics for these types of policies, WAD needs to be dumped.
To navigate through this, a simple proxy-policy is taken into account:
config firewall proxy-policy
Note that policy ID is 1.
Using the command 'diagnose wad worker policy list' will list all proxy-policies currently active in the FortiGate.
FGT # diagnose wad worker policy list
implicit proxy allow policy, vdom:root p_id:0 p_uuid:
implicit proxy deny policy, vdom:root p_id:0 p_uuid:
Policy ID from this output is found at entry p_id:1, where number 1 is the policy ID.
To filter specific policies, use the grep command: 'diagnose wad worker policy list | grep p_id:1'. To get 5 lines of output, -A switch with value 5 should be used.
FGT # diagnose wad worker policy list | grep p_id:1 -A 5
The number of hits for this proxy-policy from CLI is 219 (n_hits: 219). The same thing can be seen via the GUI:
This is useful if scripts are configured to get the correct number of hits and other session information data.
Related document: |

