Save data before and after alert to special RP

Hi everyone!
My team and I searching for ways to store 15minutes of data before and after alert had been triggered in “forever” retention policy?
Unfortunately way to use TICK script with InfluxDBOutNode helps only with data “after” alert.

Is there any best practices to take raw and not aggregated data “around” alert?
Thanks!