Skip to content

Commit 4b793e4

Browse files
authored
Merge pull request #38 from noMoreCLI/master
Added detailed application query command including overall health indication
2 parents 813cf77 + e816274 commit 4b793e4

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

act.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v22.4.0"
3-
ACT_LAST_COMMIT="b18e9f68d51eae728697825a6b460470fa687ec1"
3+
ACT_LAST_COMMIT="401363b3bf068013122e8a9975b1af70be7dfbec"
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"
@@ -152,6 +152,8 @@ application_get() { apiCall '/controller/rest/applications/{{a:application}}' "$
152152
rde application_get "Get an application." "Provide an application id or name as parameter (-a)." "-a 15"
153153
application_list() { apiCall '/controller/rest/applications' "$@" ; }
154154
rde application_list "List all applications." "This command requires no further arguments." ""
155+
application_listdetails() { apiCall -X POST -d '{"requestFilter":[{{i:ids}}],"timeRangeStart":{{s:start}},"timeRangeEnd":{{e:end}},"searchFilters":null,"columnSorts":null,"resultColumns":["APP_OVERALL_HEALTH","CALLS","CALLS_PER_MINUTE","AVERAGE_RESPONSE_TIME","ERROR_PERCENT","ERRORS","ERRORS_PER_MINUTE","NODE_HEALTH","BT_HEALTH"],"offset":0,"limit":-1} ' '/controller/restui/v1/app/list/ids' "$@" ; }
156+
rde application_listdetails "List application details" "List application details including health. Provide application ids as parameter (-i), a start and end timestamp (-s and -e)." "-i 9326,8914 -s 1610389435 -e 1620389435"
155157
doc audit << EOF
156158
The Controller audit history is a record of the configuration and user activities in the Controller configuration.
157159
EOF

commands.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ application:
112112
example: -a 29
113113
method: GET
114114
endpoint: /controller/ConfigObjectImportExportServlet?applicationId={{a:application}}
115+
listdetails:
116+
title: List application details
117+
description: List application details including health. Provide application ids as parameter (-i), a start and end timestamp (-s and -e).
118+
example: -i 9326,8914 -s 1610389435 -e 1620389435
119+
method: POST
120+
endpoint: /controller/restui/v1/app/list/ids
121+
payload: {\"requestFilter\":[{{i:ids}}],\"timeRangeStart\":{{s:start}},\"timeRangeEnd\":{{e:end}},\"searchFilters\":null,\"columnSorts\":null,\"resultColumns\":[\"APP_OVERALL_HEALTH\",\"CALLS\",\"CALLS_PER_MINUTE\",\"AVERAGE_RESPONSE_TIME\",\"ERROR_PERCENT\",\"ERRORS\",\"ERRORS_PER_MINUTE\",\"NODE_HEALTH\",\"BT_HEALTH\"],\"offset\":0,\"limit\":-1}
115122
actiontemplate:
116123
title: Action Templates
117124
description: These commands allow you to import and export email/http action templates. A common use pattern is exporting the commands from one controller and importing into another. Please note that the export is a list of templates and the import expects a single object, so you need to split the json inbetween.

postman-collection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,36 @@
898898
},
899899
"description": "This command requires no further arguments."
900900
}
901+
},{
902+
"name": "List application details",
903+
"request": {
904+
"method": "POST",
905+
"header": [
906+
{
907+
"key": "Content-Type",
908+
"value": "application/json;charset=UTF-8",
909+
"type": "text"
910+
},
911+
{
912+
"key": "X-CSRF-TOKEN",
913+
"value": "{{X-CSRF-TOKEN}}",
914+
"type": "text"
915+
}
916+
],
917+
"body": {
918+
"mode": "raw",
919+
"raw": "{\"requestFilter\":[{{ids}}],\"timeRangeStart\":{{start}},\"timeRangeEnd\":{{end}},\"searchFilters\":null,\"columnSorts\":null,\"resultColumns\":[\"APP_OVERALL_HEALTH\",\"CALLS\",\"CALLS_PER_MINUTE\",\"AVERAGE_RESPONSE_TIME\",\"ERROR_PERCENT\",\"ERRORS\",\"ERRORS_PER_MINUTE\",\"NODE_HEALTH\",\"BT_HEALTH\"],\"offset\":0,\"limit\":-1} "
920+
},
921+
"url": {
922+
"raw": "{{controller_host}}/controller/restui/v1/app/list/ids",
923+
"host": [
924+
"{{controller_host}}"
925+
],
926+
"path": ["controller","restui","v1","app","list","ids"],
927+
"query": []
928+
},
929+
"description": "List application details including health. Provide application ids as parameter (-i), a start and end timestamp (-s and -e)."
930+
}
901931
}]},{"name": "audit","item": [{
902932
"name": "Get audit history.",
903933
"request": {

0 commit comments

Comments
 (0)