- I trigger an event from a custom tool and I have 4 linux servers where I need to monitor logs and grep for a particular event ID.
- The event ID could occur in any ONE of the 4 servers.
- I wrote a method that will make a ssh session checks for the grep pattern. Since there could be many servers added, I used a threading module to look concurrently in all the servers a specified time.
- If the match is found in one server, I want other threads to die. Is there a way I can inform to other threads to stop searching if the pattern is found in one? Is it safe?
I have many of these kind of functionality to be verified in many servers. So, I do not want to waste any time doing it in serially and want to save memory by stopping other threads.