Skip to content

Commit

Permalink
Changes in last development (intermediate checkin)
Browse files Browse the repository at this point in the history
Note: Very early checkin for Counter Collector Configuration from DbxCentral Web UI

Generic
 * NO-GUI now starts a Management Web Server (localhost:89##), so we can do some management of configuration etc from DbxCentral web ui
   Note: This is still in development...
 * Added extra "Graph Properties", so individual graphs can set "sampleType" to other than "AUTO" (for example Disk Space Available can have MIN_OVER_SAMPLES)
 * Updated libraries
   * Jetty web server 9.4.53 2023-10-09
   * MySQL    JDBC driver 8.2.0
   * Postgres JDBC driver 42.6.0
   * mssql    JDBC driver 12.5.0 SNAPSHOT

DbxCentral
 * Added "Exception handler" to intercept some Exceptions and restart the server if they happens (like OutOfMemoryError and H2 'The database has been closed')
 * PCS JDBC Cleaner -- added some more trace statements to detect what oldest date that will be deleted

SqlServerTune
 * PCS Transfer new QueryStore tables for SQL Server 2022

PostgresTune
 * CmPgArchive -- new alarm: AlarmEventPgArchiveRate -- When 'archived_mb_last_hour' is greater than 1024 MB then do alarm (property 'CmPgArchive.alarm.system.if.archived_mb_last_hour.gt=##')

SQL Window
 * Changes for SQL Server JDBC Driver that supports message handler (new PR microsoft/mssql-jdbc#2251 hopefully soon merged)
   This enables us to see messages from long running statement that sends feedback messages (like 'BACKUP DATABASE ...' or 'RAISERROR ('...', 0, 1) WITH NOWAIT')
  • Loading branch information
goranschwarz committed Dec 11, 2023
1 parent c847a23 commit dc2b3d8
Show file tree
Hide file tree
Showing 137 changed files with 4,988 additions and 2,992 deletions.
12 changes: 8 additions & 4 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="test"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="lib" path="lib/dsparser.jar"/>
<classpathentry kind="lib" path="lib/jdbc_drivers/jtds-1.3.1.jar" sourcepath="3pp/jtds-1.3.1-src.zip">
<attributes>
Expand Down Expand Up @@ -118,15 +117,20 @@
<classpathentry kind="lib" path="lib/commons-text-1.9.jar" sourcepath="3pp/commons-text-1.9-sources.jar"/>
<classpathentry kind="lib" path="lib/jetty/geronimo-jaspi-2.0.0.jar"/>
<classpathentry kind="lib" path="lib/jetty/javax.security.auth.message-1.0.0.v201108011116.jar"/>
<classpathentry kind="lib" path="lib/jetty/javax.servlet-api-3.1.0.jar"/>
<classpathentry kind="lib" path="lib/jetty/javax.servlet-api-3.1.0.jar" sourcepath="C:/Users/goran/AppData/Local/Temp/.org.sf.feeling.decompiler1702070598402/source/javax.servlet-api-3.1.0-sources-1702158022404.jar"/>
<classpathentry kind="lib" path="lib/jconn42.jar"/>
<classpathentry kind="lib" path="lib/sql-formatter-2.0.3.jar" sourcepath="C:/Users/goran/AppData/Local/Temp/.org.sf.feeling.decompiler1645375698757/source/sql-formatter-2.0.3-sources.jar"/>
<classpathentry kind="lib" path="lib/h2-2.1.214.jar"/>
<classpathentry kind="lib" path="lib/jsqlparser-4.5.jar"/>
<classpathentry kind="lib" path="lib/simplemagic-1.17.jar" sourcepath="3pp/simplemagic-1.17-sources.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.2.7.jar" sourcepath="3pp/jsch-0.2.7-sources.jar"/>
<classpathentry kind="lib" path="lib/bcprov-jdk18on-1.72.jar" sourcepath="3pp/bcprov-jdk18on-1.72-sources.jar"/>
<classpathentry kind="lib" path="lib/jetty/jetty-all-9.4.51.v20230217-uber.jar"/>
<classpathentry kind="lib" path="lib/jdbc_drivers/mssql-jdbc-12.4.1.jre8.jar" sourcepath="3pp/mssql-jdbc-12.4.1.jre8-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_241"/>
<classpathentry kind="lib" path="lib/jdbc_drivers/mssql-jdbc-12.5.0-SNAPSHOT.jre8-preview.jar"/>
<classpathentry kind="lib" path="lib/jetty/jetty-all-9.4.53.v20231009-uber.jar">
<attributes>
<attribute name="javadoc_location" value="https://eclipse.dev/jetty/javadoc/jetty-9/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="classes"/>
</classpath>
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<fileset dir="lib" includes="*.jar"/>
<fileset dir="lib/jetty" includes="*.jar"/>
<fileset dir="lib/jdbc_drivers" includes="jconn4.jar"/>
<fileset dir="lib/jdbc_drivers" includes="mssql-jdbc-12.4.1.jre8.jar"/>
<fileset dir="lib/jdbc_drivers" includes="mssql-jdbc-12.5.0-SNAPSHOT.jre8-preview.jar"/>
<!--
<pathelement location="lib/"/>
<pathelement path="${java.class.path}/"/>
Expand Down
Binary file removed lib/jdbc_drivers/mssql-jdbc-12.4.1.jre8.jar
Binary file not shown.
Binary file not shown.
Binary file added lib/jdbc_drivers/mysql-connector-j-8.2.0.jar
Binary file not shown.
Binary file removed lib/jdbc_drivers/mysql-connector-java-8.0.25.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 28 additions & 6 deletions resources/WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,35 @@
<servlet-class>com.asetune.central.controllers.UserDefinedContentServlet</servlet-class>
</servlet>

<!--
<servlet>
<servlet-name>MgtProxyServlet</servlet-name>
<servlet-class>com.asetune.central.controllers.ccmgt.MgtProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MgtProxyServlet</servlet-name>
<url-pattern>/api/cc/mgt/*</url-pattern>
</servlet-mapping>
-->
<!-- ============================================================ -->
<servlet>
<servlet-name>ProxyConfigGetServlet</servlet-name>
<servlet-class>com.asetune.central.controllers.ccmgt.ProxyConfigGetServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ProxyConfigGetServlet</servlet-name>
<url-pattern>/api/cc/mgt/config/get</url-pattern>
</servlet-mapping>


<!-- ============================================================ -->
<servlet>
<servlet-name>ProxyConfigSetServlet</servlet-name>
<servlet-class>com.asetune.central.controllers.ccmgt.ProxyConfigSetServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ProxyConfigSetServlet</servlet-name>
<url-pattern>/api/cc/mgt/config/set</url-pattern>
</servlet-mapping>



Expand Down Expand Up @@ -361,11 +388,6 @@
<url-pattern>/api/history-active-samples</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>UserDefinedContentServlet</servlet-name>
<url-pattern>/api/udc</url-pattern>
</servlet-mapping>


<!--
<servlet id="jsp">
Expand Down
94 changes: 93 additions & 1 deletion resources/WebContent/admin/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,36 @@ <h5 class='card-header'>Graph Profiles - What Graphs should be visible</h5>
</div> <!-- end: card-body -->
</div> <!-- end: card -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Counter Collector - REFRESH -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div id='dbx-cc-refresh' class='card border-dark mb-3'>
<h5 class='card-header'>Counter Collector - Refresh (send a message the collector to go to work and refresh counters)</h5>
<div class='card-body'>

<b>Refresh</b> any of the below Counter Collectors
<div id="dbx-cc-refresh-server-list">
<button type="button" class="btn btn-sm btn-primary">Loading server list <i class='fa fa-spinner fa-spin '></i></button>
</div>

</div> <!-- end: card-body -->
</div> <!-- end: card -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Counter Collector - RESTART -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div id='dbx-cc-restart' class='card border-dark mb-3'>
<h5 class='card-header'>Counter Collector - Restart (send a message the collector to restart)</h5>
<div class='card-body'>

<b>Restart</b> any of the below Counter Collectors
<div id="dbx-cc-restart-server-list">
<button type="button" class="btn btn-sm btn-primary">Loading server list <i class='fa fa-spinner fa-spin '></i></button>
</div>

</div> <!-- end: card-body -->
</div> <!-- end: card -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- DBMS Alarm Admin -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down Expand Up @@ -1130,7 +1160,7 @@ <h5 class='modal-title' id='dbx-dsr-skip-dialog-title'>Add Daily Summary Report
}

/**
* remove Server
* clearActiveAlarms
*/
function clearActiveAlarms(serverName)
{
Expand Down Expand Up @@ -1162,6 +1192,60 @@ <h5 class='modal-title' id='dbx-dsr-skip-dialog-title'>Add Daily Summary Report
}


/**
* refreshCc
*/
function refreshCc(serverName)
{
console.log("refreshCm() serverName: "+serverName);
$.ajax(
{
url: "/admin?op=refreshCc&name="+serverName,
type: 'get',
//async: false, // to call it one by one (async: true = spawn away a bunch of them in the background)

success: function(data, status)
{
var jsonResp = JSON.parse(data);
var actions = jsonResp.actions;
console.log("actions: "+actions, actions);
},
error: function(xhr, desc, err)
{
console.log(xhr);
console.log("Details: " + desc + "\nError: " + err);
}
}); // end: ajax call
}


/**
* restartCc
*/
function restartCc(serverName)
{
console.log("restartCm() serverName: "+serverName);
$.ajax(
{
url: "/admin?op=restartCc&name="+serverName,
type: 'get',
//async: false, // to call it one by one (async: true = spawn away a bunch of them in the background)

success: function(data, status)
{
var jsonResp = JSON.parse(data);
var actions = jsonResp.actions;
console.log("actions: "+actions, actions);
},
error: function(xhr, desc, err)
{
console.log(xhr);
console.log("Details: " + desc + "\nError: " + err);
}
}); // end: ajax call
}


/**
* logout from basic authentication...
* simply make a "dummy" call with a not existing user
Expand Down Expand Up @@ -1239,6 +1323,8 @@ <h5 class='modal-title' id='dbx-dsr-skip-dialog-title'>Add Daily Summary Report
var htmlRemove = "";
var htmlEnable = "";
var htmlDisable = "";
var htmlRefreshCc = "";
var htmlRestartCc = "";
var htmlClearAlarm = "";
for (var i=0; i<jsonResp.length; i++)
{
Expand Down Expand Up @@ -1275,6 +1361,9 @@ <h5 class='modal-title' id='dbx-dsr-skip-dialog-title'>Add Daily Summary Report
else
htmlDisable += '<span data-toggle="tooltip" data-placement="top" data-html="true" title="'+tt+'"><button type="button" class="btn btn-sm btn-primary '+dbxButtonImage+' mb-2 mr-2" onclick=\'setServerStatus("disable", "'+entry.serverName+'")\'>'+entry.serverName+'</button></span>';

htmlRefreshCc += '<span data-toggle="tooltip" data-placement="top" data-html="true" title="'+tt+'"><button type="button" class="btn btn-sm btn-primary '+dbxButtonImage+' mb-2 mr-2" onclick=\'refreshCc("'+entry.serverName+'")\'>'+entry.serverName+'</button></span>';
htmlRestartCc += '<span data-toggle="tooltip" data-placement="top" data-html="true" title="'+tt+'"><button type="button" class="btn btn-sm btn-primary '+dbxButtonImage+' mb-2 mr-2" onclick=\'restartCc("'+entry.serverName+'")\'>'+entry.serverName+'</button></span>';

htmlClearAlarm += '<span data-toggle="tooltip" data-placement="top" data-html="true" title="'+tt+'"><button type="button" class="btn btn-sm btn-primary '+dbxButtonImage+' mb-2 mr-2" onclick=\'clearActiveAlarms("'+entry.serverName+'")\'>'+entry.serverName+'</button></span>';
}
if (htmlRemove === "") htmlRemove = '<button type="button" class="btn btn-sm btn-primary mb-2 mr-2">NO-SERVERS-HAS-YET-BEEN-ADDED</button>';
Expand All @@ -1285,6 +1374,9 @@ <h5 class='modal-title' id='dbx-dsr-skip-dialog-title'>Add Daily Summary Report
$('#dbx-disable-server-list').html(htmlDisable);
$('#dbx-enable-server-list').html(htmlEnable);

$('#dbx-refresh-server-list').html(htmlRefreshCc);
$('#dbx-restart-server-list').html(htmlRestartCc);

$('#dbx-alarm-clear-server-list').html(htmlClearAlarm);

// Enable bootstrap tooltip...
Expand Down
Loading

0 comments on commit dc2b3d8

Please sign in to comment.