Skip to content

Commit 4c2d9a4

Browse files
committed
Add commands to manage information points.
1 parent bf2f495 commit 4c2d9a4

File tree

6 files changed

+312
-1
lines changed

6 files changed

+312
-1
lines changed

USAGE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,18 @@ Configure and retrieve health rules and their violates.
319319
| copy | Copy healthrules from one application to another. Provide the source application id ("-s") and the target application ("-t")."<br>"/If you provide ("-n") only the named health rule will be copied. | |
320320

321321

322+
## informationPoint
323+
324+
325+
326+
| Command | Description | Example |
327+
| ------- | ----------- | ------- |
328+
| create | Create an information point. Provide an json file (with @ as prefix) containing the information point config (-d) as parameter. | `act.sh informationPoint create -d @examples/information_point.json` |
329+
| delete | Delete information points. Provide an id or an list of ids of information points (-i) as parameter. | `act.sh informationPoint delete -i 1326,1327` |
330+
| list | List information points. Provide an application id (-a) and a time range string (-t) as parameters. | `act.sh informationPoint list -a 6743 -t last_1_hour.BEFORE_NOW.-1.-1.60` |
331+
| update | Update an information point. Provide an json file (with @ as prefix) containing the information point update config (-d) as parameter. | `act.sh informationPoint update -d @examples/information_point_update.json` |
332+
333+
322334
## licenserule
323335

324336

