Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Manage custom analytics metrics
| Command | Description | Example |
| ------- | ----------- | ------- |
| create | Create analytics metric Provide an adql query (-q) and an event type (-e BROWSER_RECORD, BIZ_TXN) and a name (-n) as parameters. The description (-d) is optional. | `act.sh analyticsmetric create -q 'SELECT count(*) FROM browser_records' -e BROWSER_RECORD -n 'My Custom Metric'` |
| list | List all analytics metrics | `act.sh analyticsmetric list ` |


## analyticsschema
Expand Down
4 changes: 3 additions & 1 deletion act.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
ACT_VERSION="v22.11.0"
ACT_LAST_COMMIT="103026d3b4e9e8ceaa6cf3aa667df94d3888453a"
ACT_LAST_COMMIT="739b80a0fcafeb3692d154d578257146850db9f7"
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 @@ -123,6 +123,8 @@ Manage custom analytics metrics
EOF
analyticsmetric_create() { apiCall -X POST -d '{"adqlQueryString":"{{q:query}}","eventType":"{{e:eventType}}","enabled":true,"queryType":"ADQL_QUERY","queryName":"{{n:queryname}}","queryDescription":"{{d:querydescription?}}"}' '/controller/restui/analyticsMetric/create' "$@" ; }
rde analyticsmetric_create "Create analytics metric" "Provide an adql query (-q) and an event type (-e BROWSER_RECORD, BIZ_TXN) and a name (-n) as parameters. The description (-d) is optional." "-q 'SELECT count(*) FROM browser_records' -e BROWSER_RECORD -n 'My Custom Metric'"
analyticsmetric_list() { apiCall '/controller/restui/analyticsMetric/getAnalyticsScheduledQueryReports' "$@" ; }
rde analyticsmetric_list "List all analytics metrics" "" ""
doc analyticsschema << EOF
These commands allow you to manage analytics schemas.
EOF
Expand Down
6 changes: 6 additions & 0 deletions commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ analyticsmetric:
method: POST
endpoint: /controller/restui/analyticsMetric/create
payload: {\"adqlQueryString\":\"{{q:query}}\",\"eventType\":\"{{e:eventType}}\",\"enabled\":true,\"queryType\":\"ADQL_QUERY\",\"queryName\":\"{{n:queryname}}\",\"queryDescription\":\"{{d:querydescription?}}\"}
list:
title: List all analytics metrics
description:
example:
method: GET
endpoint: /controller/restui/analyticsMetric/getAnalyticsScheduledQueryReports
analyticsschema:
title: Analytics Schemas
description: These commands allow you to manage analytics schemas.
Expand Down
30 changes: 30 additions & 0 deletions postman-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,36 @@
},
"description": "Provide an adql query (-q) and an event type (-e BROWSER_RECORD, BIZ_TXN) and a name (-n) as parameters. The description (-d) is optional."
}
},{
"name": "List all analytics metrics",
"request": {
"method": "GET",
"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": ""
},
"url": {
"raw": "{{controller_host}}/controller/restui/analyticsMetric/getAnalyticsScheduledQueryReports",
"host": [
"{{controller_host}}"
],
"path": ["controller","restui","analyticsMetric","getAnalyticsScheduledQueryReports"],
"query": []
},
"description": ""
}
}]},{"name": "analyticsschema","item": [{
"name": "List all analytics schemas.",
"request": {
Expand Down