you should have them configured by yourself. Depending on how you configured Icinga 2, either they are static config files in /etc/icinga2 or within the Director. If you didn’t touch anything, the example config lies underneath /etc/icinga2/conf.d.
You’ll want to adjust this in your notification object with the states value. Here’s a glimpe at one of mine:
apply Notification "pagerduty-service" to Service {
command = "notify-service-by-pagerduty"
states = [ Critical, Unknown ]
types = [ Problem, Acknowledgement, Recovery ]
users = [ "yourpagerdutyuserhere" ]
In this case, I don’t have it paging me for warnings, just critical and unknown. You can adjust that for whatever notification objects you have as needed.
Change your notification script to send to pager when state is critical. That is what i have done. You only need to send all needed variables to your script.
I, personally, would not want to modify PagerDuty’s scripts. They’re pretty beastly and the states variable just keep Icinga from triggering on those in the first place.
What I suggested above works fine; I never get paged for Warning. For email alerts, you would take a similar approach. You can check the default template to get an idea.