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.
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.
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...' }
});
}