The reason your subject line is empty is that context.alerts is an array and you have to iterate through it, by doing something like: {{#context.alerts}}{{data_stream.namespace}}{{/context.alerts}}.
That said, I'm guessing you don't want all the namespaces in your subject line as it would the nbe very long, so perhaps try this: {{context.alerts.0.data_stream.namespace}}. This would give you the namespace in the first alert document contained in context.alerts.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.