Bar chart of 500 status by host

I'm trying to create a bar graph that counts hosts that have returned HTTP 500 in response to a request. The relevant record structure:
{ "host": <hostname>, "status": <HTTP response status> }

In SQL this would be "SELECT COUNT(*) FROM logs WHERE status=500 GROUP BY host". Not sure how to do this in Kibana. :slight_smile:

I got it figured out. What I did was to create a vertical bar visualization where the Y axis was "count" and the X axis was a "Terms" aggregation with "host" as the term. Then, in the search bar, I put "status: 500". This gave me the count I needed.