17 Feb 2025
05:09 AM
- last edited on
17 Feb 2025
09:58 AM
by
MaciejNeumann
Hi Community,
Done an integration with PagerDuty and we need a update comment section in an open problem for which an alert/incident got created in PagerDuty. Our requirement is to update the comment in Dynatrace problem record once someone acknowledge or update the status in PagerDuty.
Solved! Go to Solution.
25 Apr 2025 05:33 PM
Does pager duty have the ability to call out to the Dynatrace API? If so, you can script the system to take the problem card ID, Post in the desired comment via the Dynatrace API with a valid token to post the data into the problem card.
25 Apr 2025 07:55 PM
Adding to Chad's comment above, the specific documentation for posting a comment via API can be found here.
19 May 2025 04:07 PM
Within Workflows, you can always use a Run JavaScript action with the Classic Environment V2 SDK's createComment method.
import { execution } from '@dynatrace-sdk/automation-utils';
import { problemsClient } from '@dynatrace-sdk/client-classic-environment-v2';
export default async function ({ executionId }) {
// get the current execution
const ex = await execution(executionId);
// get event data
const eventData = await ex.event();
// comment on problem
return await problemsClient.createComment({
problemId: eventData['event.id'],
body: { message: 'Looking into it...' }
});
}