Type to search.

Simple input

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Use the simple input to load static data into the execution context when the watch is triggered. This enables you to store the data centrally and reference it with templates.

You can define the static data as a string (str), numeric value (num), or an object (obj):

JavaScript
"input" : {
  "simple" : {
    "str" : "val1",
    "num" : 23,
    "obj" : {
      "str" : "val2"
    }
  }
}

For example, the following watch uses the simple input to set the recipient name for a daily reminder email:

JavaScript
{
  "trigger" : {
    "schedule" : {
      "daily" : { "at" : "noon" }
    }
  },
  "input" : {
    "simple" : {
      "name" : "John"
    }
  },
  "actions" : {
    "reminder_email" : {
      "email" : {
        "to" : "to@host.domain",
        "subject" : "Reminder",
        "body" : "Dear {{ctx.payload.name}}, by the time you read these lines, I'll be gone"
      }
    }
  }
}