Description
openedon Mar 27, 2023
As part of the road to versioned HTTP APIs, we need to have strict input validation on our HTTP APIs. The alerting rule APIs rely on the rule type's validate.params
to validate the rule parameters at create or update time. This validation is currently optional in the TypeScript definition, allowing arbitrary parameters to be defined. While we transition to make this validation required for all rule types, it would be great to add a something for the Stack Monitoring rule types (see https://github.com/elastic/kibana/blob/main/x-pack/plugins/monitoring/server/alerts/base_rule.ts#L83-L106).
Docs on the parameter: https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting#rule-types. Basically setting validate.params
to a config-schema
object.
- monitoring_alert_cluster_health
- monitoring_alert_license_expiration
- monitoring_alert_cpu_usage
- monitoring_alert_missing_monitoring_data
- monitoring_alert_disk_usage
- monitoring_alert_thread_pool_search_rejections
- monitoring_alert_thread_pool_write_rejections
- monitoring_alert_jvm_memory_usage
- monitoring_alert_nodes_changed
- monitoring_alert_logstash_version_mismatch
- monitoring_alert_kibana_version_mismatch
- monitoring_alert_elasticsearch_version_mismatch
- monitoring_ccr_read_exceptions
- monitoring_shard_size