How to get the ctx.payload.hits.hits after aggregation and transform (Watcher)

cannot get {{}} this field

    "subject": "{{}} WARNING:  Filebeat is down and unavilable [No. of Filebeat down: {{ctx.payload._value.size}}]",
    "body": {
      "html": "<br><br><ol><li>{{#ctx.payload._value}} <b>Filebeat is down and unavailable in last 15 min:</b>: {{.}} <hr></li> {{/ctx.payload._value}}</ol>"


a fully reproducible example might help a lot here or the output of the Execute Watch API.

I do have an assumption here, and maybe it is right:

A transform implies, that the data you are returning in your transform will be used as the payload. Everything else will be lost - so if you need access to the hits, you need to ensure to include your hits array in the transform as well.

Hope that helps!


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