I am running a sample python app, instrumented it to run using
$pyagent run -c /etc/appdynamics.cfg -- gunicorn -b 0.0.0.0:9000 index:app
And then read the output using curl command
$curl http://localhost:9000
It outputs “Hello, World"
Now I want to monitor the AppD status/report out of the app, so I use the controller API command
$curl --user <your_username>@<your_accountname>:<your_password> http://<SaaS_url>/controller/rest/applications?output-JSON
This command runs without any error but I do not see any output in the terminal.
What am I missing?
I am running a sample python app, instrumented it to run using
$pyagent run -c /etc/appdynamics.cfg -- gunicorn -b 0.0.0.0:9000 index:app
And then read the output using curl command
$curl http://localhost:9000
It outputs “Hello, World"
Now I want to monitor the AppD status/report out of the app, so I use the controller API command
$curl --user <your_username>@<your_accountname>:<your_password> http://<SaaS_url>/controller/rest/applications?output-JSON
This command runs without any error but I do not see any output in the terminal.
What am I missing?
Hi ,
Could you please share the output of below command to debug the issue
$curl -v --user <your_username>@<your_accountname>:<your_password> http://<SaaS_url>/controller/rest/applications?output-JSON
Thanks,
Atyuha
here is the verbose. Looks like I am getting HTTP unauthorized
HTTP/1.1 401 Unauthorized
The entire trace
* Trying 199.83.131.156... * TCP_NODELAY set * Connected to lee2017090423304914.saas.appdynamics.com (199.83.131.156) port 443 (#0) * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * Server certificate: *.saas.appdynamics.com * Server certificate: DigiCert SHA2 Secure Server CA * Server certificate: DigiCert Global Root CA * Server auth using Basic with user 'nahalam@cisco.com@lee2017090423304914' > GET /controller/rest/applications?output=JSON HTTP/1.1 > Host: lee2017090423304914.saas.appdynamics.com > Authorization: Basic bmFoYWxhbUBjaXNjby5jb21AbGVlMjAxNzA5MDQyMzMwNDkxNDpzaGFwbGE5OTk= > User-Agent: curl/7.51.0 > Accept: */* > < HTTP/1.1 401 Unauthorized < Server: AppDynamics < Set-Cookie: JSESSIONID=ab588975661e06c8a94f5eaa9fc7; Path=/controller; HttpOnly;Secure * Authentication problem. Ignoring this. < WWW-Authenticate: BASIC realm="controller_realm" < Content-Length: 0 < Date: Tue, 19 Sep 2017 15:15:41 GMT < X-Varnish: 714042431 < Age: 0 < Via: 1.1 varnish < Connection: keep-alive < Set-Cookie: visid_incap_960362=U/rLxJzTRKKrvJ5TIvV7VZ00wVkAAAAAQUIPAAAAAABim0ODsX9DENhPIpAbsoc8; expires=Tue, 18 Sep 2018 19:12:46 GMT; path=/; Domain=.saas.appdynamics.com < Set-Cookie: nlbi_960362=xbNeRyM92E4euEkWwkr2DAAAAAB7msGBKjbloA6sTg3qgIbn; path=/; Domain=.saas.appdynamics.com < Set-Cookie: incap_ses_499_960362=vi5QKJGuMAJgfU2lT87sBp00wVkAAAAAGA3uF2BOaQkD99JRLSYMrg==; path=/; Domain=.saas.appdynamics.com < X-Iinfo: 5-51586742-51586753 NNNN CT(0 0 0) RT(1505834141608 60) q(0 0 0 1) r(1 1) U16 < X-CDN: Incapsula < * Curl_http_done: called premature == 0 * Connection #0 to host lee2017090423304914.saas.appdynamics.com left intact
Hi,
Could you plesae make sure the credentials you are passing are correct as we are getting unauthorized error.
Thanks,
Atyuha
I am using below command
curl --user nahalam@cisco.com@lee2017090423304914:<MYPASSWORD>https://lee2017090423304914.saas.appdynamics.com/controller/rest/applications?output=JSON
I know the password and username = nahalam@cisco.com is right because I can login to the system using those. Also I got email from AppD that says account name so that is correct too.
Account Name: lee2017090423304914
Is this issue resolved? I am also getting the same issue. If anyone can help me on this.