Kapacitor Alert only trigger by x amount of duration

Back then yes. You will need to create a custome TICK script for that.

However i unable to share the solution because i no longer have access to the code.

This however it is smth similar.You can take a look.