:plugin: pagerduty
:type: output

///////////////////////////////////////////
START - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////
:version: %VERSION%
:release_date: %RELEASE_DATE%
:changelog_url: %CHANGELOG_URL%
:include_path: ../../../../logstash/docs/include
///////////////////////////////////////////
END - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////

[id="plugins-{type}-{plugin}"]

=== Pagerduty output plugin

include::{include_path}/plugin_header.asciidoc[]

==== Description

The PagerDuty output will send notifications based on pre-configured services
and escalation policies. Logstash can send "trigger", "acknowledge" and "resolve"
event types. In addition, you may configure custom descriptions and event details.
The only required field is the PagerDuty "Service API Key", which can be found on
the service's web page on pagerduty.com. In the default case, the description and
event details will be populated by Logstash, using `message`, `timestamp` and `host` data.

[id="plugins-{type}s-{plugin}-options"]
==== Pagerduty Output Configuration Options

This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.

[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
| <<plugins-{type}s-{plugin}-description>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-details>> |<<hash,hash>>|No
| <<plugins-{type}s-{plugin}-event_type>> |<<string,string>>, one of `["trigger", "acknowledge", "resolve"]`|No
| <<plugins-{type}s-{plugin}-incident_key>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-pdurl>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-service_key>> |<<string,string>>|Yes
|=======================================================================

Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
output plugins.

&nbsp;

[id="plugins-{type}s-{plugin}-description"]
===== `description` 

  * Value type is <<string,string>>
  * Default value is `"Logstash event for %{host}"`

Custom description

[id="plugins-{type}s-{plugin}-details"]
===== `details` 

  * Value type is <<hash,hash>>
  * Default value is `{"timestamp"=>"%{@timestamp}", "message"=>"%{message}"}`

The event details. These might be data from the Logstash event fields you wish to include.
Tags are automatically included if detected so there is no need to explicitly add them here.

[id="plugins-{type}s-{plugin}-event_type"]
===== `event_type` 

  * Value can be any of: `trigger`, `acknowledge`, `resolve`
  * Default value is `"trigger"`

Event type

[id="plugins-{type}s-{plugin}-incident_key"]
===== `incident_key` 

  * Value type is <<string,string>>
  * Default value is `"logstash/%{host}/%{type}"`

The service key to use. You'll need to set this up in PagerDuty beforehand.

[id="plugins-{type}s-{plugin}-pdurl"]
===== `pdurl` 

  * Value type is <<string,string>>
  * Default value is `"https://events.pagerduty.com/generic/2010-04-15/create_event.json"`

PagerDuty API URL. You shouldn't need to change this, but is included to allow for flexibility
should PagerDuty iterate the API and Logstash hasn't been updated yet.

[id="plugins-{type}s-{plugin}-service_key"]
===== `service_key` 

  * This is a required setting.
  * Value type is <<string,string>>
  * There is no default value for this setting.

The PagerDuty Service API Key



[id="plugins-{type}s-{plugin}-common-options"]
include::{include_path}/{type}.asciidoc[]