Alert queries running more than 5 mins

Hi, I am looking for a way to setup an alert like if any user process/query runs over than 5 mins. Like it checks in every 1 min and if there is a query running for more than 5mins it fires an alert to email (would be better if alert message contain the username and query text). Actually I can achieve it using python script but I wonder if I can do it with PMM. Consider it is about individual queries not like global metric.