What I do is to program the gps to send me that data, then I create a calculated attribute and generate the alarm.
I have achieved this using Teltonika, Queclink and Suntech equipment.
visit this link https://wiki.teltonika-gps.com/view/Template:FMM640_Excessive_Idling for teltonika.
you can start from there
How can I generate a notification, when a car is ignition: on more than 5 min without moving.?