Multi type of messages from once log source to logstash

I have a device have multiple type of logs (difference failed for each type) => i want to count number of failed??? for filter of logs, Please help me!

What does your input look like, and what have you tried so far?