How to grow frequency of alerts in Prometheus?

How to send an alert if the device does not work for more than 3 minutes in a row, and not when there is a short-term loss of signal?
Because there is a lot of spam going through Alertmanager / Opsgenie (