Bird
Raised Fist0

Given this watch trigger condition snippet, what will cause the alert to fire?

medium📝 Predict Output Q4 of Q15
Elasticsearch - ELK Stack Integration
Given this watch trigger condition snippet, what will cause the alert to fire?
{"condition": {"script": {"source": "ctx.payload.hits.total.value > 10"}}}
AWhen the total hits in the search result are greater than 10
BWhen the total hits are exactly 10
CWhen the total hits are less than 10
DWhen the total hits equal zero
Step-by-Step Solution
Solution:
  1. Step 1: Understand the script condition

    The script checks if 'ctx.payload.hits.total.value' is greater than 10.
  2. Step 2: Interpret the condition logic

    The alert fires only if the total hits exceed 10, not equal or less.
  3. Final Answer:

    When the total hits in the search result are greater than 10 -> Option A
  4. Quick Check:

    Condition > 10 means alert fires if hits > 10 [OK]
Quick Trick: Script condition '> 10' means alert fires only above 10 hits [OK]
Common Mistakes:
MISTAKES
  • Thinking alert fires at exactly 10
  • Confusing greater than with less than
  • Ignoring the script logic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes