While the alert configuration of the wizard has not been set, there is a bug in the creation of a rule which leads to a stack trace.
Scenario:
start with an empty graylog (the configuration of the wizard should not have been changed from the default)
create a rule with title "aaa"
create a second rule with title "aaa"
=> it leads to a java.lang.NullPointerException in the server, when it should just refuse to create a rule with the same name
The problem is in the AlertRuleRessource.
This is because the configuration is not present in database until it is updated once. So to correctly retrieve the configuration, one should do a getOrDefault rather than a get.
While the alert configuration of the wizard has not been set, there is a bug in the creation of a rule which leads to a stack trace. Scenario:
The problem is in the AlertRuleRessource. This is because the configuration is not present in database until it is updated once. So to correctly retrieve the configuration, one should do a getOrDefault rather than a get.