Datadog Fundamentals free question 7 / 10 · Domain 4: Data Collection
How can you keep a count of the error status codes that appear in your logs?
- Paste the counts into a dashboard note each day
- Keep storing the raw log lines and count them by hand
- Generate a new metric from them in the platform
- Write the counts into the text of a monitor notification
Show the answer and explanation
Answer: C
Why this is correct
The Metrics page says: "You can generate metrics directly within the Datadog platform. For instance, you can count error status codes appearing in your logs and store that as a new metric in Datadog."
Why the other options are wrong
"Keep storing the raw log lines and count them by hand" … Keeping raw logs does not give you a metric. The point is to turn the count into a metric stored in Datadog.
"Paste the counts into a dashboard note each day" … A note on a dashboard is not a stored metric and cannot be queried or alerted on.
"Write the counts into the text of a monitor notification" … A notification message is not a place to keep data. A metric can be graphed and monitored, unlike a text note.
Key point
Metrics reach Datadog from four places: integrations, metrics generated inside the platform, custom metrics, and the standard metrics the Agent sends.
Go to the Datadog Fundamentals practice app (10 free questions; purchase unlocks all questions)