Skip to content

Commit e738e63

Browse files
committed
Add flowmap API calls
1 parent 6da09b2 commit e738e63

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

USAGE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ Establish a federation between two AppDynamics Controllers.
239239
| setup | Setup a controller federation: Generates a key and establishes the mutal friendship. | |
240240

241241

242+
## flowmap
243+
244+
Retrieve flowmaps
245+
246+
| Command | Description | Example |
247+
| ------- | ----------- | ------- |
248+
| application | Get an application flowmap Provide an application (-a) and a time range string (-t) as parameter. | `act.sh flowmap application -a 41 -t last_1_hour.BEFORE_NOW.-1.-1.60` |
249+
| component | Get an component flowmap Provide an component (tier, node, ...) id (-c) and a time range string (-t) as parameter | `act.sh flowmap component -c 108 -t last_1_hour.BEFOREW_NOW.-1.-1.60` |
250+
251+
242252
## healthrule
243253

244254
Configure and retrieve health rules and their violates.

act.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v0.4.0"
3-
ACT_LAST_COMMIT="f5b1a202ae46d1d9b1456d714859e6da5fdd0927"
3+
ACT_LAST_COMMIT="6da09b22d08b0abbcd200f4de671149b74a680ca"
44
USER_CONFIG="$HOME/.appdynamics/act/config.sh"
55
GLOBAL_CONFIG="/etc/appdynamics/act/config.sh"
66
CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt"
@@ -193,6 +193,13 @@ function federation_createkey { apiCall -X POST -d '{"apiKeyName": "{{n:federati
193193
rde federation_createkey "Create a key." "Provide a name for the api key (-n) as parameter." "-n saas2onprem"
194194
function federation_establish { apiCall -X POST -d '{"accountName": "{{controller_account}}","controllerUrl": "{{controller_url}}","friendAccountName": "{{a:federation_friend_account}}", "friendAccountApiKey": "{{k:federation_friend_api_key}}", "friendAccountControllerUrl": "{{c:federation_friend_controller_url}}"}' '/controller/rest/federation/establishmutualfriendship' "$@" ; }
195195
rde federation_establish "Establish a federation" "Provide an account name (-a), an api key (-k) and a controller url (-c) for the friend account." "-a customer1 -k NGEzNzlhNTctNzQ1Yy00ZWM3LTkzNmItYTVkYmY0NWVkYzZjOjA0Nzk0ZjI5NzU1OWM0Zjk4YzYxN2E0Y2I2ODkwMDMyZjdjMDhhZTY= -c http://localhost:8090"
196+
doc flowmap << EOF
197+
Retrieve flowmaps
198+
EOF
199+
function flowmap_application { apiCall '/controller/restui/applicationFlowMapUiService/application/{{a:application}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1&forceFetch=false' "$@" ; }
200+
rde flowmap_application "Get an application flowmap" "Provide an application (-a) and a time range string (-t) as parameter." "-a 41 -t last_1_hour.BEFORE_NOW.-1.-1.60"
201+
function flowmap_component { apiCall '/controller/restui/componentFlowMapUiService/component/{{c:component}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1' "$@" ; }
202+
rde flowmap_component "Get an component flowmap" "Provide an component (tier, node, ...) id (-c) and a time range string (-t) as parameter" "-c 108 -t last_1_hour.BEFOREW_NOW.-1.-1.60"
196203
doc healthrule << EOF
197204
Configure and retrieve health rules and their violates.
198205
EOF

commands.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,21 @@ event:
300300
example: -l INFO -c 'New bug fix release.' -e APPLICATION_DEPLOYMENT -a 29 -s 'Version 3.1.3'
301301
method: POST
302302
endpoint: /controller/rest/applications/{{a:application}}/events?summary={{s:event_summary}}&comment={{c:event_comment?}}&eventtype={{e:event_type}}&severity={{l:event_severity}}&bt={{b:business_transaction?}}&node={{n:node?}}&tier={{t:tier?}}
303+
flowmap:
304+
title: Flowmap
305+
description: Retrieve flowmaps
306+
application:
307+
title: Get an application flowmap
308+
description: Provide an application (-a) and a time range string (-t) as parameter.
309+
example: -a 41 -t last_1_hour.BEFORE_NOW.-1.-1.60
310+
method: GET
311+
endpoint: /controller/restui/applicationFlowMapUiService/application/{{a:application}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1&forceFetch=false
312+
component:
313+
title: Get an component flowmap
314+
description: Provide an component (tier, node, ...) id (-c) and a time range string (-t) as parameter
315+
example: -c 108 -t last_1_hour.BEFOREW_NOW.-1.-1.60
316+
method: GET
317+
endpoint: /controller/restui/componentFlowMapUiService/component/{{c:component}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1
303318
federation:
304319
title: Federation
305320
description: Establish a federation between two AppDynamics Controllers.

postman-collection.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,66 @@
12881288
},
12891289
"description": "Provide an account name (-a), an api key (-k) and a controller url (-c) for the friend account."
12901290
}
1291+
}]},{"name": "flowmap","item": [{
1292+
"name": "Get an application flowmap",
1293+
"request": {
1294+
"method": "GET",
1295+
"header": [
1296+
{
1297+
"key": "Content-Type",
1298+
"value": "application/json;charset=UTF-8",
1299+
"type": "text"
1300+
},
1301+
{
1302+
"key": "X-CSRF-TOKEN",
1303+
"value": "{{X-CSRF-TOKEN}}",
1304+
"type": "text"
1305+
}
1306+
],
1307+
"body": {
1308+
"mode": "raw",
1309+
"raw": ""
1310+
},
1311+
"url": {
1312+
"raw": "{{controller_host}}/controller/restui/applicationFlowMapUiService/application/{{a:application}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1&forceFetch=false",
1313+
"host": [
1314+
"{{controller_host}}"
1315+
],
1316+
"path": ["controller","restui","applicationFlowMapUiService","application","{{application}}"],
1317+
"query": [{"key": "time-range","value": "{{timerange}}"},{"key":"mapId","value": "-1"},{"key":"baselineId","value": "-1"},{"key":"forceFetch","value": "false"}]
1318+
},
1319+
"description": "Provide an application (-a) and a time range string (-t) as parameter."
1320+
}
1321+
},{
1322+
"name": "Get an component flowmap",
1323+
"request": {
1324+
"method": "GET",
1325+
"header": [
1326+
{
1327+
"key": "Content-Type",
1328+
"value": "application/json;charset=UTF-8",
1329+
"type": "text"
1330+
},
1331+
{
1332+
"key": "X-CSRF-TOKEN",
1333+
"value": "{{X-CSRF-TOKEN}}",
1334+
"type": "text"
1335+
}
1336+
],
1337+
"body": {
1338+
"mode": "raw",
1339+
"raw": ""
1340+
},
1341+
"url": {
1342+
"raw": "{{controller_host}}/controller/restui/componentFlowMapUiService/component/{{c:component}}?time-range={{t:timerange}}&mapId=-1&baselineId=-1",
1343+
"host": [
1344+
"{{controller_host}}"
1345+
],
1346+
"path": ["controller","restui","componentFlowMapUiService","component","{{component}}"],
1347+
"query": [{"key": "time-range","value": "{{timerange}}"},{"key":"mapId","value": "-1"},{"key":"baselineId","value": "-1"}]
1348+
},
1349+
"description": "Provide an component (tier, node, ...) id (-c) and a time range string (-t) as parameter"
1350+
}
12911351
}]},{"name": "healthrule","item": [{
12921352
"name": "Get a healthrule.",
12931353
"request": {

0 commit comments

Comments
 (0)