Hi,
It's easy for operations manager to monitor a specific Event ID, however, it's complex to achieve the logic mentioned above. Since we plan to use script, it is suggested to put the logic in the script and the output is different Event ID (for P2 and P3). After that, we can create a rule/monitor based on the specific Event ID.
Creating event based alerting rules in SCOM 2012
https://mytechguideblog.wordpress.com/2016/11/29/creating-event-based-alerting-rules-in-scom-2012/
Note: this is not from MS, just for your reference.
Hope the above information helps.
Alex Zhu
If the response is helpful, please click "Accept Answer" and upvote it.