PDFs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Example filter (DOCS-15)

...

Input parameters

Div
style clear: both;

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

Provide either the application name or application id.

Yes

time-range-type

Query

Possible values are:
BEFORE_NOW 
To use the "BEFORE_NOW" option, you must also specify the "duration-in-mins" parameter.
BEFORE_TIME  
To use the "BEFORE_TIME" option, you must also specify the "duration-in-mins" and "end-time" parameters.
AFTER_TIME
To use the "AFTER_TIME" option, you must also specify the "duration-in-mins" and "start-time" parameters.
BETWEEN_TIMES 
To use the "BETWEEN_TIMES" option, you must also specify the "start-time" and "end-time" parameters. The "BETWEEN_TIMES" range includes the start- time and excludes the end-time.

Yes

duration-in-mins

Query

Duration (in minutes) to return the metric data.

If time-range-type is BEFORE_NOW, BEFORE_TIME, or AFTER_TIME

start-time

Query

Start time (in milliseconds) from which the metric data is returned.

If time-range-type is AFTER_TIME or BETWEEN_TIMES

end-time

Query

End time (in milliseconds) until which the metric data is returned.

If time-range-type is BEFORE_TIME or BETWEEN_TIMES

output

Query

HTTP Request parameter included as part of the URL to change the output format. Valid values are "XML" (default) or "JSON".

No

Expand
titleClick here to view a full example...

http://demo.appdynamics.com/controller/rest/applications/7/problems/healthrule-violations?time-range-type=BEFORE_NOW&duration-in-mins=15 

<policy-violations><policy-violation>
  <id>266</id>
  <name>CPU utilization is too high</name>
  <startTimeInMillis>1452630655000</startTimeInMillis>
  <detectedTimeInMillis>0</detectedTimeInMillis>
  <endTimeInMillis>1452630715000</endTimeInMillis>
  <incidentStatus>RESOLVED</incidentStatus>
  <severity>WARNING</severity>
  <triggeredEntityDefinition>
    <entityType>POLICY</entityType>
    <entityId>30</entityId>
    <name>CPU utilization is too high</name>
  </triggeredEntityDefinition>
  <affectedEntityDefinition>
    <entityType>APPLICATION_COMPONENT_NODE</entityType>
    <entityId>16</entityId>
    <name>Fulfillment</name>
  </affectedEntityDefinition>
  <deepLinkUrl>http://demo.appdynamics.com/controller/#location=APP_INCIDENT_DETAIL&amp;incident=266</deepLinkUrl>
  <description>AppDynamics has detected a problem with Node &lt;b&gt;Fulfillment&lt;/b&gt;.&lt;br&gt;&lt;b&gt;CPU utilization is too high&lt;/b&gt; started violating and is now &lt;b&gt;warning&lt;/b&gt;.&lt;br&gt;All of the following conditions were found to be violating&lt;br&gt;For Node &lt;b&gt;Fulfillment&lt;/b&gt;:&lt;br&gt;1) Hardware Resources|CPU|%Busy Condition&lt;br&gt;&lt;b&gt;%Busy's&lt;/b&gt; value &lt;b&gt;76.0&lt;/b&gt; was &lt;b&gt;greater than&lt;/b&gt; the threshold &lt;b&gt;75.0&lt;/b&gt; for the last &lt;b&gt;30&lt;/b&gt; minutes&lt;br&gt;</description>
</policy-violation>
<policy-violation>
  <id>268</id>
  <name>CPU utilization is too high</name>
  <startTimeInMillis>1452630655000</startTimeInMillis>
  <detectedTimeInMillis>0</detectedTimeInMillis>
  <endTimeInMillis>1452630715000</endTimeInMillis>
  <incidentStatus>RESOLVED</incidentStatus>
  <severity>WARNING</severity>
  <triggeredEntityDefinition>
    <entityType>POLICY</entityType>
    <entityId>30</entityId>
    <name>CPU utilization is too high</name>
  </triggeredEntityDefinition>
  <affectedEntityDefinition>
    <entityType>APPLICATION_COMPONENT_NODE</entityType>
    <entityId>20</entityId>
    <name>FulfillmentClient</name>
  </affectedEntityDefinition>
  <deepLinkUrl>http://demo.appdynamics.com/controller/#location=APP_INCIDENT_DETAIL&amp;incident=268</deepLinkUrl>
  <description>AppDynamics has detected a problem with Node &lt;b&gt;FulfillmentClient&lt;/b&gt;.&lt;br&gt;&lt;b&gt;CPU utilization is too high&lt;/b&gt; started violating and is now &lt;b&gt;warning&lt;/b&gt;.&lt;br&gt;All of the following conditions were found to be violating&lt;br&gt;For Node &lt;b&gt;FulfillmentClient&lt;/b&gt;:&lt;br&gt;1) Hardware Resources|CPU|%Busy Condition&lt;br&gt;&lt;b&gt;%Busy's&lt;/b&gt; value &lt;b&gt;76.0&lt;/b&gt; was &lt;b&gt;greater than&lt;/b&gt; the threshold &lt;b&gt;75.0&lt;/b&gt; for the last &lt;b&gt;30&lt;/b&gt; minutes&lt;br&gt;</description>
