# How to use PagerDuty plugin to insert data into pagerduty payload

**URL:** <https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524>\
**Category:** Logstash\
**Created:** [February 2, 2023, 10:20am UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524 "2023-02-02T10:20:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YasuhiroOkumura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yasuhirookumura/32/116682_2.png) [@YasuhiroOkumura](https://discuss.elastic.co/u/YasuhiroOkumura)\
**Post date:** [February 2, 2023, 10:20am UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524/1 "2023-02-02T10:20:48Z")

</div>

I am trying to send data to PageDuty side using PagerDuty plugin in Logstash output plugin.  
I want to insert data into the "payload" field of PagerDuty, but when I use the PagerDuty plugin, the data goes into the "details" field.  
Is there any way to insert data into "payload"?  
(logstash outputplugins 8.6)

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [February 2, 2023, 12:47pm UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524/2 "2023-02-02T12:47:44Z")

</div>

I haven't used PageDuty and don't have .conf which you are using.

Have you tried to use rename or copy:  
`mutate { copy => { "details" => "payload" } }`

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 2, 2023, 5:27pm UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524/3 "2023-02-02T17:27:03Z")

</div>

> [@YasuhiroOkumura](#):
>
> Is there any way to insert data into "payload"?

I don't think so. The [code](https://github.com/logstash-plugins/logstash-output-pagerduty/blob/3cc99767f423dd69bfabaf3d9d355b1dc7a88819/lib/logstash/outputs/pagerduty.rb#L58) has :details hardwired.

---

<div class="post-metadata">

**Author:** ![YasuhiroOkumura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yasuhirookumura/32/116682_2.png) [@YasuhiroOkumura](https://discuss.elastic.co/u/YasuhiroOkumura)\
**Post date:** [February 9, 2023, 5:15am UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524/4 "2023-02-09T05:15:48Z")

</div>

The pagerduty output plugin can transfer data assuming v1([https://developer.pagerduty.com/api-reference/f0037990796c8-send-an-event-to-pager-duty](https://developer.pagerduty.com/api-reference/f0037990796c8-send-an-event-to-pager-duty)),  
but how should I modify the output plugin to specify a value for Pager v2([https://developer.pagerduty.com/api-reference/368ae3d938c9e-send-an-event-to-pager-duty](https://developer.pagerduty.com/api-reference/368ae3d938c9e-send-an-event-to-pager-duty)) that has a payload part?

---

<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:** [March 9, 2023, 5:16am UTC](https://discuss.elastic.co/t/how-to-use-pagerduty-plugin-to-insert-data-into-pagerduty-payload/324524/5 "2023-03-09T05:16:24Z")

</div>

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