I have a watcher that tracks an abnormally high number of requests from IP. I want it to block these IPs, which create a high number of requests.
but there is one problem:
how to substitute the found IP address in the required section in the "path" field to send the correct curl to my system? data can be substituted only in the body field, but this field cannot be used as part of the path for curl (or am I mistaken?).
how can I implement such a send curl with the necessary IP from the data received by the watcher?
Just 1 IP, that task should be straightforward: just add the (mustache template) variable which contains it within your payload.
A list of results and your ipban web service can handle multiple IPs passed in the url: you might build the variable section of your path using the mustache template options to iterate a list.
There is a good example of 1 and 2 in this response:
You can see the exact contents of your search using the simulation tab of your watch.
If you need more complex processing, you can also include a transform section with a script to make the modifications and replace the payload or add a field with the desired value.
Then you can use the resulting field like the previous points 1 or 2.