cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to consume Appmon REST API for alert suppression

wkhurana
Newcomer

Hi Team,

I am taking reference from " https://www.dynatrace.com/support/doc/appmon/appmo... " URI and trying to suppress the incidents during business hours.

1. Created business hours definition where System profile was Test1 an Business hour name was test

{
"inclusions": [
{
"timespan": {
"start": "07:00",
"end": "16:00"
},
"weekdays": [
"MON","TUE","WED","THU","FRI"
]
}
]
}

02. validated the business hour creation after consuming Get /profiles/{profileid}/businesshours API, I was able to validated that out

Response Body:

{
"businesshours": [
{
"id": "7_to_16",
"href": "https://dtrace-2:8021/api/v2/profiles/Test1/businesshours/7_to_16"
},
{
"id": "test",
"href": "https://dtrace-2:8021/api/v2/profiles/Test1/businesshours/test"
}
]
}

03. Create alert suppression -> is throwing 404 error in the response body

{
"systemprofiles": [
{
"systemprofile": "Test1"
}
],
"businesshours": "test"
}

Response Body:

{
"code": 404,
"message": "Business hours reference 'test' could not be found."
}

Please find the attached screenshots for the same, Need your immediate help on this.

Thanks in advance

Regards,

Winkle khurana

business-hour-validation.png

alert-suppression-response.png

9 REPLIES 9

arihant_polavar
Dynatrace Pro
Dynatrace Pro

Hello Winkle,

Trying using "businesshours" : "7_to_16" (instead of "businesshours" : "test") and see if that makes a difference.

wkhurana
Newcomer

Hi Ari,

I have tried the same, still the same issue.

arihant_polavar
Dynatrace Pro
Dynatrace Pro

In your screenshot, the businesshours in your body says 'test' but the endpoint says '7_to_16_suppress'

Make both of them consistent and see what happens. Additionally, why are you adding "_suppress" at the end? You don't have that in the validation response of the business hours.

wkhurana
Newcomer

Ari,

7_to_16_suppress is the incident downtime name for the test1 System Profile, based on the test business hours (Tried using 7_to_16 business hour still the same response)

I actually tried replicating the whole scenario and am facing the same issue. So I'm not really sure what the issue here is. Do you have the ability to open up a support ticket? I would recommend doing that if you can't more help here.

Thanks Ari,

Waiting for someone to answer that. Still if the issue exists will open support case.

Thanks a lot for your time and support

wkhurana
Newcomer

Hi Ari,

I have raised this concern with the Support team, they are also facing the same issue and will report this to R&D team to check however they have suggested to use the below workaroung to configure Appmon downtime using below URL


https://www.dynatrace.com/support/doc/appmon/application-monitoring/incidents-and-alerting/incidents...

Thing is no such attribute found in order to suppress the downtime based on business hours, Any Idea.

Thanks for the update. Any chance you can link the support case here too?

No, However will share the feedback from the support.