How to add PagerDuty notification to TokenDNS?


What is PagerDuty?

PagerDuty is present in most companies who have on call duty. Most are using it in combination with several monitoring systems. Its easy to handle schedules and organise responsibilities.

What do I need to use PagerDuty with TokenDNS?

For obvious reason you need to have an account for PagerDuty. In PagerDuty you can create so called Services and for each service you can create a Integrations. Each integration has a service key and this is what we need.

Now login to PagerDuty and select the Service that should receive notifications from us:
Configuration -> Services -> Select or Create a Service
If you already have a service, go to Integrations and add a new integration:


Please select “Use our API directly” and set a proper name. After hitting the green button you will redirect to the previous page and you can see your Integration Key. This key is our token.
We have everything what we need and can enable notification in TokenDNS. Go to your settings and add PagerDuty to your notifications.


I want to use the API!

I hear you and like it. Easy as you know it:

curl --get "" \
  -d apikey=${apikey} \
  -d action=add
  -d provider=pagerduty
  -d description=${service_description}
  -d token=${token_id}

One thought on “How to add PagerDuty notification to TokenDNS?”

Leave a Reply

Your email address will not be published. Required fields are marked *