LogQL: show only JSON logs with HTTP status 500 or above for the checkout service?
IntermediateProductionRapid-Fire PromQL & LogQL
Answer
{namespace="prod", app="checkout"} | json | __error__="" | status >= 500
json extracts fields as labels at query time, __error__="" drops lines that failed to parse, and the numeric comparison filters on the extracted status.
More on Rapid-Fire PromQL & LogQL
Requests per second per service over the last 5 minutes?BeginnerPercentage of 5xx responses per service?Beginnerp99 latency per route from a histogram?IntermediateTop 5 pods by CPU usage in a namespace?BeginnerMemory working set as a percentage of the container limit?IntermediateWhich scrape targets are down right now?Beginner