You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -137,7 +137,13 @@ The Remediation Component does the following:
137
137
1. Create a Cloudflare Worker and a Worker KV per configured account.
138
138
2. Create a Worker Route(s) per configured zone. Any request matching the route would be handled by the worker.
139
139
3. For every matching incoming request, the worker checks whether it's IP, Country and AS have a decision against. It checks for this in it's KV store. If found it performs the corresponding remediation.
140
-
4. The Remediation Component also periodically updates the KV store with the latest decisions from CrowdSec.
140
+
4. The Remediation Component also periodically updates the KV store with the latest decisions from CrowdSec.
141
+
142
+
If your Cloudflare token has permission on D1, the remediation component will also automatically create a database to track:
143
+
- Number of requests processed
144
+
- Number of requests blocked
145
+
146
+
Those metrics are exposed through the prometheus endpoint and automatically sent to crowdsec for visualisation with `cscli`.
141
147
142
148
## Configuration
143
149
@@ -193,7 +199,7 @@ For obtaining the `token`:
193
199
194
200
1. Sign in as a user who has access to the desired account.
195
201
196
-
Then click [this link](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22user_details%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22workers_kv_storage%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_routes%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%20%22dns%22%2C%20%22type%22%3A%22read%22%7D%5D&name=) and create the token.
202
+
Then click [this link](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22user_details%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22workers_kv_storage%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_routes%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%20%22dns%22%2C%20%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%22d1%22%2C%20%22type%22%3A%22edit%22%7D%5D&name=) and create the token.
197
203
198
204
Alternatively, you can go to [Tokens](https://dash.cloudflare.com/profile/api-tokens) and create the token.
199
205
@@ -205,6 +211,7 @@ The Remediation Component requires the following permissions to function:
0 commit comments