Showing results for 
Show  only  | Search instead for 
Did you mean: 

Authetication snippet for Appmon 7 (Fetching data from REST )?


Hello there, I am trying to develop a task plugin that involves the fetching the data from the REST URL on port 8021. Pl. see the sample java snippet that does it.

I have have always used this snippet for authentication required while fetching data from the DT Server in APPMON 6.x

However, this snippet does not works with new Appmon 7.

I believe something has been changed in appmon 7 authentication which is why auth snippet is causing the Java Security handshake error.

        // System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
// Before opening URL stream basic HTML authentication is required for
// dynatrace REST
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password.toCharArray());

Can you please suggest why I am getting security exception? What is missing here?

Regards, Rajesh


Dynatrace Pro
Dynatrace Pro

Hi Rajesh,

Bsaed on the bottom output of your snippet, the problem resides on establishing the SSL communication.
What java version are you using? Some java versions do not support all SSL algorithms.

I could not test what ciphers AppMon 7.0 support, but you can do this test with nmap, as described here:
My guess, would be (only) TLSv1.2.

Maybe you can try uncommenting the line

// System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");

To see whether that enables a known cipher to establish the communication.

Let me know,