I want to optimize the watcher scripts created. I created almost 21 scripts with different message patterns.
My aim is to reduce the number of scripts.
I want to change the must match pattern with OR condition.
"must": [
{
"match_phrase": {
"app.name": "mlm?-*"
}
},
{
"match_phrase": {
"level": "warn"
}
}
],
"must_not": [
{
"match_phrase": {
"logger_name": "org.hibernate.orm.deprecation"
}
},
{
However, i could observe that Must operates with AND logic. If i enter many must conditions , script checks for all conditions. My aim is to use OR logic.
Example - must "Account locked" or must "database connection lost" . Action (email) should be triggered if logs has any one of the message.
I tried the Should clause in the script. However, the script is only searching for one term. When logs has both Account locked and Database connection lost. The alert is not showing the result with 2 details
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.