Skip to content

Commit 46684e3

Browse files
committed
Add eumCorrelation disable
1 parent 2d76e71 commit 46684e3

File tree

5 files changed

+63
-1
lines changed

5 files changed

+63
-1
lines changed

USAGE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,15 @@ Afterwards you can use `act.sh -E <name>` to call the given controller.
264264
| getapps | Get EUM Apps. | |
265265

266266

267+
## eumCorrelation
268+
269+
Manage correlation cookies for APM and EUM integration
270+
271+
| Command | Description | Example |
272+
| ------- | ----------- | ------- |
273+
| disable | Disable all EUM correlation cookies. | `act.sh eumCorrelation disable -a 41` |
274+
275+
267276
## event
268277

269278
Create and list events in your business applications.

act.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v20.3.0"
3-
ACT_LAST_COMMIT="3bd5817c8aa788838c686c37ffe1fea56c39e90b"
3+
ACT_LAST_COMMIT="2d76e711095ed5c5b6cd7affa9e55de9a91330d0"
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"
@@ -223,6 +223,11 @@ dbmon_servers() { apiCall '/controller/rest/databases/servers' "$@" ; }
223223
rde dbmon_servers "List all servers." "No further arguments required." ""
224224
dbmon_update() { apiCall -X POST -d '{{d:database_collector_update_definition}}' '/controller/rest/databases/collectors/update' "$@" ; }
225225
rde dbmon_update "Update a specific collector." "Provide a json string or a @file (-d) as parameter." "-d @collector.json"
226+
doc eumCorrelation << EOF
227+
Manage correlation cookies for APM and EUM integration
228+
EOF
229+
eumCorrelation_disable() { apiCall -X POST -d '{"isEnabled":false,"includeRules":[],"excludeRules":[],"btHeaderInjectionForSafeAgentsEnabled":false}' '/controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}' "$@" ; }
230+
rde eumCorrelation_disable "Disable all EUM correlation cookies." "" "-a 41"
226231
doc event << EOF
227232
Create and list events in your business applications.
228233
EOF

commands.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,15 @@ synthetic:
700700
method: POST
701701
endpoint: /controller/restui/synthetic/schedule/{{a:application}}/updateScheduleBatch
702702
payload: {{d:synthetic_job}}
703+
eumCorrelation:
704+
title: User Experience App Integration
705+
description: Manage correlation cookies for APM and EUM integration
706+
disable:
707+
title: Disable all EUM correlation cookies.
708+
example: -a 41
709+
method: POST
710+
endpoint: /controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}
711+
payload: {\"isEnabled\":false,\"includeRules\":[],\"excludeRules\":[],\"btHeaderInjectionForSafeAgentsEnabled\":false}
703712
tier:
704713
title: Tiers
705714
description: List all tiers.

postman-collection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,36 @@
16481648
},
16491649
"description": "Provide a json string or a @file (-d) as parameter."
16501650
}
1651+
}]},{"name": "eumCorrelation","item": [{
1652+
"name": "Disable all EUM correlation cookies.",
1653+
"request": {
1654+
"method": "POST",
1655+
"header": [
1656+
{
1657+
"key": "Content-Type",
1658+
"value": "application/json;charset=UTF-8",
1659+
"type": "text"
1660+
},
1661+
{
1662+
"key": "X-CSRF-TOKEN",
1663+
"value": "{{X-CSRF-TOKEN}}",
1664+
"type": "text"
1665+
}
1666+
],
1667+
"body": {
1668+
"mode": "raw",
1669+
"raw": "{\"isEnabled\":false,\"includeRules\":[],\"excludeRules\":[],\"btHeaderInjectionForSafeAgentsEnabled\":false}"
1670+
},
1671+
"url": {
1672+
"raw": "{{controller_host}}/controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}",
1673+
"host": [
1674+
"{{controller_host}}"
1675+
],
1676+
"path": ["controller","restui","configuration","userExperienceAppIntegration","businessTransactionEumCorrelation","saveConfiguration","{{application}}"],
1677+
"query": []
1678+
},
1679+
"description": ""
1680+
}
16511681
}]},{"name": "event","item": [{
16521682
"name": "Create an event.",
16531683
"request": {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
ENVIRONMENT=$1
3+
EXISTING_APPLICATION_IDS=$(../act.sh -E "${ENVIRONMENT}" application list | grep "<id>" | sed "s# *<id>\([^<]*\)</id>#\1#g")
4+
5+
for APPLICATION in $EXISTING_APPLICATION_IDS
6+
do
7+
echo "Disable correlation cookies for ${APPLICATION}"
8+
../act.sh -E "${ENVIRONMENT}" eumCorrelation disable "${APPLICATION}"
9+
done;

0 commit comments

Comments
 (0)