Parameters

You can use parameters in webhook and email actions to include specific information about an event. You can also use parameters to filter subscription events.

Some parameters can be used for any event type. Other parameters can only be used for specific event types.

Using Parameters in Actions

When using parameters in webhook and email actions, enclose them in double curly brackets, as follows:

{{<parameter name>>}}

Using Parameters to Filter Events

When using parameters to filter subscription events, you can use them with functions in the StreamSets expression language or by themselves. For example:
${str:contains(FROM_STATUS, "INACTIVE")}
${PIPELINE_NAME=='test'}

You do not need to enclose the parameter names in double curly brackets.

For more information on using parameters with subscription events, see filtering event types.

General Event Parameters

You can use the following general parameters for any event type:
  • ORGANIZATION - The organization name that the triggered subscription belongs to.
  • SUBCRIPTION_ID - The subscription ID.
  • SUBSCRIPTION_NAME - The subscription name.
  • TRIGGERED_COUNT - The number of times the subscription has been triggered.
  • TRIGGERED_ON - The time that the subscription was triggered.
For example, if you configure a subscription to send a webhook when a job status changes, you might use the following message in the JSON request payload:
{  
   "text":"A job status change occurred on {{TRIGGERED_ON}}."
}

Job Status Change Parameters

You can use the following parameters for a job status change event:
  • JOB_ID - The job ID.
  • JOB_NAME - The job name.
  • FROM_STATUS - The status that the job changed from.
  • TO_STATUS - The status that the job changed to.
For example, if you configure a subscription to send a webhook when a job status changes, you might use the following multi-line message in the JSON request payload:
{  
   "text":"The job {{JOB_NAME}} changed status. \nFrom {{FROM_STATUS}} to {{TO_STATUS}}."
}
Or, you can filter job status change events when they change to a status of inactive:
${str:contains(TO_STATUS, "INACTIVE")}

Pipeline Committed Parameters

You can use the following parameters for a pipeline committed event:
  • PIPELINE_ID - The pipeline ID.
  • PIPELINE_NAME - The pipeline name.
  • PIPELINE_VERSION - The pipeline version.
  • PIPELINE_COMMITTER - The name of the user who committed the pipeline.
  • PIPELINE_COMMIT_MESSAGE - The commit message.
  • PIPELINE_COMMIT_TIME - The day and time the pipeline was committed.
For example, if you configure a subscription to send a webhook each time a pipeline is committed, you might use the following message in the JSON request payload:
{  
   "text":"{{PIPELINE_NAME}} was committed on {{PIPELINE_COMMIT_TIME}}."
}
Or, you can filter pipeline committed events to only include pipelines with a specific commit message:
${str:contains(PIPELINE_COMMIT_MESSAGE,"First commit")}

Pipeline Status Change Parameters

You can use the following parameters for a pipeline status change event:

  • PIPELINE_ID - The pipeline ID.
  • PIPELINE_NAME - The pipeline name.
  • PIPELINE_COMMIT_ID - The commit ID for the pipeline version.
  • PIPELINE_COMMIT_VERSION - The pipeline commit version.
  • JOB_ID - The ID of the job that includes the pipeline.
  • JOB_NAME - The name of the job that includes the pipeline.
  • SDC_ID - The ID of the Data Collector or Data Collector Edge that is running the pipeline.
  • FROM_STATUS - The status that the pipeline changed from.
  • TO_STATUS - The status that the pipeline changed to.
For example, if you configure a subscription to send a webhook when a pipeline status changes, you might use the following multi-line message in the JSON request payload:
{  
   "text":"The pipeline {{PIPELINE_NAME}} running on Data Collector {{SDC_ID}} changed status. \nFrom {{FROM_STATUS}} to {{TO_STATUS}}."
}
Or, you can filter pipeline status change events when they change to a status of RUN_ERROR:
${str:contains(TO_STATUS, "RUN_ERROR")}

Report Generated Parameters

You can use the following parameters for a report generated event:
  • REPORT_DEFINITION_ID - The report definition ID.
  • REPORT_ID - The generated report ID.
  • REPORT_NAME - The name of the report.
  • REPORT_URL - The URL to the generated report.
For example, if you configure a subscription to send an email each time a report is generated, you might use the following message in the email body:
The {{REPORT_DEFINITION_ID}} report definition generated the {{REPORT_NAME}} report.
Or, you can filter report generated events to only include reports named tutorial:
${REPORT_NAME=='tutorial')}

Data SLA Triggered Parameters

You can use the following parameters for a triggered data SLA:
  • SLA_ID - The data SLA ID.
  • SLA_LABEL - The data SLA label.
  • ALERT_TEXT - The text configured for the data SLA alert.
  • ALERT_VALUE - The threshold value that triggered the data SLA alert.
For example, if you configure a subscription to send a webhook each time a data SLA alert triggers, you might use the following message in the JSON request payload:
{  
   "text":"{{ALERT_TEXT}}: Alert {{SLA_LABEL}} was triggered by {{ALERT_VALUE}}."
}
Or, you can filter triggered data SLA events to a specific ID:
${SLA_ID=='5723e6'}

Data Collector or Data Collector Edge Not Responding Parameters

You can use the following parameters for a Data Collector or Data Collector Edge (SDC Edge) that stops responding:
  • SDC_ID - The Data Collector or SDC Edge ID.
  • HTTP_URL - The Data Collector or SDC Edge URL.
  • LAST_REPORTED_TIME - The epoch or Unix time in milliseconds that the Data Collector or SDC Edge last sent a heartbeat to Control Hub.
For example, if you configure a subscription to send an email each time a Data Collector stops responding, you might use the following message in the email body:
The Data Collector with ID {{SDC_ID}} and URL {{HTTP_URL}} has stopped responding since {{LAST_REPORTED_TIME}}.
Or, you can filter an event to only include Data Collectors or Edge Data Collectors that have stopped responding since a specified epoch or Unix time:
${LAST_REPORTED_TIME>1539734400}