</policy-violation>
</policy-violations>

...

/controller/rest/applications/application_id/events

Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

Provide either the application name or application id.

Yes

time-range-type

Query

Possible values are:
BEFORE_NOW 
To use the "BEFORE_NOW" option, you must also specify the "duration-in-mins" parameter.
BEFORE_TIME 
To use the "BEFORE_TIME" option, you must also specify the "duration-in-mins" and "end-time" parameters.
AFTER_TIME 
To use the "AFTER_TIME" option, you must also specify the "duration-in-mins" and "start-time" parameters.
BETWEEN_TIMES
To use the "BETWEEN_TIMES" option, you must also specify the "start-time" and "end-time" parameters. The "BETWEEN_TIMES" range includes the start- time and excludes the end-time.

Yes

duration-in-mins

Query

Specify the duration (in minutes) to return the metric data.

If time-range-type is BEFORE_NOW, BEFORE_TIME, or AFTER_TIME

start-time

Query

Specify the start time (in milliseconds) from which the metric data is returned.

If time-range-type is AFTER_TIME or BETWEEN_TIMES

end-time

Query

Specify the end time (in milliseconds) until which the metric data is returned.

If time-range-type is BEFORE_TIME or BETWEEN_TIMES

event-types

Query

Specify the comma-separated list of event types for which you want to retrieve event information. See the Events Reference for the valid event types.

Yes

severities

Query

Specify the comma-separated list of severities for which you want to retrieve event information.

The severities are:

  • INFO
  • WARN
  • ERROR

Yes

output

Query

HTTP Request parameter included as part of the URL to change the output format. Valid values are "XML" (default) or "JSON".

No

Example

Retrieve the list of events of type "APPLICATION_ERROR" or "DIAGNOSTIC_SESSION" of any severity that occurred in the specified time range:

...

POST /controller/rest/applications/application_id/events

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

Provide either application name or application id.

Yes

summary

Query

Provide the summary for the event.

Yes

comment

Query

Provide the comments (if any) for the event.

No

eventtype

Query

APPLICATION_DEPLOYMENT

Yes

severityQueryProvide a severity level. Allowed values
  • "INFO" 
  • "WARN" 
  • "ERROR"

In the UI, these become "Info", "Warning", and "Critical"

Yes


Create a Custom Event

You can create custom events to be reported in the AppDynamics event viewer and in the events panels on the AppDynamics dashboards. See Monitor Events to learn how to filter on your custom events so that you can find them. Then you can create alerts triggered by these events as you do for AppDynamics standard events.

...

POST /controller/rest/applications/application_id/events

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

Provide either application name or application id.

Yes

summary

Query

Provide a summary describing the event.

Yes

comment

Query

Provide a comment for the event.

No

severityQueryProvide a severity level. Allowed values
  • "INFO" 
  • "WARN" 
  • "ERROR"

In the UI, these become "Info", "Warning", and "Critical"

Yes

eventtype

Query

CUSTOM

Yes

customeventtypeQueryProvide a name for the "type"; for example, the source, like "nagios"No
nodeQueryProvide the affected node nameNo
tierQueryProvide the affected tier nameYes, if node and bt are specified
btQueryProvide the affected business transaction nameNo
propertynamesQueryProvide a property name as a pair, i.e., the "key"No, but if one element of the pair is defined, the other must be defined also
propertyvaluesQueryProvide the property value as a pair, i.e., the "value"

No, but if one element of the pair is defined, the other must be defined also

 

Example 

