Can I see how many times an action has been triggered (hit counter, Action Hits)?
Short answer
Yes. The Hit Counter switch is turned on in the form of the action (off by default); counting is done with the action's own condition, each time the action runs. The counts are monitored as a chart and a summary table in the Action Hits tab of the vService dashboard, as a per-second value in the Action Hits section of the Live Stats screen, and as the total of all the vServices the action is bound to in the Action Hits panel of the vServices section on the home page. Hit counter is present only in the countable action types.
Problem: It Is Not Known Whether the Action Actually Works
How often the condition of an action is met, how many requests a blocking rule stops, or whether a redirect is used needs to be seen. This information is used both in troubleshooting and in measuring the effect of the rule.
Solution: Three Methods
In every case, counting is turned on with the Hit Counter switch of the action (Method 1, Steps 1–4). Once it is turned on, the same counts are monitored from three screens; the screens are not alternatives to each other but complementary.
| Your situation | Suitable method |
|---|---|
| I want to see the count over time and the total of the actions on a vService | Method 1: vService Dashboard → Action Hits |
| I want to monitor the instant, per-second value | Method 2: Live Stats → Action Hits |
| I want to see the total of an action across all vServices | Method 3: Home page → Action Hits |
Action types with a hit counter: Show content, Add HTTP Header, Delete HTTP Header, Set HTTP Header, Replace HTTP Header Content, Create Traffic Variable, Conditional Silent Log, CORS, Ip Log Masking, Block, Location redirection, User Authentication (On HTTP request), Set path, Set Path + Query, URL normalization, Redirect to HTTPS, Quarantine. In the other types (e.g. Traffic mirroring, Advanced CAPTCHA, Bandwidth limitation, error page actions), the switch does not appear.
Method 1: vService Dashboard → Action Hits Recommended
- How it works For each action with Hit counter on, the triggering rate over time is shown in a stacked line chart, and the total in a summary table sorted in descending order; the series name is the name of the action.
- Where it is opened Left Monitor Panel → Load Balancer vServices → vService → Dashboard → Action Hits
- Requirement Hit counter on in at least one action bound to the vService
- vService type HTTP · L7 TCP
Step-by-Step Configuration
On the Load Balancer → Actions screen, the action is selected and the Edit button is clicked; the form opens on the Edit Action tab (Edit). If a new action is being created, the add form is opened with Add.
The Hit Counter switch is turned on (off by default). If the switch is not in the form, the selected action type is not one of the countable types.
The Edit button at the bottom of the form is clicked (Add for a new action).
In the Left Monitor Panel, the Load Balancer vServices tab is selected and the vService is clicked; the screen opens with the Dashboard tab.
The Action Hits tab is clicked. The tab appears if Hit counter is on in at least one of the actions bound to the vService.
Verification
A request that matches the condition of the action is sent, and the series in the Action Hits tab is monitored.
A series with the action name; the total in the summary table increasesMethod 2: Live Stats → Action Hits
- How it works There is a card for each action that shows the number of triggers per second; the card appears when the action runs for the first time.
- Where it is opened Left Monitor Panel → Load Balancer vServices → vService → Live Stats → Action Hits
- Requirement Hit counter on in at least one action bound to the vService (Method 1, Steps 1–4)
- vService type HTTP · L7 TCP; this section is not present on the Network vService
Step-by-Step Configuration
On the vService screen, the Live Stats tab is clicked.
In the Action Hits section, the card of each action is listed with the name of the action and the number of triggers per second.
Verification
Requests that match the condition of the action are sent.
A card with the action name, /s value > 0Method 3: Home Page → Action Hits Panel
- How it works A series is shown for each action with Hit counter on; the value is the total of the counts on all the vServices the action is bound to.
- Where it is opened Home page → vServices → Traffic → Action Hits
- Requirement Hit counter on in at least one of the actions on the device (Method 1, Steps 1–4)
- vService type HTTP · L7 TCP
Step-by-Step Configuration
In the vServices section of the home page, the Traffic subtab is selected.
In the Action Hits panel, the series are shown stacked; as a summary, Total comes open.
Verification
A request that matches the condition is sent to one of the vServices the action is bound to.
The series of the action increasesCommon Mistakes
- Looking for the counter in the Actions list. The counts appear on the vService dashboard, on the Live Stats screen and on the home page.
- Turning on Hit counter without binding the action to the vService. Counting is done only on the vServices the action is bound to, when the action runs.
- Not expecting counting on terminating actions. Counting is also done on actions that end the request, such as Block or Location redirection.
- Taking the User authentication count for the total number of requests. In the User Authentication (On HTTP request) action, only the requests for which authentication is requested are counted; requests that come with the correct credentials are not counted.
How it is done in the documentation
