# Logstash Fields not resolving (PagerDuty plugin)

**URL:** <https://discuss.elastic.co/t/logstash-fields-not-resolving-pagerduty-plugin/81046>\
**Category:** Logstash\
**Created:** [April 3, 2017, 7:01pm UTC](https://discuss.elastic.co/t/logstash-fields-not-resolving-pagerduty-plugin/81046 "2017-04-03T19:01:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony\_engi](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@anthony\_engi](https://discuss.elastic.co/u/anthony_engi)\
**Post date:** [April 3, 2017, 7:01pm UTC](https://discuss.elastic.co/t/logstash-fields-not-resolving-pagerduty-plugin/81046/1 "2017-04-03T19:01:29Z")

</div>

The pagerduty plugin is not working for me. It cannot resolve the fields, so I cannot make it programmatic and was wondering if anyone can assist me?

```
input {
  http_poller {
    urls => {
       pagerTest => "http://example.com"
    }
    automatic_retries => 0
    # Check the site every 10s
    schedule => { "every" => "10" }
    # Wait no longer than 8 seconds for the request to complete
    request_timeout => 8
    # Store metadata about the request in this field
    metadata_target => http_poller_metadata
    # Tag this request so that we can throttle it in a filter
    #tags => website_healthcheck
    codec => plain
  }
}

filter {
   # The poller doesn't set an '@host' field because it may or may not have meaning
   # In this case we can set it to the 'name' of the host which will be 'localhost'
   # The name is the key used in the poller's 'url' config
   if [http_poller_metadata] {
     mutate {
       rename => { "[http_poller_metadata][request][url]" => "component_url" }
     }
     if [http_poller_metadata][name] == "pagerTest" {
       mutate {
         add_field => {
           "component_name" => "PagerDuty - test"
           "integration_key" => "RANDOMKEY"
           "event_type" => "trigger"
         }
       }
    }
  }
}

output {
      stdout { codec => rubydebug }
      pagerduty {
        service_key => "%{integration_key}"
        incident_key => "logstash/MySQLTimeline/StatusPage"
        description => "Logstash is unable to connect to %{event_type} %{integration_key}"
        details => {
          "timestamp"=>"%{@timestamp}"
           "message"=>"Logstash test"
        }
        event_type => "%{event_type}"
      }
}

```

integration\_key and event\_type print properly in the description field, but it will not resolve the fields like this. The configuration works if I hard code them. integration\_key doesn't actually throw error as it just looks for %{integration\_key} (and doesn't find it), but event\_type fails it is not able to resolve to trigger

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 4, 2017, 5:12am UTC](https://discuss.elastic.co/t/logstash-fields-not-resolving-pagerduty-plugin/81046/2 "2017-04-04T05:12:09Z")

</div>

This is a long-standing known issue.

> <https://github.com/logstash-plugins/logstash-output-pagerduty/issues/2>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 2, 2017, 5:12am UTC](https://discuss.elastic.co/t/logstash-fields-not-resolving-pagerduty-plugin/81046/3 "2017-05-02T05:12:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