act.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v21.4.0"
3-
ACT_LAST_COMMIT="2f91fa3da1708fc1164c68a4a353de156f040d72"
3+
ACT_LAST_COMMIT="bf2f495b83d0b30ca3c27ac97fd27189698e2ca0"
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"
@@ -260,6 +260,16 @@ healthrule_list() { apiCall '/controller/alerting/rest/v1/applications/{{a:appli
260260
rde healthrule_list "List all healthrules." "Provide an application (-a) as parameter" "-a 29"
261261
healthrule_violations() { apiCall '/controller/rest/applications/{{a:application}}/problems/healthrule-violations?time-range-type={{t:time_range_type}}&duration-in-mins={{d:duration_in_minutes?}}&start-time={{b:start_time?}}&end-time={{e:end_time?}}' "$@" ; }
262262
rde healthrule_violations "Get all healthrule violations." "Provide an application (-a) and a time range type (-t) as parameters, as well as a duration in minutes (-d) or a start-time (-b) and an end time (-f)" "-a 29 -t BEFORE_NOW -d 120"
263+
doc informationPoint << EOF
264+
EOF
265+
informationPoint_create() { apiCall -X POST -d '{{d:infopoint_config}}' '/controller/restui/informationPointUiService/createInfoPointGathererConfig' "$@" ; }
266+
rde informationPoint_create "Create an information point." "Provide an json file (with @ as prefix) containing the information point config (-d) as parameter." "-d @examples/information_point.json"
267+
informationPoint_delete() { apiCall -X POST -d '[{{i:information_points}}]' '/controller/restui/informationPointUiService/deleteInformationPoints' "$@" ; }
268+
rde informationPoint_delete "Delete information points." "Provide an id or an list of ids of information points (-i) as parameter." "-i 1326,1327"
269+
informationPoint_list() { apiCall '/controller/restui/informationPointUiService/getAllInfoPointsListViewData/{{a:application}}?time-range={{t:timerange}}' "$@" ; }
270+
rde informationPoint_list "List information points." "Provide an application id (-a) and a time range string (-t) as parameters." "-a 6743 -t last_1_hour.BEFORE_NOW.-1.-1.60"
271+
informationPoint_update() { apiCall -X POST -d '{{d:infopoint_config}}' '/controller/restui/informationPointUiService/updateInfoPointGathererConfig' "$@" ; }
272+
rde informationPoint_update "Update an information point." "Provide an json file (with @ as prefix) containing the information point update config (-d) as parameter." "-d @examples/information_point_update.json"
263273
doc licenserule << EOF
264274
EOF
265275
licenserule_create() { apiCall -X POST '/controller/mds/v1/license/rules' "$@" ; }

commands.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,3 +775,33 @@ user:
775775
example: -n myadmin -d Administrator -r \"Account Administrator,Administrator\" -p ******** -m admin@localhost
776776
method: POST
777777
endpoint: /controller/rest/users?user-id={{i:user_id}}&user-name={{n:user_name}}&user-display-name={{d:user_display_name}}&user-password={{p:user_password?}}&user-email={{m:user_mail}}&user-roles={{r:user_roles?}}
778+
informationPoint:
779+
title: Information Points
780+
descripion: Retrieve, create and modify information points.
781+
list:
782+
title: List information points.
783+
description: Provide an application id (-a) and a time range string (-t) as parameters.
784+
example: -a 6743 -t last_1_hour.BEFORE_NOW.-1.-1.60
785+
method: GET
786+
endpoint: /controller/restui/informationPointUiService/getAllInfoPointsListViewData/{{a:application}}?time-range={{t:timerange}}
787+
create:
788+
title: Create an information point.
789+
description: Provide an json file (with @ as prefix) containing the information point config (-d) as parameter.
790+
example: -d @examples/information_point.json
791+
method: POST
792+
endpoint: /controller/restui/informationPointUiService/createInfoPointGathererConfig
793+
payload: {{d:infopoint_config}}
794+
update:
795+
title: Update an information point.
796+
description: Provide an json file (with @ as prefix) containing the information point update config (-d) as parameter.
797+
example: -d @examples/information_point_update.json
798+
method: POST
799+
endpoint: /controller/restui/informationPointUiService/updateInfoPointGathererConfig
800+
payload: {{d:infopoint_config}}
801+
delete:
802+
title: Delete information points.
803+
description: Provide an id or an list of ids of information points (-i) as parameter.
804+
example: -i 1326,1327
805+
method: POST
806+
endpoint: /controller/restui/informationPointUiService/deleteInformationPoints
807+
payload: [{{i:information_points}}]

examples/information_point.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"agentType": "APP_AGENT",
3+
"methodDefinition": {
4+
"matchType": "MATCHES_CLASS",
5+
"className": "MyTest",
6+
"methodName": "testMethod",
7+
"methodParameterTypes": [],
8+
"matchConditions": [{
9+
"methodDataGathererConfig": {
10+
"gathererType": "POSITION_GATHERER_TYPE",
11+
"position": 0,
12+
"objectDataTransformer": {
13+
"useToString": true,
14+
"transformerType": "TO_STRING_OBJECT_DATA_TRANSFORMER_TYPE"
15+
}
16+
},
17+
"match": {
18+
"extendedMatchType": "STARTSWITH",
19+
"extendedMatchPattern": "test",
20+
"inList": null,
21+
"inverse": null,
22+
"caseInsensitive": null,
23+
"matchPattern": "test",
24+
"matchType": null,
25+
"regexGroups": null
26+
}
27+
}]
28+
},
29+
"metricDefinitions": [{
30+
"name": "test",
31+
"methodDataGathererConfig": {
32+
"gathererType": "POSITION_GATHERER_TYPE",
33+
"returnValue": false,
34+
"position": 0,
35+
"objectDataTransformer": {
36+
"transformerType": "TO_STRING_OBJECT_DATA_TRANSFORMER_TYPE",
37+
"useToString": true
38+
}
39+
},
40+
"metricTimeRollupType": "AVERAGE"
41+
}],
42+
"jsonDefinition": "",
43+
"name": "mytest",
44+
"applicationId": 6743
45+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"id": 1326,
3+
"version": 4,
4+
"name": "mytest2",
5+
"nameUnique": true,
6+
"applicationId": 6743,
7+
"methodDefinition": {
8+
"id": 4037,
9+
"version": 0,
10+
"matchType": "MATCHES_CLASS",
11+
"className": "MyTest",
12+
"methodName": "testMethod",
13+
"methodParameterTypes": [],
14+
"matchConditions": [{
15+
"id": 358,
16+
"version": 0,
17+
"methodDataGathererConfig": {
18+
"id": 9418,
19+
"version": 0,
20+
"gathererType": "POSITION_GATHERER_TYPE",
21+
"name": null,
22+
"hashValue": 0,
23+
"hashValueDetermined": false,
24+
"returnValue": false,
25+
"position": 0,
26+
"objectDataTransformer": {
27+
"transformerType": "TO_STRING_OBJECT_DATA_TRANSFORMER_TYPE",
28+
"useToString": true,
29+
"objectStateGetterMethods": null,
30+
"fieldName": null,
31+
"userDefinedName": null,
32+
"regex": null,
33+
"objectDataFilter": null,
34+
"hashValue": 0,
35+
"hashValueDetermined": false
36+
},
37+
"analyticsTypeConfig": null
38+
},
39+
"match": {
40+
"matchType": "STARTSWITH",
41+
"matchPattern": "test",
42+
"inverse": false,
43+
"inList": null,
44+
"extendedMatchType": "STARTSWITH",
45+
"extendedMatchPattern": "test",
46+
"regexGroups": null,
47+
"caseInsensitive": false
48+
},
49+
"hashValue": 0,
50+
"hashValueDetermined": false
51+
}],
52+
"moduleName": null,
53+
"fileName": null,
54+
"startLineNo": 0,
55+
"endLineNo": 0,
56+
"matchNoArgsOnly": false,
57+
"gathererType": "CLASS_METHOD",
58+
"hashValue": 0,
59+
"hashValueDetermined": false,
60+
"ruleContextID": 579900972
61+
},
62+
"metricDefinitions": [{
63+
"id": 205,
64+
"version": 1,
65+
"name": "test",
66+
"nameUnique": true,
67+
"methodDataGathererConfig": {
68+
"id": 9419,
69+
"version": 0,
70+
"gathererType": "POSITION_GATHERER_TYPE",
71+
"name": null,
72+
"hashValue": 0,
73+
"hashValueDetermined": false,
74+
"returnValue": false,
75+
"position": 0,
76+
"objectDataTransformer": {
77+
"transformerType": "TO_STRING_OBJECT_DATA_TRANSFORMER_TYPE",
78+
"useToString": true,
79+
"objectStateGetterMethods": null,
80+
"fieldName": null,
81+
"userDefinedName": null,
82+
"regex": null,
83+
"objectDataFilter": null,
84+
"hashValue": 0,
85+
"hashValueDetermined": false
86+
},
87+
"analyticsTypeConfig": null
88+
},
89+
"metricId": 140686672,
90+
"metricTimeRollupType": "AVERAGE"
91+
}],
92+
"jsonDefinition": null,
93+
"agentType": "APP_AGENT"
94+
}

