PagerDuty Connector

Last updated:

This app alerts PagerDuty when a PostHog insights/trends graph goes below or above a threshold.

Example use cases:

  • Alert when there is no $pageviews captured on my site the past hour,
  • Alert when the rate of $billing_error events crosses a threshold.

Requirements

The PagerDuty Connector app requires either PostHog Cloud, or a self-hosted PostHog instance running version 1.26.0 or later.

Not running 1.26.0? Find out how to update your self-hosted PostHog deployment!

You'll also need access to a PagerDuty account.

Installation

This app requires PostHog 1.26.0 or above, or PostHog Cloud.

  1. Log in to your PostHog instance
  2. Click 'Apps' on the left-hand tool bar
  3. Search for 'PagerDuty'
  4. Select the app, press 'Install' and follow the on-screen instructions

Configuration

  • Get the trends URL.
  • Go to Insights.
  • Construct the Trends query you want to alert on. It must be a single-line trend graph.
  • Copy the URL.
  • Choose threshold and operator (less than or equal, greater than or equal).
  • Enter PagerDuty service integration key (for Events API v2).

Additonial configuration

OptionDescription
PostHog Trend URL
Type: string
Required: True
Go to insights -> trends and construct your graph, copy the URL here
Threshold
Type: string
Required: True
Comparison operation
Type: choice
Required: True
If ≤ plugin alerts if $last_2_datapoints ≤ $threshold, otherwise if $last_2_datapoints ≥ $threshold
PostHog API Key
Type: string
Required: True
Your Personal API Key is not the same as the Project API key
PostHog Project ID
Type: string
Required: True
The ID of the current project, which can be found in Project settings
PagerDuty integration key
Type: string
Required: True
Integration Key for an integration on a service or on a global ruleset (Events API v2)
PagerDuty Incident Summary
Type: string
Required: True
PagerDuty incident source
Type: string
Required: True
Used in incident report as source

Limitations

This PagerDuty Connector only works when reading from single-line trend graphs.

It also requires PostHog 1.26.0 or above, or PostHog Cloud.

FAQ

Is the source code for this app available?

PostHog is open-source and so are all apps on the platform. The source code for the PagerDuty connector is available on GitHub.

Who created this app?

We'd like to thank PostHog team members Yakko Majuri and Michael Matloka and Karl-Aksel Puulmann for creating the Currency Normalizer. Thank you, all!

Who maintains this app?

This app is maintained by PostHog. If you have issues with the app not functioning as intended, please let us know!

What if I have feedback on this app?

We love feature requests and feedback! Please tell us what you think! to tell us what you think.

Or, if you see the feedback widget enabled, use that!

What if my question isn't answered above?

We love answering questions. Ask us anything via our community forum, or drop us a message.

Questions?

Was this page useful?

Next article

PostgreSQL Export

The PostgreSQL Export app enables you to export events from PostHog to a PostgreSQL instance on ingestion. Requirements Using the PostgreSQL Export app requires either PostHog Cloud, or a self-hosted PostHog instance running version 1.30.0 or later. Not running 1.30.0? Find out how to update your self-hosted PostHog deployment ! You'll also need access to the PostgreSQL instance you want to export to. Installation Firstly, make sure that PostHog can access your PostgreSQL instance. Wherever…

Read next article