No Format
curl -X POST --user user1@customer1:secret 'http://demo.appdynamics.com/controller/rest/applications/5/events?severity=INFO&summary=test1&eventtype=CUSTOM&customeventtype=mycustomevent&propertynames=key1&propertynames=key2&propertyvalues=value1&propertyvalues=value'

Note the pattern for custom properties: propertynames that propertynames and propertyvalues get matched up are paired by order position. Thus, so to set N property set two property values, you need N occurrences need two instances of both propertynames and N occurrences of propertyvalues.and propertyvalues.

To view the new custom event in the Controller UI, you need to filter for the custom event type you created, as follows: 

  1. In the Application Dashboard for the business application, click the Events tab. 
  2. Click the Filter button, Add Criteria, and then Custom Events.  
  3. Expand the Custom Events criteria, and click the Plus icon.
  4. Enter the name of your custom event type (and optionally, filtering property names and values) and then Save. For the example query, the filter would appear as follows:
    Image Added

Create Custom URLS for Notifications

...

POST /controller/rest/accounts/customer_name/update-controller-url


Input parameters

Parameter Name
Parameter Type
Value
Mandatory
customer_nameURIThe customer account nameYes

Body Parameter 

As Application/JSON content:

No Format
{
"controllerURL": "http://<my-custom-hostname:port>"
}
Info

If the URL in the alerts is invalid, you can set it using the following curl command:

No Format
curl -k --basic --user root@system --header "Content-Type: application/json" --data '{ "controllerURL": "http://<controller>:<port>" }' http://<controller>:<port>/controller/rest/accounts/<ACCOUNT-NAME>/update-controller-url

For example:

No Format
curl -k --basic --user root@system --header "Content-Type: application/json" --data '{ "controllerURL": "https://myVIP:443" }' https://myhost:8181/controller/rest/accounts/customer1/update-controller-url

There is no need to reset the controller. Upgrading the controller will reset the deeplink URL settings.

Create and Delete Action Suppressions

By default any response is in JSON, although XML can be requested by using the following header:

Name : Accept
Value : application/vnd.appd.cntrl+xml;v=1

Retrieve All Existing Action Suppressions

Gets a list of all existing action suppressions. 

URI

GET /controller/api/accounts/account_id/applications/application_id/actionsuppressions

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

account_id URIThe account IDYes

application_id

URI

The application ID

Yes

Example request to get all action suppressions:

No Format
/controller/api/accounts/2/applications/9/actionsuppressions

Example response:

No Format
Status : 200 ok
Output Data :
{"actionSuppressions": [{"id": "15","name": "App-ASW","timeRange": {"startTimeMillis": "2014-10-25T04:16:30+0000","endTimeMillis": "2014-10-25T06:16:30+0000"},"affects": {"type": "APP"}},{"id": "16","name": "Node-ASW","timeRange": {"startTimeMillis": "2014-10-25T04:16:57+0000","endTimeMillis": "2014-10-25T05:16:57+0000"},"healthRuleIds": [60,61],"affects": {"type": "NODE","nodeAffectedEntities": {"type": "SPECIFIC","nodeType": "ALL","nodes": [17,18]}}}],"actions": [{"href": "http://demo.appdynamics.com:8090/controller/api/accounts/2/applications/9/actionsuppressions/%7Bactionsuppressions.id%7D/%7Bactions.name%7D","method": ["POST","DELETE"],"name": "enabled"}],"links": [{"href": "http://ec2-54-80-163-175.compute-1.amazonaws.com:8090/controller/api/accounts/2/applications/9/actionsuppressions/%7Bactionsuppressions.id%7D","name": "actionsuppressions"}]}

Retrieve a Specific Action Suppression by ID

Get the action suppression by specified ID. 

URI

/controller/api/accounts/account_id/applications/application_id/actionsuppressions/actionsuppression_id

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

account_idURIThe account idYes

application_id

URI

The application id

Yes

actionsuppressions_idURIThe action suppression idYes

Example request:

No Format
/controller/api/accounts/2/applications/9/actionsuppressions/15

Example response:

No Format
Status : 200 ok
Output Data :
{"id": "15","name": "App-ASW","timeRange": {"startTimeMillis": "2014-10-25T04:16:30+0000","endTimeMillis": "2014-10-25T06:16:30+0000"},"affects": {"type": "APP"}}

Create a New Action Suppression

This is a POST request. Should return a 201 - created response.

URI

POST /controller/api/accounts/account_id/applications/application_id/actionsuppressions

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

