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

Bespoke plugin failing

psingleton2
Inactive

Dynatrace created a plugin for us called Slow DB Keeper but this has been failing since we moved the application and DT across to our DR site.

When I look at the log I see the following:
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] READING CONFIGURATION...
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dtServer="localhost"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — btDashboardName="Slow DB Queries - BT"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dbppDashboardName="Slow DB Queries - DB-PP"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — btName="Slow DB Queries"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — threshold="20000.0"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — taskFreqMin="5"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] ------ epochStart="1471614011284"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] ------ epochEnd="1471614311284"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dbServer="removed\removed"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dbPort="removed"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dbName="removed"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] — dbTable="removed"
2016-08-19 14:45:11 INFO [SlowDBKeeper@New Slow DB Keeper] READING CONFIGURATION FINISHED!
2016-08-19 14:45:11 FINER [SlowDBKeeper@New Slow DB Keeper] OPENING BT DASHBOARD:http://localhost:8020/rest/management/dashboard/Slow%20DB%20Queries%20-%20BT?filter=tf:CustomTimefra...
2016-08-19 14:45:11 FINER [SlowDBKeeper@New Slow DB Keeper] — HTTP 403
2016-08-19 14:45:11 SEVERE [SlowDBKeeper@New Slow DB Keeper] Server returned HTTP response code: 403 for URL:http://localhost:8020/rest/management/dashboard/Slow%20DB%20Queries%20-%20BT?filter=tf:CustomTimefra...

When I tried calling the report direct in IE it complained about the certificate. Once I accepted the certificate in IE, and entered the credentials, the report worked fine in IE.

Initial Dynatrace response was:

The issue is suspected to be caused by a change of the protocol from HTTP to HTTPS (and authentication) in Dynatrace 6.3.

To regain compatibility, the following is suggested:

  • Changing the default settings of the REST API and enabling HTTP access (seehttps://community.dynatrace.com/community/display/DOCDT63/Server+REST+Interfaces)
  • OR updating all HTTP links to HTTPS in the plugin source code (+recompilation) and using an appropriate certificate for the REST API (re-compilation can be done using the built-in plugin PDK in the DT client)
    (Updating links to HTTPS might be unnecessary when there is automatic HTTP to HTTPS redirection but I would recommend this change nonetheless.)

If we were to progress the 2nd option would we simply need to do the following (apologies most of this is new to me):

1) Change the following 2 dashboard url entries by changing http to https and the port from 8020 to 8021 in the checked out source file (..\Slow_DB_Keeper\src\com\dynatrace\SlowDBKeeper.java) and then rebuild this plugin from the DT Client:

//Prepare URLs for HTTP access
btDashboardUrl = new URL("http://" + dtServer + ":8020/rest/management/dashboard/" + URLEncoder.encode(btDashboardName,"UTF-8").replace("+", "%20") + "?filter=tf:CustomTimeframe?" + epochStart + ":" + epochEnd);
dbppDashboardUrl = new URL("http://" + dtServer + ":8020/rest/management/dashboard/" + URLEncoder.encode(dbppDashboardName,"UTF-8").replace("+", "%20") + "?filter=tf:CustomTimeframe?" + epochStart + ":" + epochEnd);
basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary((dtUsername+":"+dtPassword).getBytes());

These are the only 2 dashboards used by the Plugin.

2) Create a self signed certificate and deploy to all components. Is this done via the method shown in the attached screenshot? cert-mgt.png Also, how do I connect the "memory analysis server" to resolve the issue shown in the screenshot?

6 REPLIES 6

ahmed_el_jafouf
Dynatrace Pro
Dynatrace Pro

Hi Paul -- Let me have a look at this plugin. You are running Dynatrace Application Monitoring Server 6.3.4, is that correct?

Yes 6.3.4 is correct. I attached the plugin to the now closed support ticket. Let me know if you have a copy or you need me to send it to you.

Hi Paul -- I have a local copy that I can do testing on. I will get back to you shortly.

Hi Ahmed

I'm on site today and we have fixed it. In 6.3 there is a setting that forces authentication via HTTPS even when connecting to HTTP. I disabled it and it is working fine.

Actually not 100% because, the DT server was failed over and there might not be a fail over database so when it is writing to the DB it is currently failing. Paul is looking into it.

Thanks for your help!

Flo

Hi Flo, that was a fix I proposed in SUPDT-24122. Nice to see that it is working. Thanks!

ahmed_el_jafouf
Dynatrace Pro
Dynatrace Pro


The plugin you are using was developed for Dynatrace AppMon 6.0. You are now using Dynatrace AppMon 6.3 which has changes compared to previous versions when it comes to default settings of REST API access. More specifically, access related to HTTP vs. HTTPS as noted in the documentation:

Since Dynatrace 6.3 all pages and services requiring authentication are by default only available if HTTPS is used. This default setting can be changed within Webserver Management, but it's not recommended! The certificates used for HTTPS can be configured within Certificate Management.


Source: https://community.dynatrace.com/community/display...


To make your plugin work, you either need to modify it to work with HTTPS (recommended) or uncheck the option below in Settings > Dynatrace Server > Services > Management



Finally, I noticed the plugin parsing of the XML report is failing because in Dynatrace AppMon 6.3 the element name "dbsource_pool" is changed to "'dbsource_sql". This needs to be modified in the plugin as well.