Open gmfmi opened 3 years ago
I take a look at the source code, here is a quick solution that should to the trick.
In the file /alerting/src/main/kotlin/com/amazon/opendistroforelasticsearch/alerting/settings/AlertingSettings.kt
Replace:
const val MONITOR_MAX_TRIGGERS = 10
By:
val MONITOR_MAX_TRIGGERS = Setting.intSetting(
"opendistro.alerting.monitor.max_triggers",
10,
Setting.Property.NodeScope, Setting.Property.Dynamic
)
Describe the bug The number of Triggers allowed by monitors should not be hardcoded.
When adding a Monitor that contains more than 10 Triggers, this error is returned :
I did not found any good reason to hardcode this value to "10". As an example, the total number of Monitor default value is set to 1000 but can be dynamically redefined.
Other plugins installed (not useful)
To Reproduce Steps to reproduce the behavior:
Expected behavior Have a dedicated setting in the alerts section. As an example, it could look like:
opendistro.alerting.monitor.max_triggers
(to be consistant with the existingopendistro.alerting.monitor.max_monitors
). See https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/settings/#alerting-settings.Desktop:
Additional context I run the OpenDistro stack using Docker with image v1.13.2.