Giter Club home page Giter Club logo

api-commandline-tool's People

Contributors

astoklas avatar evanwetstone avatar kentonself-appdynamics avatar matthias-huber avatar merriamt avatar michaelenglert avatar nomorecli avatar quackered avatar riesgo avatar ruperthair avatar simo14 avatar svrnm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-commandline-tool's Issues

list service endpoints returns configurations and not actual list of SEPs

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

"bt rename" returns 404, seems to be wrong URL.

$ ./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>

Login not working

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

Event create doesn't work

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"

Is there a way to delete Service Endpoints using the API

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?

Feature request: import/export Information Points.

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

Unable to call adc.sh with Application parameter

Hi,

When I call adc.sh to have the BT list there is an error message: illegal option -- A and Unknown command

The failed command is: ./adc.sh -A Tomcat_Mac bt list

Any idea?

See screenshot below
screen shot 2018-03-09 at 15 12 36

Disable Agent action prompts for password and fails searching for non-existent file appdynamics-controller-cookie.txt

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

bash/echo is printing escaped response

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

There is no update for the sub-command dbmon

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"

How to export and import applications between controllers ?

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 we add an update policy API ?

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

Commands are not executed after successful authentication due to false verification of the login response

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:

  • check only for 200 if this clearly indicates that the authentication was successful
  • verify other content. Maybe the existence of a JSESSIONID?

No Application?

Will the calls work if there isn't an Application configured?

HTTP 500 on ./act.sh licenserule list

Hello,

I have systematically a HTTP 500 error when I call /act.sh licenserule list.

I use the latest release of act (date: 13 February 2020)
The Controller version is 4.5.16.2261

Capture d’écran 2020-02-13 à 17 33 41

get_node_extrainfo.sh recipe doesn't return any data when using LEVEL '0'

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.

How to import Service Endpoints

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

Ability to export Custom Metrics

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.