GRAYLOG - Chapter 3, Exercise 2 Solution ========================================================== Warning-or-Worse for ws-lite, Using Explicit OR-Grouping PROBLEM ------- Write a query, using this chapter's own real syntax, that matches every message at warning level or more severe (levels 2, 3, and 4) for the ws-lite service - using the explicit OR-grouping form, not a range comparison. SOLUTION -------- This chapter's own OR-grouping syntax for level is level:(X OR Y OR ...). The three levels requested - 2 (Critical), 3 (Error), and 4 (Warning) - combine as: level:(2 OR 3 OR 4) Scoping to the ws-lite service as well, using AND (per Chapter 1's own syntax): service:ws-lite AND level:(2 OR 3 OR 4) ANSWER: service:ws-lite AND level:(2 OR 3 OR 4) ---- WHY THIS WORKS AS AN ANSWER This is a direct extension of this chapter's own real level:(2 OR 3) example to a third value, combined with Chapter 2's own service field. The explicit OR-grouping form was specifically requested instead of a range comparison (level:<=4) because, as this chapter's own warn-box demonstrated, range comparisons on level are genuinely easy to get subtly wrong at the edges - listing every wanted value explicitly removes any ambiguity about which levels are actually included.