appdynamics / api-commandline-tool Goto Github PK
View Code? Open in Web Editor NEWAppDynamics Command Line Tool
License: Apache License 2.0
AppDynamics Command Line Tool
License: Apache License 2.0
Trying to get the list of all the SEPs in an application , but the list command returns SEP configuration, was expecting all the SEPs detected instead.
act.sh -E saas-prod sep list -a 2973 | jq . { "applicationId": "2973", "applicationName": "AIQ-HomePoint", "sepContainer": [ { "entityType": "APPLICATION", "entityId": "2973", "agentType": "DOT_NET_APP_AGENT", "override": true }, { "entityType": "APPLICATION", "entityId": "2973", "agentType": "NODEJS_APP_AGENT", "override": true }, { "entityType": "APPLICATION", "entityId": "2973", "agentType": "PHP_APP_AGENT", "override": true }, { "entityType": "APPLICATION", "entityId": "2973", "agentType": "APP_AGENT", "override": true, "sEPMatchPointConfigs": [ { "id": "20817", "name": "EJB", "enabled": false, "entryPointType": "EJB", "namingSchemeType": "EJB_NAME_AND_METHOD_NAME" }, { "id": "20813", "name": "JMS", "enabled": true, "entryPointType": "JMS", "namingSchemeType": "DESTINATION_NAME" }, { "id": "20814", "name": "POJO", "enabled": true, "entryPointType": "POJO", "namingSchemeType": "FULLY_QUALIFIED_CLASS_NAME" }, { "id": "20816", "name": "SERVLET", "enabled": false, "entryPointType": "SERVLET", "namingSchemeType": "URI", "namingSchemeProperties": "uri-length;first-n-segments;segment-length;2;" }, { "id": "20812", "name": "SPRING_BEAN", "enabled": false, "entryPointType": "SPRING_BEAN", "namingSchemeType": "BEAN_ID_AND_METHOD_NAME" }, { "id": "20815", "name": "STRUTS_ACTION", "enabled": true, "entryPointType": "STRUTS_ACTION", "namingSchemeType": "ACTION_NAME_AND_METHOD_NAME" }, { "id": "20818", "name": "WEB_SERVICE", "enabled": true, "entryPointType": "WEB_SERVICE", "namingSchemeType": "SERVICE_NAME_AND_OPERATION_NAME" } ] } ], "actions": [ { "href": "http://elliemae-prod.saas.appdynamics.com/controller/api/accounts/56/applications/2973/sep", "method": [ "POST" ], "name": "SEP_CREATE_UPDATE" } ], "links": [ { "href": "http://elliemae-prod.saas.appdynamics.com/controller/api/accounts/56/applications/2973/sep/{tier.id}", "name": "sep" } ] }
@svrnm
$ ./act.sh bt rename -b 92204 -n ReanmeTestBT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>AppDynamics - Error report</title><style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Not Found</h1><hr/><p><b>type</b> Status report</p><p><b>message</b>Not Found</p><p><b>description</b>The requested resource is not available.</p><hr/><h3>AppDynamics</h3></body></html>
Provided the correct controller endpoint, uname/pwd for logging in via regular controller UI, but then when I try any commands, I get this below - what creates the "cookie.txt"?
jdice-mac:api-commandline-tool jeff.dice$ ./act.sh dashboard list
grep: /Users/jeff.dice/.appdynamics/act/cookie.txt: No such file or directory
Controller Login Error! Please check hostname and credentials
When I execute the command below, the controller sends an error message "Event severity is not specified...The request sent by the client was syntactically incorrect"
/home/ubuntu/api-commandline-tool/act.sh -H http://172.17.0.1:8090 -C admin@customer1:appdynamics event create -a 5 -s "Test" -l "INFO" -e "APPLICATION_DEPLOYMENT" "Create application deployment"
We're trying to clean-up service endpoints that are detected by default service endpoints detection rules, but the UI for service endpoint doesn't allow group selection or select more than one service endpoint at a time to delete them.
Checking if we've a method to bulk delete the SEPs by passing the id's or delete all existing SEPs for an application?
Hi team,
I'd like to ask for a feature in which we could export and import Information Points Configuration, using the API of ConfigExporter.
Please let me know if there is more information required.
Thanks,
Łukasz
Please kindly help to share the commands to import the healthrule by json format? Many thanks.
I setup the controller profile and ran certain actions, which worked fine (example list agent ids, applications, create applications) , but when I try to disable agents, I get the following prompt
/opt/appd-utils/act.sh agents disable -i 469397
Enter host password for user '':
grep: /tmp/appdynamics-controller-cookie.txt: No such file or directory
profile info
/root/.appdynamics/act
cat config.saas-nonprod.sh
CONFIG_CONTROLLER_HOST=https://***.saas.appdynamics.com
CONFIG_CONTROLLER_CREDENTIALS=*****-@:
CONFIG_CONTROLLER_COOKIE_LOCATION=/root/.appdynamics/act/cookie.txt
CONFIG_USER_PLUGIN_DIRECTORY=/root/.appdynamics/act/plugins
CONFIG_PORTAL_CREDENTIALS=
For security reasons, masked controller information and credentials
Hi there.
I've stumbled across an issue with json responses that contain escaped strings, whereby echo is interpreting the escape, rather than just printing the response.
for example:
when you call the restui for the transaction rules /controller/restui/transactionConfigProto/getRules/32
on a new application with the default transaction rules such as "Python Static Content Filter" which contain the regex "robots.txt|.*\\.(js|css|png|gif|jpg|jpeg|ico)$"
the curl response is correct, but echo prints it as "robots.txt|.*\.(js|css|png|gif|jpg|jpeg|ico)$"
which is not valid json, ie it does not parse with jq
poking around the web says that this might be bash/echo implementation specific. I've tested this on my local osx and also in a amazon 2 linux.
Any hints muchly appreciated...
Also.. on the off chance - how do you all go about 'cloning' an appd application into another application on the same controller. ie. we have a 'test' controller and the company has many test environments all pointing to their own appd applications. this makes a nightmare for configuration management of bts, analytics metrics when trying to keep it all in sync.
Thanks heaps
The USAGE file says:
Use the Database Visibility API to get, create, update, and delete Database Visibility Collectors.
However, there is no update sub-command. I've added the following two lines to act.sh to add the missing sub-command:
dbmon_update() { apiCall -X POST -d '{{d:database_collector_definition}}' '/controller/rest/databases/collectors/update' "$@" ; }
rde dbmon_update "Update a collector." "Provide a json string or a @file (-d) as parameter." "-d @collector.json"
Going through this amazing tool with several options.
We're migrating to a new controller machine and wanted to explore options on how to export and import applications between the controllers ?
We want to atleast start with exporting list of applications from controller A and then import the list of applications in Controller B.
Any insights will help, while I keep exploring the tool more.
Thanks
Can this work with SSO?
Currently, there are APIs to export and import alert policies. The import policy API does a POST call to create a new policy , however if users want to update existing policy to add/delete new eventTypes, then it has to be either done manually or use the
controller V1 API controller/alerting/rest/v1/applications/{applicationID}/policies/{policyID}
, which is not very handy.
The V1 API requires mandatory fields regardless, if those fields were present in the original policy.
Additionally, the GET policy call in V1 API doesn't return the healthRuleScope , but it mandatorily requires users to pass that field with values when updating the policy, in this case users are better off using the controller UI to update alert policies, but challenging when we have to update hundreds of policies.
So, checking if we can add Update alert policy to the act.sh
The if statement
if [[ "${LOGIN_RESPONSE/200 OK}" != "${LOGIN_RESPONSE}" ]]; then
does not work as intended for the response with content HTTP/2 200
Skript execution fails with the error message: "Controller Login Error! Please check hostname and credentials"
Alternatives:
Will the calls work if there isn't an Application configured?
Postman Import from Link failing with Error while importing: format not recognized
Link: https://raw.githubusercontent.com/Appdynamics/api-commandline-tool/master/postman-collection.json
Import failed.
Postman-win64-7.2.2-Setup.exe
Hi, the tool is good and it's helping me a lot to retrieve data from the metric in appd using "metric get". However, may i know how to retrieve data from specific time range? thanks!
./act.sh dashboard list
grep: /home/mobaxterm/.appdynamics/act/cookie.txt: No such file or directory
Controller Login Error! Please check hostname and credentials
This command with same credentials works ok:
curl -k --basic --user user@account:password https://myinstancename.saas.appdynamics.com/controller/rest/applications?output-J
Any Ideas how to fix this?
Hi @QuaCKeReD
Thanks for developing the script to extract detailed Node info. However, we've been trying to get the nodes info at controller level and running into issues, as it returns an empty data set.
https://github.com/Appdynamics/api-commandline-tool/blob/master/recipes/get_node_extrainfo.sh
./get_node_extrainfo.sh -E saas-nonprod -L 1 ENVIRONMENT: saas-nonprod | LEVEL: 1 | APP_ID: | SOURCE: 0 | DEST: 0 appId,appName,nodeId,nodeName,tierName,machineName,machineOSType,machineAgentVersion,appAgentVersion,agentType,jvmVersion,appServerRestartDate
Running the command with application Id returns expected data
./get_node_extrainfo.sh -E saas-prod -A 4087 ENVIRONMENT: saas-prod | LEVEL: 0 | APP_ID: 4087 | SOURCE: 0 | DEST: 0 appId,appName,nodeId,nodeName,tierName,machineName,machineOSType,machineAgentVersion,appAgentVersion,agentType,jvmVersion,appServerRestartDate 4087,**-***,800829,10.10.119.11,JMS,***-***-***,Windows,false,Server Agent #20.10.0.31173 v20.10.0 GA compatible with 4.4.1.0 r29ff7e90931b7171bbfd8336067028701025517a release/20.10.0,APP_AGENT,"Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 Oracle Corporation",1638685355644
Masked some information for security purposes in the above output.
The shell script provides the command to list service endpoints. It seems to me that it lists both 'Automatic Service Endpoint Detection' and 'Custom Service Endpoints'.
I could not find a command that allows to import the service endpoints. Any ideas how to do that? Haven't found a rest api on the offical appdynamics documentation
Hi.
I wanted to have the option to export and import my custom analytics queries.
currently the only supported parameter is to create a custom analytics metric. Is there a workaround for it?
Currently, access is stored as user@customer:password
, and calls with header values to match.
API Clients requires the header to pass bearer
values, using access tokens obtained via OAuth.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.