Skip to content

Commit

Permalink
Add eumCorrelation disable
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm committed Jan 26, 2021
1 parent 2d76e71 commit 46684e3
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
9 changes: 9 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ Afterwards you can use `act.sh -E <name>` to call the given controller.
| getapps | Get EUM Apps. | |


## eumCorrelation

Manage correlation cookies for APM and EUM integration

| Command | Description | Example |
| ------- | ----------- | ------- |
| disable | Disable all EUM correlation cookies. | `act.sh eumCorrelation disable -a 41` |


## event

Create and list events in your business applications.
Expand Down
7 changes: 6 additions & 1 deletion act.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
ACT_VERSION="v20.3.0"
ACT_LAST_COMMIT="3bd5817c8aa788838c686c37ffe1fea56c39e90b"
ACT_LAST_COMMIT="2d76e711095ed5c5b6cd7affa9e55de9a91330d0"
USER_CONFIG="$HOME/.appdynamics/act/config.sh"
GLOBAL_CONFIG="/etc/appdynamics/act/config.sh"
CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt"
Expand Down Expand Up @@ -223,6 +223,11 @@ dbmon_servers() { apiCall '/controller/rest/databases/servers' "$@" ; }
rde dbmon_servers "List all servers." "No further arguments required." ""
dbmon_update() { apiCall -X POST -d '{{d:database_collector_update_definition}}' '/controller/rest/databases/collectors/update' "$@" ; }
rde dbmon_update "Update a specific collector." "Provide a json string or a @file (-d) as parameter." "-d @collector.json"
doc eumCorrelation << EOF
Manage correlation cookies for APM and EUM integration
EOF
eumCorrelation_disable() { apiCall -X POST -d '{"isEnabled":false,"includeRules":[],"excludeRules":[],"btHeaderInjectionForSafeAgentsEnabled":false}' '/controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}' "$@" ; }
rde eumCorrelation_disable "Disable all EUM correlation cookies." "" "-a 41"
doc event << EOF
Create and list events in your business applications.
EOF
Expand Down
9 changes: 9 additions & 0 deletions commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,15 @@ synthetic:
method: POST
endpoint: /controller/restui/synthetic/schedule/{{a:application}}/updateScheduleBatch
payload: {{d:synthetic_job}}
eumCorrelation:
title: User Experience App Integration
description: Manage correlation cookies for APM and EUM integration
disable:
title: Disable all EUM correlation cookies.
example: -a 41
method: POST
endpoint: /controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}
payload: {\"isEnabled\":false,\"includeRules\":[],\"excludeRules\":[],\"btHeaderInjectionForSafeAgentsEnabled\":false}
tier:
title: Tiers
description: List all tiers.
Expand Down
30 changes: 30 additions & 0 deletions postman-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,36 @@
},
"description": "Provide a json string or a @file (-d) as parameter."
}
}]},{"name": "eumCorrelation","item": [{
"name": "Disable all EUM correlation cookies.",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
},
{
"key": "X-CSRF-TOKEN",
"value": "{{X-CSRF-TOKEN}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\"isEnabled\":false,\"includeRules\":[],\"excludeRules\":[],\"btHeaderInjectionForSafeAgentsEnabled\":false}"
},
"url": {
"raw": "{{controller_host}}/controller/restui/configuration/userExperienceAppIntegration/businessTransactionEumCorrelation/saveConfiguration/{{a:application}}",
"host": [
"{{controller_host}}"
],
"path": ["controller","restui","configuration","userExperienceAppIntegration","businessTransactionEumCorrelation","saveConfiguration","{{application}}"],
"query": []
},
"description": ""
}
}]},{"name": "event","item": [{
"name": "Create an event.",
"request": {
Expand Down
9 changes: 9 additions & 0 deletions recipes/disable_all_correlation_cookies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
ENVIRONMENT=$1
EXISTING_APPLICATION_IDS=$(../act.sh -E "${ENVIRONMENT}" application list | grep "<id>" | sed "s# *<id>\([^<]*\)</id>#\1#g")

for APPLICATION in $EXISTING_APPLICATION_IDS
do
echo "Disable correlation cookies for ${APPLICATION}"
../act.sh -E "${ENVIRONMENT}" eumCorrelation disable "${APPLICATION}"
done;

0 comments on commit 46684e3

Please sign in to comment.