Want to categorize processes and group all the servers running that process together using ELK?

Say if I have an app called X and it is running on 4 servers, I want to group the 4 servers together.

Group them where?