This output plugin will send notifications based on preconfigured services and escalation policies. The only required parameter for this plugin is the service_key to specify the Service API Key.
Let's look at a simple example with basic pagerduty configuration. In the following configuration, Elasticsearch is queried against the ngnixlogs index for all documents matching statuscode:404, and pagerduty events are raised for each document returned by Elasticsearch:
#kafka.conf
input {
elasticsearch {
hosts => "localhost:9200"
index => "ngnixlogs"
query => '{ "query": { "match": { "statuscode": 404} }}'
}
}
output {
pagerduty {
service_key => "service_api_key"
details => {
"timestamp" => "%{[@timestamp]}"
"message" => "Problem found: %{[message]}"
}
event_type => "trigger"
}
}