Bird
Raised Fist0

Identify the error in this pipeline configuration snippet:

medium📝 Debug Q14 of Q15
Elasticsearch - ELK Stack Integration
Identify the error in this pipeline configuration snippet:
{
  "input": { "type": "file", "path": "/var/log/app.log" },
  "filter": { "grok": { "match": { "message": "%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level}" } } },
  "output": { "elasticsearch": { "index": "app-logs" }
}
AInput type 'file' is invalid
BIncorrect grok pattern syntax
COutput index name cannot contain hyphens
DMissing closing brace for the output section
Step-by-Step Solution
Solution:
  1. Step 1: Check JSON structure

    The output section is missing a closing brace '}' at the end, causing invalid JSON.
  2. Step 2: Validate other parts

    The grok pattern syntax is correct, input type 'file' is valid, and index names can have hyphens.
  3. Final Answer:

    Missing closing brace for the output section -> Option D
  4. Quick Check:

    JSON braces must be balanced [OK]
Quick Trick: Check all braces and commas in JSON config [OK]
Common Mistakes:
MISTAKES
  • Ignoring missing braces causing syntax errors
  • Assuming grok pattern is wrong without checking
  • Thinking index names can't have hyphens

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes