cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Controller (SaaS, On Premises)

Retrieving specific Health Rule Violations via the API

SOLVED
Danny.Mitrevski
Wanderer

Retrieving specific Health Rule Violations via the API

Hi All,

I've recently begun getting my head around the AppDynamics API and how it all works. As a small excercise I wanted to produce a list showing all the times a specific health rule has triggered a violation.

I was hoping this would get me the result I was after:

curl --user me@tenant:secret 'https://saasaddress/controller/rest/applications/applicationid/problems/healthruleviolations?time-range-type=BEFORE_NOW&duration-in-mins=mins&name=Health+Rule+Name'.

Unfortunately, this gives me all of the violations by all health rules, and not violations by name.

I supposed there are a few questions I should ask here:
Is this the right way to go about it / am I probing the right location?
Can the above accept a value of name, or am I limited to whats listed in the following: https://docs.appdynamics.com/display/PRO45/Alert+and+Respond+API#AlertandRespondAPI-RetrieveAllHealt...

Also, for reference, is there a schema diagram that shows the relationships with all API functions?

Cheers!

By replying you agree to the Terms and Conditions of the AppDynamics Community.
Retrieving specific Health Rule Violations via the API
1 REPLY 1
Brian.Wheeldon
AppDynamics Team

Since the API does not provide a "filter by Health Rule Name" option, your best bet is to fetch all the Health Rule violations, then iterate through them and ignore the ones not associated with the target Health Rule.

 

Regards,

Brian Wheeldon, Solution Engineer, NYC




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.