account_idURIThe account idYes

application_id

URI

The application id

Yes

namebody keyThe name of the action suppression windowYes
timeRangebody key

The start and end time of the window
Includes:
startTimeMillis, eg 2014-10-25T04:16:57+0000
endTimeMillis, eg  2014-10-25T05:16:57+0000

Yes
healthRuleIdsbody keyThe ids of the affected health rules. If not provided, all rules affectedNo
affectsbody keyType of entity and corresponding ids (see below)Yes

Content of "affects"

ScopeTypeValueExample
ApplicationAPPCovers the entire application"affects": {"type": "APP"}
Business TransactionBTCovers one or more Business Transactions 
  All Business Transactions "affects": {"type": "BT","btAffectedEntities": {"type": "ALL"}}
  Business Transactions from specific tiers"affects": {"type": "BT","btAffectedEntities": {"type": "WITHIN_TIERS","tiers": [11,12]}}  where 11,12 are Tier Ids
  Specific Business Transactions by id "affects": {"type": "BT","btAffectedEntities": {"type": "SPECIFIC","bts": [1,2]}} where 1,2 are BT Ids
  Business Transactions that match criteria

"affects": {"type": "BT","btAffectedEntities": {"type": "CRITERIA","matchesOperator": "CONTAINS","matchesValue": "pojo"}}
where "matchesOperator" can be:

  • CONTAINS
  • EQUALS
  • STARTS
  • ENDS
  • REGEX
TierTIERCovers one or more tiers 
  All tiers "affects": {"type": "TIER","tierAffectedEntities": {"type": "ALL"}}
  Specific tiers"affects": {"type": "TIER","tierAffectedEntities": {"type": "SPECIFIC","tiers": [11,12]}} where 11,12 are Tier Ids
NodeNODECovers one or more nodes 
  All nodes"affects": {"type": "NODE","nodeAffectedEntities": {"type": "ALL","nodeType": "ALL"}}
  Nodes belonging to specific tiers"affects": {"type": "NODE","nodeAffectedEntities": {"type": "WITHIN_TIERS","nodeType": "ALL","tiers": [11,12]}} where 11,12 are Tier Ids
  Specific nodes"affects": {"type": "NODE","nodeAffectedEntities": {"type": "SPECIFIC","nodeType": "ALL","nodes": [9,10]}} where 9,10 are Node Ids
  Nodes that match criteria
 
"affects": {"type": "NODE","nodeAffectedEntities": {"type": "NAME_CRITERIA","nodeType": "ALL","nameMatchesOperator": "EQUALS","nameMatchesValue": "Node"}} - String match
 "affects": {"type": "NODE","nodeAffectedEntities": {"type": "PROPERTY_CRITERIA","nodeType": "ALL","metaInfoProperties": [{"name": "ProcessID","value": "12343"}]}} - Meta Info Properties match

where "matchesOperator" can be:

  • CONTAINS
  • EQUALS
  • STARTS
  • ENDS
  • REGEX
MachineMACHINECovers one or more machines"affects": {"type": "MACHINE","machineAffectedEntities": {"type": "SPECITIC","machines": [4,5]}} where 4,5 are Machine Ids
(info) note you must spell the value as "SPECITIC" due to a typo in the underlying code.

Example request

No Format
 /controller/api/accounts/2/applications/9/actionsuppressions

Header

  • Name: Content-Type
  • Value: application/vnd.appd.cntrl+json;v=1

Body

No Format
{"name": "App-ASW_2","timeRange": {"startTimeMillis": "2014-10-25T04:16:30+0000","endTimeMillis": "2014-10-25T06:16:30+0000"},"affects": {"type": "APP"}}

 

or

No Format
{"name": "Node-ASW_1","timeRange": {"startTimeMillis": "2014-10-25T04:16:57+0000","endTimeMillis": "2014-10-25T05:16:57+0000"},"healthRuleIds": [60,61],"affects": {"type": "NODE","nodeAffectedEntities": {"type": "SPECIFIC","nodeType": "ALL","nodes": [17,18]}}}


Delete a Specific Action Suppression by ID

This is a DELETE request. Should return a 204 - No Content.

URI

DELETE /controller/api/accounts/account_id/applications/application_id/actionsuppressions/actionsuppression_id

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

account_idURIThe account idYes

application_id

URI

The application id

Yes

actionsuppression_idURIThe id of the action suppression to be deletedYes