postman-collection.json

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,6 +1978,126 @@
19781978
},
19791979
"description": "Provide an application (-a) and a time range type (-t) as parameters, as well as a duration in minutes (-d) or a start-time (-b) and an end time (-f)"
19801980
}
1981+
}]},{"name": "informationPoint","item": [{
1982+
"name": "Create an information point.",
1983+
"request": {
1984+
"method": "POST",
1985+
"header": [
1986+
{
1987+
"key": "Content-Type",
1988+
"value": "application/json;charset=UTF-8",
1989+
"type": "text"
1990+
},
1991+
{
1992+
"key": "X-CSRF-TOKEN",
1993+
"value": "{{X-CSRF-TOKEN}}",
1994+
"type": "text"
1995+
}
1996+
],
1997+
"body": {
1998+
"mode": "raw",
1999+
"raw": "{{infopoint_config}}"
2000+
},
2001+
"url": {
2002+
"raw": "{{controller_host}}/controller/restui/informationPointUiService/createInfoPointGathererConfig",
2003+
"host": [
2004+
"{{controller_host}}"
2005+
],
2006+
"path": ["controller","restui","informationPointUiService","createInfoPointGathererConfig"],
2007+
"query": []
2008+
},
2009+
"description": "Provide an json file (with @ as prefix) containing the information point config (-d) as parameter."
2010+
}
2011+
},{
2012+
"name": "Delete information points.",
2013+
"request": {
2014+
"method": "POST",
2015+
"header": [
2016+
{
2017+
"key": "Content-Type",
2018+
"value": "application/json;charset=UTF-8",
2019+
"type": "text"
2020+
},
2021+
{
2022+
"key": "X-CSRF-TOKEN",
2023+
"value": "{{X-CSRF-TOKEN}}",
2024+
"type": "text"
2025+
}
2026+
],
2027+
"body": {
2028+
"mode": "raw",
2029+
"raw": "[{{information_points}}]"
2030+
},
2031+
"url": {
2032+
"raw": "{{controller_host}}/controller/restui/informationPointUiService/deleteInformationPoints",
2033+
"host": [
2034+
"{{controller_host}}"
2035+
],
2036+
"path": ["controller","restui","informationPointUiService","deleteInformationPoints"],
2037+
"query": []
2038+
},
2039+
"description": "Provide an id or an list of ids of information points (-i) as parameter."
2040+
}
2041+
},{
2042+
"name": "List information points.",
2043+
"request": {
2044+
"method": "GET",
2045+
"header": [
2046+
{
2047+
"key": "Content-Type",
2048+
"value": "application/json;charset=UTF-8",
2049+
"type": "text"
2050+
},
2051+
{
2052+
"key": "X-CSRF-TOKEN",
2053+
"value": "{{X-CSRF-TOKEN}}",
2054+
"type": "text"
2055+
}
2056+
],
2057+
"body": {
2058+
"mode": "raw",
2059+
"raw": ""
2060+
},
2061+
"url": {
2062+
"raw": "{{controller_host}}/controller/restui/informationPointUiService/getAllInfoPointsListViewData/{{a:application}}?time-range={{t:timerange}}",
2063+
"host": [
2064+
"{{controller_host}}"
2065+
],
2066+
"path": ["controller","restui","informationPointUiService","getAllInfoPointsListViewData","{{application}}"],
2067+
"query": [{"key": "time-range","value": "{{timerange}}"}]
2068+
},
2069+
"description": "Provide an application id (-a) and a time range string (-t) as parameters."
2070+
}
2071+
},{
2072+
"name": "Update an information point.",
2073+
"request": {
2074+
"method": "POST",
2075+
"header": [
2076+
{
2077+
"key": "Content-Type",
2078+
"value": "application/json;charset=UTF-8",
2079+
"type": "text"
2080+
},
2081+
{
2082+
"key": "X-CSRF-TOKEN",
2083+
"value": "{{X-CSRF-TOKEN}}",
2084+
"type": "text"
2085+
}
2086+
],
2087+
"body": {
2088+
"mode": "raw",
2089+
"raw": "{{infopoint_config}}"
2090+
},
2091+
"url": {
2092+
"raw": "{{controller_host}}/controller/restui/informationPointUiService/updateInfoPointGathererConfig",
2093+
"host": [
2094+
"{{controller_host}}"
2095+
],
2096+
"path": ["controller","restui","informationPointUiService","updateInfoPointGathererConfig"],
2097+
"query": []
2098+
},
2099+
"description": "Provide an json file (with @ as prefix) containing the information point update config (-d) as parameter."
2100+
}
19812101
}]},{"name": "licenserule","item": [{
19822102
"name": "Create a license rule.",
19832103
"request": {

0 commit comments

Comments
 (0)