Skip to content

Commit

Permalink
Update 15-watch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TomonoriSoejima authored Nov 10, 2023
1 parent 0eea003 commit 6118517
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions watcher/15-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ PUT _watcher/watch/_execute
}
}
```




This script defines an Elasticsearch Watcher configuration that executes a scheduled task every 5 minutes. The task uses a static input of IP address data, including addresses, country codes, and abuse confidence scores. When triggered, the condition is always met ("always": {}), leading to the execution of the index_payload action. This action iterates over the array of IP data ("foreach": "ctx.payload.data") and indexes each item into my-index-000001. Since the doc_id is not specified, Elasticsearch will automatically generate a unique ID for each indexed document.

0 comments on commit 6118517

Please sign in to comment.