While working on the openAPI specification details for the Elasticsearch query alerting rule in https://github.com/elastic/kibana/pull/162001, I noticed that there are some action variables that seem to be missing from the list in Kibana.
They're the ones that are shared with the index threshold rule type, for example aggField,aggType, groupBy, etc:
They don't appear for the Elasticsearch query rule type (no matter whether I pick the KQL/Lucence or Elasticsearch DSL option):
I tried a quick test of adding them to the message in my server log connector action and they seem to be valid. For example, adding {{rule.params.searchType}}{{rule.params.aggType}} yields a message like this:
[2023-07-17T12:01:23.619-07:00][INFO ][plugins.actions.server-log] Server log: Elasticsearch query rule 'es-query-dsl' is active:;;esQuery;count;...
Thus it seems they've valid, just missing from the drop-down list.
It might be as simple as updating the list of variables in the rule_type.ts file, similar to what was done in https://github.com/elastic/kibana/pull/161807 forx-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts.
Relates to https://github.com/elastic/kibana/issues/161126, https://github.com/elastic/kibana/issues/161710
While working on the openAPI specification details for the Elasticsearch query alerting rule in https://github.com/elastic/kibana/pull/162001, I noticed that there are some action variables that seem to be missing from the list in Kibana.
They're the ones that are shared with the index threshold rule type, for example
aggField
,aggType
,groupBy
, etc:They don't appear for the Elasticsearch query rule type (no matter whether I pick the KQL/Lucence or Elasticsearch DSL option):
I tried a quick test of adding them to the message in my server log connector action and they seem to be valid. For example, adding
{{rule.params.searchType}}{{rule.params.aggType}}
yields a message like this:Thus it seems they've valid, just missing from the drop-down list.
It might be as simple as updating the list of variables in the
rule_type.ts
file, similar to what was done in https://github.com/elastic/kibana/pull/161807 forx-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts
.