Watcher unable to send number of hits in email

Hello,

We have a watcher which is sending a CSV attachment with the number of hosts matching the condition. However, we also want it writes in the body the total number of hits/hosts in the CSV found.

For eg: if in the CSV it found 50 hosts then it should send in body 50 hosts found.

We tried using {{ctx.payload.hits.total}}, but this is not giving the correct data or number of data in the CSV. It is giving a very high number.

Please let us know how can we achieve this.

can you share the search request as well as response of your search query. It is possible, that there are so many hits, but you are only returning the first 50.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.