Repository: jhipster/generator-jhipster
Pull request #8812 (2018-11-13 09:14:35)

Switch to micrometer (WIP)

-   [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green
-   [ ] Tests are added where necessary
-   [ ] Documentation is added/updated where necessary
-   [ ] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed



Patch:
diff --git a/generators/client/files-angular.js b/generators/client/files-angular.js
index 7045933650..393472ffb8 100644
--- a/generators/client/files-angular.js
+++ b/generators/client/files-angular.js
@@ -278,8 +278,6 @@ const files = {
                 { file: 'admin/metrics/metrics.route.ts', method: 'processJs' },
                 { file: 'admin/metrics/metrics.component.ts', method: 'processJs' },
                 { file: 'admin/metrics/metrics.component.html', method: 'processHtml', template: true },
-                'admin/metrics/metrics-modal.component.ts',
-                { file: 'admin/metrics/metrics-modal.component.html', method: 'processHtml', template: true },
                 'admin/metrics/metrics.service.ts'
             ]
         },
@@ -435,7 +433,6 @@ const files = {
                 'spec/app/admin/logs/logs.service.spec.ts',
                 'spec/app/admin/metrics/metrics.component.spec.ts',
                 'spec/app/admin/metrics/metrics.service.spec.ts',
-                'spec/app/admin/metrics/metrics-modal.component.spec.ts',
                 'spec/app/core/user/account.service.spec.ts',
                 'spec/helpers/spyobject.ts',
                 'spec/helpers/mock-account.service.ts',
diff --git a/generators/client/files-react.js b/generators/client/files-react.js
index ff1a0573da..45019b4064 100644
--- a/generators/client/files-react.js
+++ b/generators/client/files-react.js
@@ -261,8 +261,6 @@ const files = {
                 { file: 'modules/administration/health/health-modal.tsx', method: 'processJsx' },
                 { file: 'modules/administration/logs/logs.tsx', method: 'processJsx' },
                 { file: 'modules/administration/metrics/metrics.tsx', method: 'processJsx' },
-                { file: 'modules/administration/metrics/metrics-modal.tsx', method: 'processJsx' },
-                { file: 'modules/administration/metrics/thread-item.tsx', method: 'processJsx' },
                 'modules/administration/administration.reducer.ts'
             ]
         },
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/admin.module.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/admin.module.ts.ejs
index 5e17624008..faa0a4979f 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/admin.module.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/admin.module.ts.ejs
@@ -37,7 +37,6 @@ import {
     UserMgmtDeleteDialogComponent,
     <%_ } _%>
     LogsComponent,
-    <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent,
     <%=jhiPrefixCapitalized%>MetricsMonitoringComponent,
     <%=jhiPrefixCapitalized%>HealthModalComponent,
     <%=jhiPrefixCapitalized%>HealthCheckComponent,
@@ -78,8 +77,7 @@ import {
         <%_ if (websocket === 'spring-websocket') { _%>
         <%=jhiPrefixCapitalized%>TrackerComponent,
         <%_ } _%>
-        <%=jhiPrefixCapitalized%>MetricsMonitoringComponent,
-        <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent
+        <%=jhiPrefixCapitalized%>MetricsMonitoringComponent
     ],
     <%_ if (enableTranslation) { _%>
     providers: [ { provide: JhiLanguageService, useClass: JhiLanguageService } ],
@@ -88,8 +86,7 @@ import {
         <%_ if (!skipUserManagement) { _%>
         UserMgmtDeleteDialogComponent,
         <%_ } _%>
-        <%=jhiPrefixCapitalized%>HealthModalComponent,
-        <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent,
+        <%=jhiPrefixCapitalized%>HealthModalComponent
     ],
     schemas: [CUSTOM_ELEMENTS_SCHEMA]
 })
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/index.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/index.ts.ejs
index 45c70790a5..3948ff8b27 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/index.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/index.ts.ejs
@@ -47,7 +47,6 @@ export * from './tracker/tracker.component';
 export * from './tracker/tracker.route';
 <%_ } _%>
 export * from './metrics/metrics.component';
-export * from './metrics/metrics-modal.component';
 export * from './metrics/metrics.service';
 export * from './metrics/metrics.route';
 <%_ if (!skipUserManagement) { _%>
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.html.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.html.ejs
deleted file mode 100644
index f294f1d138..0000000000
--- a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.html.ejs
+++ /dev/null
@@ -1,74 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-<!-- Modal used to display the threads dump -->
-<div class="modal-header">
-    <h4 class="modal-title" jhiTranslate="metrics.jvm.threads.dump.title">Threads dump</h4>
-    <button type="button" class="close" (click)="activeModal.dismiss('closed')">&times;</button>
-</div>
-<div class="modal-body">
-    <span class="badge badge-primary" (click)="threadDumpFilter = {}">All&nbsp;<span class="badge badge-pill badge-default">{{threadDumpAll}}</span></span>&nbsp;
-    <span class="badge badge-success" (click)="threadDumpFilter = {threadState: 'RUNNABLE'}">Runnable&nbsp;<span class="badge badge-pill badge-default">{{threadDumpRunnable}}</span></span>&nbsp;
-    <span class="badge badge-info" (click)="threadDumpFilter = {threadState: 'WAITING'}">Waiting&nbsp;<span class="badge badge-pill badge-default">{{threadDumpWaiting}}</span></span>&nbsp;
-    <span class="badge badge-warning" (click)="threadDumpFilter = {threadState: 'TIMED_WAITING'}">Timed Waiting&nbsp;<span class="badge badge-pill badge-default">{{threadDumpTimedWaiting}}</span></span>&nbsp;
-    <span class="badge badge-danger" (click)="threadDumpFilter = {threadState: 'BLOCKED'}">Blocked&nbsp;<span class="badge badge-pill badge-default">{{threadDumpBlocked}}</span></span>&nbsp;
-    <div class="mt-2">&nbsp;</div>
-    Filter
-    <input type="text" [(ngModel)]="threadDumpFilter" class="form-control">
-    <div class="pad" *ngFor="let entry of threadDump | pureFilter:threadDumpFilter:'lockName' | keys">
-        <h6>
-            <span class="badge" [ngClass]="getBadgeClass(entry.value.threadState)">{{entry.value.threadState}}</span>&nbsp;{{entry.value.threadName}} (ID {{entry.value.threadId}})
-            <a (click)="entry.show = !entry.show" href="javascript:void(0);">
-               <span [hidden]="entry.show" jhiTranslate="metrics.jvm.threads.dump.show">Show StackTrace</span>
-               <span [hidden]="!entry.show" jhiTranslate="metrics.jvm.threads.dump.hide">Hide StackTrace</span>
-            </a>
-        </h6>
-        <div class="card" [hidden]="!entry.show">
-            <div class="card-body">
-                <div *ngFor="let st of entry.value.stackTrace | keys" class="break">
-                    <samp>{{st.value.className}}.{{st.value.methodName}}(<code>{{st.value.fileName}}:{{st.value.lineNumber}}</code>)</samp>
-                    <span class="mt-1"></span>
-                </div>
-            </div>
-        </div>
-        <table class="table table-sm table-responsive">
-            <thead>
-                <tr>
-                    <th jhiTranslate="metrics.jvm.threads.dump.blockedtime">Blocked Time</th>
-                    <th jhiTranslate="metrics.jvm.threads.dump.blockedcount">Blocked Count</th>
-                    <th jhiTranslate="metrics.jvm.threads.dump.waitedtime">Waited Time</th>
-                    <th jhiTranslate="metrics.jvm.threads.dump.waitedcount">Waited Count</th>
-                    <th jhiTranslate="metrics.jvm.threads.dump.lockname">Lock Name</th>
-                </tr>
-            </thead>
-            <tbody>
-                <tr>
-                    <td>{{entry.value.blockedTime}}</td>
-                    <td>{{entry.value.blockedCount}}</td>
-                    <td>{{entry.value.waitedTime}}</td>
-                    <td>{{entry.value.waitedCount}}</td>
-                    <td class="thread-dump-modal-lock" title="{{entry.value.lockName}}"><code>{{entry.value.lockName}}</code></td>
-                </tr>
-            </tbody>
-        </table>
-
-    </div>
-</div>
-<div class="modal-footer">
-    <button type="button" class="btn btn-secondary float-left" data-dismiss="modal" (click)="activeModal.dismiss('closed')">Done</button>
-</div>
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.ts.ejs
deleted file mode 100644
index 40638cb86c..0000000000
--- a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics-modal.component.ts.ejs
+++ /dev/null
@@ -1,66 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-import { Component, OnInit } from '@angular/core';
-import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-
-@Component({
-    selector: '<%= jhiPrefixDashed %>-metrics-modal',
-    templateUrl: './metrics-modal.component.html'
-})
-export class <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent implements OnInit {
-
-    threadDumpFilter: any;
-    threadDump: any;
-    threadDumpAll = 0;
-    threadDumpBlocked = 0;
-    threadDumpRunnable = 0;
-    threadDumpTimedWaiting = 0;
-    threadDumpWaiting = 0;
-
-    constructor(public activeModal: NgbActiveModal) {}
-
-    ngOnInit() {
-        this.threadDump.forEach((value) => {
-            if (value.threadState === 'RUNNABLE') {
-                this.threadDumpRunnable += 1;
-            } else if (value.threadState === 'WAITING') {
-                this.threadDumpWaiting += 1;
-            } else if (value.threadState === 'TIMED_WAITING') {
-                this.threadDumpTimedWaiting += 1;
-            } else if (value.threadState === 'BLOCKED') {
-                this.threadDumpBlocked += 1;
-            }
-        });
-
-        this.threadDumpAll = this.threadDumpRunnable + this.threadDumpWaiting +
-            this.threadDumpTimedWaiting + this.threadDumpBlocked;
-    }
-
-    getBadgeClass(threadState) {
-        if (threadState === 'RUNNABLE') {
-            return 'badge-success';
-        } else if (threadState === 'WAITING') {
-            return 'badge-info';
-        } else if (threadState === 'TIMED_WAITING') {
-            return 'badge-warning';
-        } else if (threadState === 'BLOCKED') {
-            return 'badge-danger';
-        }
-    }
-}
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.html.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.html.ejs
index bcb291c8bf..88de8c66c7 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.html.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.html.ejs
@@ -26,248 +26,22 @@
 
     <h3 jhiTranslate="metrics.jvm.title">JVM Metrics</h3>
     <div class="row" *ngIf="!updatingMetrics">
-        <div class="col-md-4">
-            <b jhiTranslate="metrics.jvm.memory.title">Memory</b>
-            <p><span jhiTranslate="metrics.jvm.memory.total">Total Memory</span> ({{metrics.gauges['jvm.memory.total.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.total.max'].value / 1048576 | number:'1.0-0'}}M)</p>
-            <ngb-progressbar type="success" [max]="metrics.gauges['jvm.memory.total.max'].value" [value]="metrics.gauges['jvm.memory.total.used'].value" [striped]="true" [animated]="false">
-                <span>{{metrics.gauges['jvm.memory.total.used'].value * 100 / metrics.gauges['jvm.memory.total.max'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-            <p><span jhiTranslate="metrics.jvm.memory.heap">Heap Memory</span> ({{metrics.gauges['jvm.memory.heap.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.heap.max'].value / 1048576 | number:'1.0-0'}}M)</p>
-            <ngb-progressbar [max]="metrics.gauges['jvm.memory.heap.max'].value" [value]="metrics.gauges['jvm.memory.heap.used'].value" [striped]="true" [animated]="false" type="success">
-                <span>{{metrics.gauges['jvm.memory.heap.used'].value * 100 / metrics.gauges['jvm.memory.heap.max'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-            <p><span jhiTranslate="metrics.jvm.memory.nonheap">Non-Heap Memory</span> ({{metrics.gauges['jvm.memory.non-heap.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.non-heap.committed'].value / 1048576 | number:'1.0-0'}}M)</p>
-            <ngb-progressbar [max]="metrics.gauges['jvm.memory.non-heap.committed'].value" [value]="metrics.gauges['jvm.memory.non-heap.used'].value" [striped]="true" [animated]="false" type="success">
-                <span>{{metrics.gauges['jvm.memory.non-heap.used'].value * 100 / metrics.gauges['jvm.memory.non-heap.committed'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-        </div>
-        <div class="col-md-4">
-            <b jhiTranslate="metrics.jvm.threads.title">Threads</b> (Total: {{metrics.gauges['jvm.threads.count'].value}}) <a class="hand" (click)="refreshThreadDumpData()" data-toggle="modal" data-target="#threadDump"><fa-icon [icon]="'eye'"></fa-icon></a>
-            <p><span jhiTranslate="metrics.jvm.threads.runnable">Runnable</span> {{metrics.gauges['jvm.threads.runnable.count'].value}}</p>
-            <ngb-progressbar [value]="metrics.gauges['jvm.threads.runnable.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="success">
-                <span>{{metrics.gauges['jvm.threads.runnable.count'].value * 100 / metrics.gauges['jvm.threads.count'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-            <p><span jhiTranslate="metrics.jvm.threads.timedwaiting">Timed Waiting</span> ({{metrics.gauges['jvm.threads.timed_waiting.count'].value}})</p>
-            <ngb-progressbar [value]="metrics.gauges['jvm.threads.timed_waiting.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="warning">
-                <span>{{metrics.gauges['jvm.threads.timed_waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-            <p><span jhiTranslate="metrics.jvm.threads.waiting">Waiting</span> ({{metrics.gauges['jvm.threads.waiting.count'].value}})</p>
-            <ngb-progressbar [value]="metrics.gauges['jvm.threads.waiting.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="warning">
-                <span>{{metrics.gauges['jvm.threads.waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-            <p><span jhiTranslate="metrics.jvm.threads.blocked">Blocked</span> ({{metrics.gauges['jvm.threads.blocked.count'].value}})</p>
-            <ngb-progressbar [value]="metrics.gauges['jvm.threads.blocked.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="success">
-                <span>{{metrics.gauges['jvm.threads.blocked.count'].value * 100 / metrics.gauges['jvm.threads.count'].value  | number:'1.0-0'}}%</span>
-            </ngb-progressbar>
-        </div>
-        <div class="col-md-4">
-            <b jhiTranslate="metrics.jvm.gc.title">Garbage collections</b>
-            <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-MarkSweep.count']">
-                <div class="col-md-9" jhiTranslate="metrics.jvm.gc.marksweepcount">Mark Sweep count</div>
-                <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-MarkSweep.count'].value}}</div>
-            </div>
-            <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-MarkSweep.time']">
-                <div class="col-md-9" jhiTranslate="metrics.jvm.gc.marksweeptime">Mark Sweep time</div>
-                <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-MarkSweep.time'].value}}ms</div>
-            </div>
-            <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-Scavenge.count']">
-                <div class="col-md-9" jhiTranslate="metrics.jvm.gc.scavengecount">Scavenge count</div>
-                <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-Scavenge.count'].value}}</div>
-            </div>
-            <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-Scavenge.time']">
-                <div class="col-md-9" jhiTranslate="metrics.jvm.gc.scavengetime">Scavenge time</div>
-                <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-Scavenge.time'].value}}ms</div>
-            </div>
-        </div>
+        <jhi-jvm-memory class="col-md-4" [updating]="updatingMetrics" [jvmMemoryMetrics]="metrics.jvm"></jhi-jvm-memory>
+        <jhi-jvm-threads class="col-md-4" [threadData]="threadData"></jhi-jvm-threads>
+        <jhi-metrics-system class="col-md-4" [updating]="updatingMetrics" [systemMetrics]="metrics.processMetrics"></jhi-metrics-system>
     </div>
+
+    <h3 jhiTranslate="metrics.jvm.gc.title">Garbage collector statistics</h3>
+    <jhi-metrics-garbagecollector [updating]="updatingMetrics" [garbageCollectorMetrics]="metrics.garbageCollector"></jhi-metrics-garbagecollector>
+
     <div class="well well-lg" *ngIf="updatingMetrics" jhiTranslate="metrics.updating">Updating...</div>
 
-    <h3 jhiTranslate="metrics.jvm.http.title">HTTP requests (events per second)</h3>
-    <p *ngIf="metrics.counters">
-        <span jhiTranslate="metrics.jvm.http.active">Active requests</span> <b>{{metrics.counters['com.codahale.metrics.servlet.InstrumentedFilter.activeRequests'].count | number:'1.0-0'}}</b> - <span jhiTranslate="metrics.jvm.http.total">Total requests</span> <b>{{metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count | number:'1.0-0'}}</b>
-    </p>
-    <div class="table-responsive" *ngIf="!updatingMetrics">
-        <table class="table table-striped">
-            <thead>
-            <tr>
-                <th jhiTranslate="metrics.jvm.http.table.code">Code</th>
-                <th jhiTranslate="metrics.jvm.http.table.count">Count</th>
-                <th class="text-right" jhiTranslate="metrics.jvm.http.table.mean">Mean</th>
-                <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (1 min)</th>
-                <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (5 min)</th>
-                <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (15 min)</th>
-            </tr>
-            </thead>
-            <tbody>
-            <tr>
-                <td jhiTranslate="metrics.jvm.http.code.ok">OK</td>
-                <td>
-                    <ngb-progressbar [max]="metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count" [value]="metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count" [striped]="true" [animated]="false" type="success">
-                        <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count}}</span>
-                    </ngb-progressbar>
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].mean_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m1_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m5_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m15_rate) | number:'1.0-2'}}
-                </td>
-            </tr>
-            <tr>
-                <td jhiTranslate="metrics.jvm.http.code.notfound">Not Found</td>
-                <td>
-                    <ngb-progressbar [max]="metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count" [value]="metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count" [striped]="true" [animated]="false" type="success">
-                        <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count}}</span>
-                    </ngb-progressbar>
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].mean_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m1_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m5_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m15_rate) | number:'1.0-2'}}
-                </td>
-            </tr>
-            <tr>
-                <td jhiTranslate="metrics.jvm.http.code.servererror">Server error</td>
-                <td>
-                    <ngb-progressbar [max]="metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count" [value]="metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count" [striped]="true" [animated]="false" type="success">
-                        <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count}}</span>
-                    </ngb-progressbar>
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].mean_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m1_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m5_rate) | number:'1.0-2'}}
-                </td>
-                <td class="text-right">
-                    {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m15_rate) | number:'1.0-2'}}
-                </td>
-            </tr>
-            </tbody>
-        </table>
-    </div>
+    <jhi-metrics-request [updating]="updatingMetrics" [requestMetrics]="metrics['http.server.requests']"></jhi-metrics-request>
+
+    <jhi-metrics-endpoints-requests [updating]="updatingMetrics" [endpointsRequestsMetrics]="metrics.endpointsRequests"></jhi-metrics-endpoints-requests>
+
+    <jhi-metrics-cache [updating]="updatingMetrics" [cacheMetrics]="metrics.cache"></jhi-metrics-cache>
+
+    <jhi-metrics-datasource [updating]="updatingMetrics" [datasourceMetrics]="metrics.databases"></jhi-metrics-datasource>
 
-    <h3 jhiTranslate="metrics.servicesstats.title">Services statistics (time in millisecond)</h3>
-    <div class="table-responsive" *ngIf="!updatingMetrics">
-        <table class="table table-striped">
-            <thead>
-            <tr>
-                <th jhiTranslate="metrics.servicesstats.table.name">Service name</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.count">Count</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.mean">Mean</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.min">Min</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.p50">p50</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.p75">p75</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.p95">p95</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.p99">p99</th>
-                <th class="text-right" jhiTranslate="metrics.servicesstats.table.max">Max</th>
-            </tr>
-            </thead>
-            <tbody>
-            <tr *ngFor="let entry of servicesStats | keys">
-                <td>{{entry.key}}</td>
-                <td class="text-right">{{entry.value.count}}</td>
-                <td class="text-right">{{entry.value.mean * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.min * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.p50 * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.p75 * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.p95 * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.p99 * 1024 | number:'1.0-0'}}</td>
-                <td class="text-right">{{entry.value.max * 1024 | number:'1.0-0'}}</td>
-            </tr>
-            </tbody>
-        </table>
-    </div>
-<% if (['ehcache', 'infinispan'].includes(cacheProvider)) { %>
-    <h3 jhiTranslate="metrics.cache.title">Cache statistics</h3>
-    <div class="table-responsive" *ngIf="!updatingMetrics">
-        <table class="table table-striped">
-            <thead>
-            <tr>
-                <th jhiTranslate="metrics.cache.cachename">Cache name</th>
-                <th class="text-right" data-translate="metrics.cache.hits">Cache Hits</th>
-                <th class="text-right" data-translate="metrics.cache.misses">Cache Misses</th>
-                <th class="text-right" data-translate="metrics.cache.gets">Cache Gets</th>
-                <th class="text-right" data-translate="metrics.cache.puts">Cache Puts</th>
-                <th class="text-right" data-translate="metrics.cache.removals">Cache Removals</th>
-                <th class="text-right" data-translate="metrics.cache.evictions">Cache Evictions</th>
-                <th class="text-right" data-translate="metrics.cache.hitPercent">Cache Hit %</th>
-                <th class="text-right" data-translate="metrics.cache.missPercent">Cache Miss %</th>
-                <th class="text-right" data-translate="metrics.cache.averageGetTime">Average get time (µs)</th>
-                <th class="text-right" data-translate="metrics.cache.averagePutTime">Average put time (µs)</th>
-                <th class="text-right" data-translate="metrics.cache.averageRemoveTime">Average remove time (µs)</th>
-            </tr>
-            </thead>
-            <tbody>
-            <tr *ngFor="let entry of cachesStats | keys">
-                <td>{{entry.key}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-hits'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-misses'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-gets'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-puts'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-removals'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-evictions'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-hit-percentage'].value}}</td>
-                <td class="text-right">{{metrics.gauges[entry.key + '.cache-miss-percentage'].value }}</td>
-                <td class="text-right">{{filterNaN(metrics.gauges[entry.key + '.average-get-time'].value)  | number : '1.2-2' }}</td>
-                <td class="text-right">{{filterNaN(metrics.gauges[entry.key + '.average-put-time'].value)  | number : '1.2-2'}}</td>
-                <td class="text-right">{{filterNaN(metrics.gauges[entry.key + '.average-remove-time'].value) | number : '1.2-2' }}</td>
-            </tr>
-            </tbody>
-        </table>
-    </div>
-<%_ } _%>
-    <h3 jhiTranslate="metrics.datasource.title" *ngIf="metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'] && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0">DataSource statistics (time in millisecond)</h3>
-    <div class="table-responsive" *ngIf="!updatingMetrics && metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'] && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0">
-        <table class="table table-striped">
-            <thead>
-                <tr>
-                    <th><span jhiTranslate="metrics.datasource.usage">Usage</span> ({{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value}} / {{metrics.gauges['HikariPool-1.pool.TotalConnections'].value}})</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.count">Count</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.mean">Mean</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.min">Min</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.p50">p50</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.p75">p75</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.p95">p95</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.p99">p99</th>
-                    <th class="text-right" jhiTranslate="metrics.datasource.max">Max</th>
-                </tr>
-            </thead>
-            <tbody>
-                <tr>
-                    <td>
-                        <div class="progress progress-striped">
-                            <ngb-progressbar [max]="metrics.gauges['HikariPool-1.pool.TotalConnections'].value" [value]="metrics.gauges['HikariPool-1.pool.ActiveConnections'].value" [striped]="true" [animated]="false" type="success">
-                                <span>{{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value * 100 / metrics.gauges['HikariPool-1.pool.TotalConnections'].value  | number:'1.0-0'}}%</span>
-                            </ngb-progressbar>
-                        </div>
-                    </td>
-                    <td class="text-right">{{metrics.histograms['HikariPool-1.pool.Usage'].count}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].mean) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].min) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p50) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p75) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p95) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p99) | number:'1.0-2'}}</td>
-                    <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].max) | number:'1.0-2'}}</td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
 </div>
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs
index 809117cedb..f44f3e9e6a 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs
@@ -16,10 +16,9 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -%>
-import { Component, OnInit } from '@angular/core';
-import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
+import {Component, OnInit} from '@angular/core';
+import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
 
-import { <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent } from './metrics-modal.component';
 import { <%=jhiPrefixCapitalized%>MetricsService } from './metrics.service';
 
 @Component({
@@ -28,8 +27,7 @@ import { <%=jhiPrefixCapitalized%>MetricsService } from './metrics.service';
 })
 export class <%=jhiPrefixCapitalized%>MetricsMonitoringComponent implements OnInit {
     metrics: any = {};
-    cachesStats: any = {};
-    servicesStats: any = {};
+    threadData: any = {};
     updatingMetrics = true;
     JCACHE_KEY: string;
 
@@ -46,51 +44,13 @@ export class <%=jhiPrefixCapitalized%>MetricsMonitoringComponent implements OnIn
 
     refresh() {
         this.updatingMetrics = true;
-        this.metricsService.getMetrics().subscribe((metrics) => {
+        this.metricsService.getMetrics().subscribe(metrics => {
             this.metrics = metrics;
-            this.updatingMetrics = false;
-            this.servicesStats = {};
-            this.cachesStats = {};
-            Object.keys(metrics.timers).forEach((key) => {
-                const value = metrics.timers[key];
-                if (key.includes('web.rest') || key.includes('service')) {
-                    this.servicesStats[key] = value;
-                }
-            });
-            Object.keys(metrics.gauges).forEach((key) => {
-                if (key.includes('jcache.statistics')) {
-                    const value = metrics.gauges[key].value;
-                    // remove gets or puts
-                    const index = key.lastIndexOf('.');
-                    const newKey = key.substr(0, index);
-
-                    // Keep the name of the domain
-                    this.cachesStats[newKey] = {
-                        name: this.JCACHE_KEY.length,
-                        value
-                    };
-                }
-            });
-        });
-    }
-
-    refreshThreadDumpData() {
-        this.metricsService.threadDump().subscribe((data) => {
-            const modalRef  = this.modalService.open(<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent, { size: 'lg'});
-            modalRef.componentInstance.threadDump = data.threads;
-            modalRef.result.then((result) => {
-                // Left blank intentionally, nothing to do here
-            }, (reason) => {
-                // Left blank intentionally, nothing to do here
+            this.metricsService.threadDump().subscribe(data => {
+                this.threadData = data.threads;
+                this.updatingMetrics = false;
             });
         });
     }
 
-    filterNaN(input) {
-        if (isNaN(input)) {
-            return 0;
-        }
-        return input;
-    }
-
 }
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.service.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.service.ts.ejs
index 131ffd3e2f..8199827dbb 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.service.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.service.ts.ejs
@@ -28,7 +28,7 @@ export class <%=jhiPrefixCapitalized%>MetricsService {
     constructor(private http: HttpClient) {}
 
     getMetrics(): Observable<any> {
-        return this.http.get(SERVER_API_URL + 'management/metrics');
+        return this.http.get(SERVER_API_URL + 'management/jhi-metrics');
     }
 
     threadDump(): Observable<any> {
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs
index 94d6df7348..c9aebf488e 100644
--- a/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs
+++ b/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs
@@ -192,7 +192,7 @@ export const systemHealth = () => ({
 
 export const systemMetrics = () => ({
   type: ACTION_TYPES.FETCH_METRICS,
-  payload: axios.get('management/metrics')
+  payload: axios.get('management/jhi-metrics')
 });
 
 export const systemThreadDump = () => ({
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics-modal.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics-modal.tsx.ejs
deleted file mode 100644
index 57f504da1d..0000000000
--- a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics-modal.tsx.ejs
+++ /dev/null
@@ -1,174 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-import React from 'react';
-import { Table, Modal, ModalHeader, ModalBody, ModalFooter, Button, Input, Badge, Row } from 'reactstrap';
-
-import ThreadItem from './thread-item';
-
-export interface IMetricsModalProps {
-  showModal: boolean;
-  handleClose: Function;
-  threadDump: any;
-}
-
-export interface IMetricsModalState {
-  badgeFilter: string;
-  searchFilter: string;
-}
-
-export class MetricsModal extends React.Component<IMetricsModalProps, IMetricsModalState> {
-  state: IMetricsModalState = {
-    badgeFilter: '',
-    searchFilter: ''
-  };
-
-  computeFilteredList = () => {
-    const { badgeFilter, searchFilter } = this.state;
-    let filteredList = this.props.threadDump.threads;
-    if (badgeFilter !== '') {
-      filteredList = filteredList.filter(t => t.threadState === badgeFilter);
-    }
-    if (searchFilter !== '') {
-      filteredList = filteredList.filter(t => t.lockName &&
-                                              t.lockName.toLowerCase().includes(searchFilter.toLowerCase()));
-    }
-    return filteredList;
-  };
-
-  computeCounters = () => {
-    let threadDumpAll = 0;
-    let threadDumpRunnable = 0;
-    let threadDumpWaiting = 0;
-    let threadDumpTimedWaiting = 0;
-    let threadDumpBlocked = 0;
-
-    this.props.threadDump.threads.forEach(t => {
-      switch (t.threadState) {
-        case 'RUNNABLE':
-          threadDumpRunnable++;
-          break;
-        case 'WAITING':
-          threadDumpWaiting++;
-          break;
-        case 'TIMED_WAITING':
-          threadDumpTimedWaiting++;
-          break;
-        case 'BLOCKED':
-          threadDumpBlocked++;
-          break;
-        default:
-          break;
-      }
-    });
-
-    threadDumpAll = threadDumpRunnable + threadDumpWaiting + threadDumpTimedWaiting + threadDumpBlocked;
-    return { threadDumpAll, threadDumpRunnable, threadDumpWaiting, threadDumpTimedWaiting, threadDumpBlocked };
-  };
-
-  getBadgeClass = threadState => {
-    if (threadState === 'RUNNABLE') {
-      return 'badge-success';
-    } else if (threadState === 'WAITING') {
-      return 'badge-info';
-    } else if (threadState === 'TIMED_WAITING') {
-      return 'badge-warning';
-    } else if (threadState === 'BLOCKED') {
-      return 'badge-danger';
-    }
-  };
-
-  updateBadgeFilter = badge => () => this.setState({ badgeFilter: badge });
-
-  updateSearchFilter = event => this.setState({ searchFilter: event.target.value });
-
-  render() {
-    const { showModal, handleClose, threadDump } = this.props;
-    let counters = {} as any;
-    let filteredList = null;
-    if (threadDump && threadDump.threads) {
-      counters = this.computeCounters();
-      filteredList = this.computeFilteredList();
-    }
-
-    return <Modal
-      isOpen={showModal} toggle={handleClose} className="modal-lg">
-      <ModalHeader toggle={handleClose}>Threads dump</ModalHeader>
-      <ModalBody>
-        <Badge color="primary" className="hand" onClick={this.updateBadgeFilter('')}>All&nbsp;
-          <Badge pill>{counters.threadDumpAll || 0}</Badge>
-        </Badge>&nbsp;
-        <Badge color="success" className="hand" onClick={this.updateBadgeFilter('RUNNABLE')}>Runnable&nbsp;
-          <Badge pill>{counters.threadDumpRunnable || 0}</Badge>
-        </Badge>&nbsp;
-        <Badge color="info" className="hand" onClick={this.updateBadgeFilter('WAITING')}>Waiting&nbsp;
-          <Badge pill>{counters.threadDumpWaiting || 0}</Badge>
-        </Badge>&nbsp;
-        <Badge color="warning" className="hand" onClick={this.updateBadgeFilter('TIMED_WAITING')}>Timed Waiting&nbsp;
-          <Badge pill>{counters.threadDumpTimedWaiting || 0}</Badge>
-        </Badge>&nbsp;
-        <Badge color="danger" className="hand" onClick={this.updateBadgeFilter('BLOCKED')}>Blocked&nbsp;
-          <Badge pill>{counters.threadDumpBlocked || 0}</Badge>
-        </Badge>&nbsp;
-        <div className="mt-2">&nbsp;</div>
-        <Input type="text" className="form-control" placeholder="Filter by Lock Name..."
-               onChange={this.updateSearchFilter}/>
-        <div style={{ padding: '10px' }}>
-          {filteredList ? filteredList.map((threadDumpInfo, i) =>
-            (
-              <div key={`dump-${i}`}>
-                <h6> <span className={'badge ' + this.getBadgeClass(threadDumpInfo.threadState)}>{threadDumpInfo.threadState}</span>&nbsp;
-                  {threadDumpInfo.threadName} (ID {threadDumpInfo.threadId})&nbsp;
-                </h6>
-                <ThreadItem threadDumpInfo={threadDumpInfo}/>
-                <Row>
-                  <Table responsive>
-                    <thead>
-                    <tr>
-                      <th>Blocked Time</th>
-                      <th>Blocked Count</th>
-                      <th>Waited Time</th>
-                      <th>Waited Count</th>
-                      <th>Lock Name</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr key={threadDumpInfo.lockName}>
-                      <td>{threadDumpInfo.blockedTime}</td>
-                      <td>{threadDumpInfo.blockedCount}</td>
-                      <td>{threadDumpInfo.waitedTime}</td>
-                      <td>{threadDumpInfo.waitedCount}</td>
-                      <td className="thread-dump-modal-lock" title={threadDumpInfo.lockName}>
-                        <code>{threadDumpInfo.lockName}</code></td>
-                    </tr>
-                    </tbody>
-                  </Table>
-                </Row>
-              </div>
-            )
-          ) : null}
-        </div>
-      </ModalBody>
-      <ModalFooter>
-        <Button color="primary" onClick={handleClose}>Close</Button>
-      </ModalFooter>
-    </Modal>;
-  }
-}
-
-export default MetricsModal;
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs
index e4cc4a6527..cba5525cca 100644
--- a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs
+++ b/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs
@@ -18,13 +18,22 @@
 -%>
 import React from 'react';
 import { connect } from 'react-redux';
-import { Table, Progress, Col, Row, Button } from 'reactstrap';
-import { Translate, TextFormat } from 'react-jhipster';
+import { Button, Col, Progress, Row, Table } from 'reactstrap';
+import {
+  CacheMetrics,
+  DatasourceMetrics,
+  GarbageCollectorMetrics,
+  HttpRequestMetrics,
+  JvmMemory,
+  JvmThreads,
+  EndpointsRequestsMetrics,
+  SystemMetrics,
+  Translate
+} from 'react-jhipster';
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
 
-import { APP_WHOLE_NUMBER_FORMAT, APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT } from 'app/config/constants';
+import { APP_TIMESTAMP_FORMAT, APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT, APP_WHOLE_NUMBER_FORMAT } from 'app/config/constants';
 import { systemMetrics, systemThreadDump } from '../administration.reducer';
-import MetricsModal from './metrics-modal';
 import { IRootState } from 'app/shared/reducers';
 
 export interface IMetricsPageProps extends StateProps, DispatchProps {}
@@ -40,565 +49,87 @@ export class MetricsPage extends React.Component<IMetricsPageProps, IMetricsPage
 
   componentDidMount() {
     this.props.systemMetrics();
+    this.props.systemThreadDump();
   }
 
   getMetrics = () => {
     if (!this.props.isFetching) {
       this.props.systemMetrics();
+      this.props.systemThreadDump();
     }
   }
 
-  getThreadDump = () => {
-    this.props.systemThreadDump();
-    this.setState({
-      showModal: true
-    });
-  }
-
-  handleClose = () => {
-    this.setState({
-        showModal: false
-    });
-  }
-
-  filterNaN = input => isNaN(input) ? 0 : input;
-
-  getStats = metrics => {
-    const stat = {
-      servicesStats: {},
-      cachesStats: {}
-    };
-    if (!this.props.isFetching && metrics && metrics.timers) {
-      Object.keys(metrics.timers).forEach((key, indexNm) => {
-        if (key.indexOf('web.rest') !== -1 || key.indexOf('service') !== -1) {
-          stat.servicesStats[key] = metrics.timers[key];
-        }
-        if (key.indexOf('net.sf.ehcache.Cache') !== -1) {
-          // remove gets or puts
-          const index = key.lastIndexOf('.');
-          const newKey = key.substr(0, index);
-          // Keep the name of the domain
-          stat.cachesStats[newKey] = {
-            name: newKey,
-            value: metrics.timers[key]
-          };
-        }
-      });
-
-    }
-    return stat;
-  }
-
-  gaugeRow = (metrics, label: String, key) => (
-    metrics.gauges[key] ?
-      <Row>
-        <Col md="9">{label}</Col>
-        <Col md="3" className="text-right">
-          {metrics.gauges[key].value}
-        </Col>
-      </Row>
-      : null
-  );
-
-  renderModal = () => <MetricsModal handleClose={this.handleClose} showModal={this.state.showModal} threadDump={this.props.threadDump}/>;
-
-  renderGauges = metrics => (
-    <Row>
-      <Col sm="12">
-        <h3>JVM Metrics</h3>
-        <Row>
-          <Col md="4">
-            <b>Memory</b>
-            <p>
-              <span>Total Memory</span> (
-                <TextFormat
-                  value={metrics.gauges['jvm.memory.total.used'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M / <TextFormat
-                  value={metrics.gauges['jvm.memory.total.max'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M)
-            </p>
-            <Progress animated
-              value={metrics.gauges['jvm.memory.total.used'].value}
-              min="0"
-              max={metrics.gauges['jvm.memory.total.max'].value}
-              color="success"
-            >
-              <span>
-                <TextFormat
-                value={metrics.gauges['jvm.memory.total.used'].value * 100 / metrics.gauges['jvm.memory.total.max'].value}
-                type="number"
-                format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-            <p>
-              <span>Heap Memory</span> (
-                <TextFormat
-                  value={metrics.gauges['jvm.memory.heap.used'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M / <TextFormat
-                  value={metrics.gauges['jvm.memory.heap.max'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M)
-            </p>
-            <Progress animated
-              min="0"
-              max={metrics.gauges['jvm.memory.heap.max'].value}
-              value={metrics.gauges['jvm.memory.heap.used'].value}
-              color="success"
-            >
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.memory.heap.used'].value * 100 / metrics.gauges['jvm.memory.heap.max'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-
-            <p>
-              <span>Non-Heap Memory</span> (
-                <TextFormat
-                  value={metrics.gauges['jvm.memory.non-heap.used'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M / <TextFormat
-                  value={metrics.gauges['jvm.memory.non-heap.committed'].value / 1048576}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                M)
-            </p>
-            <Progress animated
-              min="0"
-              max={metrics.gauges['jvm.memory.non-heap.committed'].value}
-              value={metrics.gauges['jvm.memory.non-heap.used'].value}
-              color="success"
-            >
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.memory.non-heap.used'].value * 100 / metrics.gauges['jvm.memory.non-heap.committed'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-          </Col>
-          <Col md="4">
-            <b>Threads</b> (Total: {metrics.gauges['jvm.threads.count'].value}){' '}
-            <Button color="link" className="hand" onClick={this.getThreadDump}><FontAwesomeIcon icon="eye" /></Button>
-            <p><span>Runnable</span> {metrics.gauges['jvm.threads.runnable.count'].value}</p>
-            <Progress animated min="0" value={metrics.gauges['jvm.threads.runnable.count'].value} max={metrics.gauges['jvm.threads.count'].value} color="success">
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.threads.runnable.count'].value * 100 / metrics.gauges['jvm.threads.count'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-
-            <p><span>Timed Waiting</span> ({metrics.gauges['jvm.threads.timed_waiting.count'].value})</p>
-            <Progress animated min="0" value={metrics.gauges['jvm.threads.timed_waiting.count'].value} max={metrics.gauges['jvm.threads.count'].value} color="warning">
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.threads.timed_waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-
-            <p><span>Waiting</span> ({metrics.gauges['jvm.threads.waiting.count'].value})</p>
-            <Progress animated min="0" value={metrics.gauges['jvm.threads.waiting.count'].value} max={metrics.gauges['jvm.threads.count'].value} color="warning">
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.threads.waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-
-            <p><span>Blocked</span> ({metrics.gauges['jvm.threads.blocked.count'].value})</p>
-            <Progress animated min="0" value={metrics.gauges['jvm.threads.blocked.count'].value} max={metrics.gauges['jvm.threads.count'].value} color="success">
-              <span>
-                <TextFormat
-                  value={metrics.gauges['jvm.threads.blocked.count'].value * 100 / metrics.gauges['jvm.threads.count'].value}
-                  type="number"
-                  format={APP_WHOLE_NUMBER_FORMAT} />
-                %
-              </span>
-            </Progress>
-          </Col>
-          <Col md="4">
-            <b>Garbage collections</b>
-            {this.gaugeRow(metrics, 'Mark Sweep count', 'jvm.garbage.PS-MarkSweep.count')}
-            {this.gaugeRow(metrics, 'Mark Sweep time', 'jvm.garbage.PS-MarkSweep.time')}
-            {this.gaugeRow(metrics, 'Scavenge count', 'jvm.garbage.PS-Scavenge.count')}
-            {this.gaugeRow(metrics, 'Scavenge time', 'jvm.garbage.PS-Scavenge.time')}
-          </Col>
-        </Row>
-      </Col>
-    </Row>
-    )
-
   render() {
-    const { metrics, isFetching } = this.props;
-    const data = metrics || {};
-    const { servicesStats, cachesStats } = this.getStats(data);
+    const {metrics, threadDump, isFetching} = this.props;
     return (
-        <div>
-          <h2 id="metrics-page-heading">Application Metrics</h2>
-          <p>
-            <Button onClick={this.getMetrics} color={isFetching ? 'btn btn-danger' : 'btn btn-primary'} disabled={isFetching}>
-              <FontAwesomeIcon icon="sync" />&nbsp;
-              <Translate component="span" contentKey="health.refresh.button">Refresh</Translate>
-            </Button>
-          </p>
-          <hr />
-          {metrics.gauges ? this.renderGauges(metrics) : ''}
+      <div>
+        <h2 id="metrics-page-heading">Application Metrics</h2>
+        <p>
+          <Button onClick={this.getMetrics} color={isFetching ? 'btn btn-danger' : 'btn btn-primary'}
+                  disabled={isFetching}>
+            <FontAwesomeIcon icon="sync"/>
+            &nbsp;
+            <Translate component="span" contentKey="health.refresh.button">
+              Refresh
+            </Translate>
+          </Button>
+        </p>
+        <hr/>
 
-          { metrics.meters && metrics.timers ?
+        <Row>
+          <Col sm="12">
+            <h3>JVM Metrics</h3>
             <Row>
-              <Col sm="12">
-                <h3>HTTP requests (events per second)</h3>
-                <p>
-                  <span>Active requests:</span> <b>
-                    <TextFormat
-                      value={metrics.counters['com.codahale.metrics.servlet.InstrumentedFilter.activeRequests'].count}
-                      type="number"
-                      format={APP_WHOLE_NUMBER_FORMAT} />
-                  </b> - <span>Total requests:</span> <b>
-                    <TextFormat
-                      value={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}
-                      type="number"
-                      format={APP_WHOLE_NUMBER_FORMAT} />
-                  </b>
-                </p>
-                <Table>
-                  <thead>
-                    <tr>
-                      <th>Code</th>
-                      <th>Count</th>
-                      <th className="text-right">Mean</th>
-                      <th className="text-right"><span>Average</span> (1 min)</th>
-                      <th className="text-right"><span>Average</span> (5 min)</th>
-                      <th className="text-right"><span>Average</span> (15 min)</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    <tr key={0}>
-                      <td>OK</td>
-                      <td>
-                        <Progress
-                          min="0"
-                          max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}
-                          value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count}
-                          color="success"
-                          animated
-                        />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].mean_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m1_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m5_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m15_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                    </tr>
-                    <tr key={1}>
-                      <td>Not Found</td>
-                      <td>
-                        <Progress
-                          min="0"
-                          max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}
-                          value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count}
-                          color="success"
-                          animated
-                        />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].mean_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m1_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m5_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m15_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                    </tr>
-                    <tr key={2}>
-                      <td>Server Error</td>
-                      <td>
-                        <Progress
-                          min="0"
-                          max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}
-                          value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count}
-                          color="success"
-                          animated
-                        />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].mean_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m1_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m5_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m15_rate)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                    </tr>
-                  </tbody>
-                </Table>
+              <Col md="4">
+                {metrics && metrics.jvm ?
+                  <JvmMemory jvmMetrics={metrics.jvm} wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}/> : ''}
+              </Col>
+              <Col md="4">
+                {threadDump ?
+                  <JvmThreads jvmThreads={threadDump} wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}/> : ''}
+              </Col>
+              <Col md="4">
+                {metrics && metrics.processMetrics ?
+                  <SystemMetrics systemMetrics={metrics.processMetrics} wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}
+                                 timestampFormat={APP_TIMESTAMP_FORMAT}/> : ''}
               </Col>
             </Row>
-          : ''}
-          { servicesStats ?
+          </Col>
+        </Row>
+
+        {metrics && metrics.garbageCollector ?
+          <GarbageCollectorMetrics garbageCollectorMetrics={metrics.garbageCollector}
+                                   wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}/> : ''}
+        {metrics && metrics['http.server.requests'] ?
+          <HttpRequestMetrics requestMetrics={metrics['http.server.requests']}
+                              twoDigitAfterPointFormat={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT}
+                              wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}/> : ''}
+        {metrics && metrics.endpointsRequests ?
+          <EndpointsRequestsMetrics endpointsRequestsMetrics={metrics.endpointsRequests} wholeNumberFormat={APP_WHOLE_NUMBER_FORMAT}/> : ''}
+
+        {metrics.cache ? (
           <Row>
             <Col sm="12">
-              <h3>Services statistics (time in millisecond)</h3>
+              <CacheMetrics cacheMetrics={metrics.cache}
+                            twoDigitAfterPointFormat={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT}/>
             </Col>
-            <Table>
-              <thead>
-                <tr>
-                  <th>Service name</th>
-                  <th>Count</th>
-                  <th>Mean</th>
-                  <th>Min</th>
-                  <th>p50</th>
-                  <th>p75</th>
-                  <th>p95</th>
-                  <th>p99</th>
-                  <th>Max</th>
-                </tr>
-              </thead>
-              <tbody>
-                {Object.keys(servicesStats).map((key, index) => (
-                  <tr key={key}>
-                    <td>{key}</td>
-                    <td>{servicesStats[key].count}</td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].mean * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].min * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].p50 * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].p75 * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].p95 * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].p99 * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                    <td>
-                      <TextFormat
-                        value={servicesStats[key].max * 1024}
-                        type="number"
-                        format={APP_WHOLE_NUMBER_FORMAT} />
-                    </td>
-                  </tr>
-                ))}
-              </tbody>
-            </Table>
           </Row>
-          : ''}
-
-          { cachesStats ?
-            <Row>
-              <Col sm="12">
-                <h3>Ehcache statistics</h3>
-                <Table>
-                  <thead>
-                    <tr>
-                      <th>Cache Name</th>
-                      <th>Object</th>
-                      <th>Misses</th>
-                      <th>Eviction Count</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    {Object.keys(cachesStats).map((k, v) => (
-                      <tr key={k}>
-                        <td>{k}</td>
-                        <td>{metrics.gauges[`${k}.objects`].value}</td>
-                        <td>{metrics.gauges[`${k}.hits`].value}</td>
-                        <td>{metrics.gauges[`${k}.misses`].value}</td>
-                        <td>{metrics.gauges[`${k}.eviction-count`].value}</td>
-                      </tr>
-                    ))}
-                  </tbody>
-                </Table>
-              </Col>
-            </Row>
-          : ''}
-
-          { metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'] && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0 ?
-            <Row>
-              <Col sm="12">
-                <h3>DataSource statistics (time in millisecond)</h3>
-                <Table>
-                  <thead>
-                    <tr>
-                      <th>
-                        <span>Usage</span>
-                        ({metrics.gauges['HikariPool-1.pool.ActiveConnections'].value} / {metrics.gauges['HikariPool-1.pool.TotalConnections'].value})
-                      </th>
-                      <th className="text-right">Count</th>
-                      <th className="text-right">Mean</th>
-                      <th className="text-right">Min</th>
-                      <th className="text-right">p50</th>
-                      <th className="text-right">p75</th>
-                      <th className="text-right">p95</th>
-                      <th className="text-right">p99</th>
-                      <th className="text-right">Max</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    <tr key="DB">
-                      <td>
-                        <Progress
-                          min="0"
-                          max={metrics.gauges['HikariPool-1.pool.TotalConnections'].value}
-                          value={metrics.gauges['HikariPool-1.pool.ActiveConnections'].value}
-                        >
-                          <span>
-                            <TextFormat
-                              value={metrics.gauges['HikariPool-1.pool.ActiveConnections'].value * 100 / metrics.gauges['HikariPool-1.pool.TotalConnections'].value}
-                              type="number"
-                              format={APP_WHOLE_NUMBER_FORMAT} />
-                            %
-                          </span>
-                        </Progress>
-                      </td>
-                      <td className="text-right">{metrics.histograms['HikariPool-1.pool.Usage'].count}</td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].mean)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].min)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p50)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p75)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p95)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p99)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                      <td className="text-right">
-                        <TextFormat
-                          value={this.filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].max)}
-                          type="number"
-                          format={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT} />
-                      </td>
-                    </tr>
-                  </tbody>
-                </Table>
-              </Col>
-            </Row>
-          : '' }
+        ) : (
+          ''
+        )}
 
-          {this.renderModal()}
+        {metrics.databases ? (
+          <Row>
+            <Col sm="12">
+              <DatasourceMetrics datasourceMetrics={metrics.databases}
+                                 twoDigitAfterPointFormat={APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT}/>
+            </Col>
+          </Row>
+        ) : (
+          ''
+        )}
 
-        </div>
+      </div>
     );
   }
 }
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/thread-item.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/thread-item.tsx.ejs
deleted file mode 100644
index 5f8489ff79..0000000000
--- a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/thread-item.tsx.ejs
+++ /dev/null
@@ -1,67 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-import React from 'react';
-import { Collapse, Card, CardBody, Row } from 'reactstrap';
-
-export interface IThreadItemProps {
-  threadDumpInfo: any;
-}
-
-export interface IThreadItemState {
-  collapse: boolean;
-}
-
-export class ThreadItem extends React.Component<IThreadItemProps, IThreadItemState> {
-  state: IThreadItemState = {
-    collapse: false
-  };
-
-  toggleStackTrace = () => {
-    this.setState({
-      collapse: !this.state.collapse
-    });
-  };
-
-  render() {
-    const { threadDumpInfo } = this.props;
-
-    return <div>
-      <a onClick={this.toggleStackTrace} style={{ color: 'hotpink' }}>
-        {this.state.collapse ? <span>Hide StackTrace</span> : <span>Show StackTrace</span>}
-      </a>
-      <Collapse isOpen={this.state.collapse}>
-        <Card>
-          <CardBody>
-            <Row className="break" style={{ overflowX: 'scroll' }}>
-              {Object.entries(threadDumpInfo.stackTrace).map(([stK, stV]: [string, any]) => (
-                <samp key={`detail-${stK}`}>
-                  {stV.className}.{stV.methodName}
-                  <code>({stV.fileName}:{stV.lineNumber})</code>
-                </samp>
-              ))}
-              <span className="mt-1"/>
-              </Row>
-          </CardBody>
-        </Card>
-      </Collapse>
-    </div>;
-  }
-}
-
-export default ThreadItem;
diff --git a/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs b/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs
index 2f8d51a3ae..13297dffd5 100644
--- a/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs
+++ b/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs
@@ -42,7 +42,6 @@
     * @return the ResponseEntity with status 200 (OK) and the count in body
     */
     @GetMapping("/<%= entityApiUrl %>/count")
-    @Timed
     public ResponseEntity<Long> count<%= entityClassPlural %>(<%= entityClass %>Criteria criteria) {
         log.debug("REST request to count <%= entityClassPlural %> by criteria: {}", criteria);
         return ResponseEntity.ok().body(<%= entityInstance %>QueryService.countByCriteria(criteria));
diff --git a/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs b/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs
index c468f41f13..503abf3f54 100644
--- a/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs
+++ b/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs
@@ -18,7 +18,6 @@
 -%>
 package <%=packageName%>.web.rest;
 
-import com.codahale.metrics.annotation.Timed;
 <%_ if (dto !== 'mapstruct' || service === 'no') { _%>
 import <%=packageName%>.domain.<%= entityClass %>;
 <%_ } _%>
@@ -109,7 +108,6 @@ public class <%= entityClass %>Resource {
      * @throws URISyntaxException if the Location URI syntax is incorrect
      */
     @PostMapping("/<%= entityApiUrl %>")
-    @Timed
     public ResponseEntity<<%= instanceType %>> create<%= entityClass %>(<% if (validation) { %>@Valid <% } %>@RequestBody <%= instanceType %> <%= instanceName %>) throws URISyntaxException {
         log.debug("REST request to save <%= entityClass %> : {}", <%= instanceName %>);
         if (<%= instanceName %>.getId() != null) {
@@ -140,7 +138,6 @@ public class <%= entityClass %>Resource {
      * @throws URISyntaxException if the Location URI syntax is incorrect
      */
     @PutMapping("/<%= entityApiUrl %>")
-    @Timed
     public ResponseEntity<<%= instanceType %>> update<%= entityClass %>(<% if (validation) { %>@Valid <% } %>@RequestBody <%= instanceType %> <%= instanceName %>) throws URISyntaxException {
         log.debug("REST request to update <%= entityClass %> : {}", <%= instanceName %>);
         if (<%= instanceName %>.getId() == null) {
@@ -168,7 +165,6 @@ public class <%= entityClass %>Resource {
      * @return the ResponseEntity with status 200 (OK) and the list of <%= entityInstancePlural %> in body
      */
     @GetMapping("/<%= entityApiUrl %>")
-    @Timed<%- include('../../common/get_all_template', {viaService: viaService}); -%>
 
     <%_ if (reactiveRepositories) { _%>
     /**
@@ -176,7 +172,6 @@ public class <%= entityClass %>Resource {
      * @return the Flux of <%= entityInstancePlural %>
      */
     @GetMapping(value = "/<%= entityApiUrl %>", produces = MediaType.APPLICATION_STREAM_JSON_VALUE)
-    @Timed
     public Flux<<%= instanceType %>> getAll<%= entityClassPlural %>AsStream() {
         log.debug("REST request to get all <%= entityClassPlural %> as a stream");
         <%_ if (viaService) { _%>
@@ -194,7 +189,6 @@ public class <%= entityClass %>Resource {
      * @return the ResponseEntity with status 200 (OK) and with body the <%= instanceName %>, or with status 404 (Not Found)
      */
     @GetMapping("/<%= entityApiUrl %>/{id}")
-    @Timed
     public ResponseEntity<<%= instanceType %>> get<%= entityClass %>(@PathVariable <%= pkType %> id) {
         log.debug("REST request to get <%= entityClass %> : {}", id);<%- include('../../common/get_template', {viaService: viaService, returnDirectly:false}); -%>
         return ResponseUtil.wrapOrNotFound(<%= instanceName %>);
@@ -207,7 +201,6 @@ public class <%= entityClass %>Resource {
      * @return the ResponseEntity with status 200 (OK)
      */
     @DeleteMapping("/<%= entityApiUrl %>/{id}")
-    @Timed
     public ResponseEntity<Void> delete<%= entityClass %>(@PathVariable <%= pkType %> id) {
         log.debug("REST request to delete <%= entityClass %> : {}", id);
 <%- include('../../common/delete_template', {viaService: viaService}); -%>
@@ -223,5 +216,4 @@ public class <%= entityClass %>Resource {
      * @return the result of the search
      */
     @GetMapping("/_search/<%= entityApiUrl %>")
-    @Timed<%- include('../../common/search_template', {viaService: viaService}); -%><% } %>
 }
diff --git a/generators/languages/templates/src/main/webapp/i18n/en/metrics.json b/generators/languages/templates/src/main/webapp/i18n/en/metrics.json
index 9d804947c5..7d379d206b 100644
--- a/generators/languages/templates/src/main/webapp/i18n/en/metrics.json
+++ b/generators/languages/templates/src/main/webapp/i18n/en/metrics.json
@@ -39,14 +39,15 @@
                 "scavengetime": "Scavenge time"
             },
             "http": {
-                "title": "HTTP requests (events per second)",
+                "title": "HTTP requests (time in millisecond)",
                 "active": "Active requests:",
                 "total": "Total requests:",
                 "table": {
                     "code": "Code",
                     "count": "Count",
                     "mean": "Mean",
-                    "average": "Average"
+                    "average": "Average",
+                    "max": "Max"
                 },
                 "code": {
                     "ok": "Ok",
@@ -85,7 +86,7 @@
             "averageRemoveTime": "Average remove time (µs)"
         },
         "datasource": {
-            "usage": "Usage",
+            "usage": "Connection Pool Usage",
             "title": "DataSource statistics (time in millisecond)",
             "name": "Pool usage",
             "count": "Count",
diff --git a/generators/languages/templates/src/main/webapp/i18n/fr/metrics.json b/generators/languages/templates/src/main/webapp/i18n/fr/metrics.json
index e2006488c4..b54d489216 100644
--- a/generators/languages/templates/src/main/webapp/i18n/fr/metrics.json
+++ b/generators/languages/templates/src/main/webapp/i18n/fr/metrics.json
@@ -39,14 +39,15 @@
                 "scavengetime": "Temps \"Scavenge\""
             },
             "http": {
-                "title": "Requêtes HTTP (évènements par seconde)",
+                "title": "Requêtes HTTP (temps en millisecondes)",
                 "active": "Requêtes actives :",
                 "total": "Requêtes totales :",
                 "table": {
                     "code": "Code",
                     "count": "Total",
                     "mean": "Médian",
-                    "average": "Moyenne"
+                    "average": "Moyenne",
+                    "max": "Max"
                 },
                 "code": {
                     "ok": "Ok",
@@ -85,7 +86,7 @@
             "averageRemoveTime": "Temps de suppression moyen (µs)"
         },
         "datasource": {
-            "usage": "Usage",
+            "usage": "Usage du Pool de connexion",
             "title": "Statistiques du pool de connexions (temps en millisecondes)",
             "name": "Utilisation du pool",
             "count": "Total",
diff --git a/generators/server/files.js b/generators/server/files.js
index d601858b17..094015bb1f 100644
--- a/generators/server/files.js
+++ b/generators/server/files.js
@@ -838,10 +838,6 @@ const serverFiles = {
                     file: 'package/config/LoggingAspectConfiguration.java',
                     renameTo: generator => `${generator.javaDir}config/LoggingAspectConfiguration.java`
                 },
-                {
-                    file: 'package/config/MetricsConfiguration.java',
-                    renameTo: generator => `${generator.javaDir}config/MetricsConfiguration.java`
-                },
                 { file: 'package/config/WebConfigurer.java', renameTo: generator => `${generator.javaDir}config/WebConfigurer.java` }
             ]
         },
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index 7750de0e8a..459285070d 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -243,16 +243,7 @@ dependencies {
     compile "org.springframework.boot:spring-boot-starter-cache"
     <%_ } _%>
     compile "io.dropwizard.metrics:metrics-core"
-    <%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-    compile "io.dropwizard.metrics:metrics-jcache"
-    <%_ } _%>
-    compile "io.dropwizard.metrics:metrics-json"
-    compile "io.dropwizard.metrics:metrics-jvm"
-    compile "io.dropwizard.metrics:metrics-servlet"
-    compile "io.dropwizard.metrics:metrics-servlets"
-    compile "io.prometheus:simpleclient"
-    compile "io.prometheus:simpleclient_dropwizard"
-    compile "io.prometheus:simpleclient_servlet"
+    compile 'io.micrometer:micrometer-registry-prometheus'
     compile "net.logstash.logback:logstash-logback-encoder"
     compile "com.fasterxml.jackson.datatype:jackson-datatype-hppc"
     compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
@@ -262,7 +253,6 @@ dependencies {
     compile "com.fasterxml.jackson.core:jackson-annotations"
     compile "com.fasterxml.jackson.core:jackson-databind"
     compile "com.fasterxml.jackson.module:jackson-module-afterburner"
-    compile "com.ryantenney.metrics:metrics-spring"
     <%_ if (applicationType === 'gateway' && authenticationType === 'uaa') { _%>
     compile "org.apache.httpcomponents:httpclient"
     <%_ } _%>
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index 546355f3bd..60c99b1760 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -184,48 +184,6 @@
             <artifactId>spring-boot-starter-cache</artifactId>
         </dependency>
         <%_ } _%>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-annotation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-json</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>simpleclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>simpleclient_dropwizard</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>simpleclient_servlet</artifactId>
-        </dependency>
-        <%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-jcache</artifactId>
-        </dependency>
-        <%_ } _%>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-jvm</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-servlet</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-servlets</artifactId>
-        </dependency>
         <%_ if (databaseType === 'sql') { _%>
         <dependency>
             <groupId>com.fasterxml.jackson.datatype</groupId>
@@ -335,10 +293,6 @@
             <artifactId>liquibase-slf4j</artifactId>
         </dependency>
         <%_ } _%>
-        <dependency>
-            <groupId>com.ryantenney.metrics</groupId>
-            <artifactId>metrics-spring</artifactId>
-        </dependency>
         <%_ if (databaseType === 'sql') { _%>
         <dependency>
             <groupId>com.zaxxer</groupId>
@@ -742,6 +696,14 @@
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-data</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.micrometer</groupId>
+            <artifactId>micrometer-registry-prometheus</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.dropwizard.metrics</groupId>
+            <artifactId>metrics-core</artifactId>
+        </dependency>
         <%_ if (websocket === 'spring-websocket') { _%>
         <dependency>
             <groupId>org.springframework.security</groupId>
diff --git a/generators/server/templates/src/main/java/package/config/MetricsConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/MetricsConfiguration.java.ejs
deleted file mode 100644
index 846552ea34..0000000000
--- a/generators/server/templates/src/main/java/package/config/MetricsConfiguration.java.ejs
+++ /dev/null
@@ -1,163 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-package <%=packageName%>.config;
-
-import io.github.jhipster.config.JHipsterProperties;
-
-import com.codahale.metrics.JmxReporter;
-import com.codahale.metrics.JvmAttributeGaugeSet;
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.Slf4jReporter;
-import com.codahale.metrics.health.HealthCheckRegistry;
-<%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-import com.codahale.metrics.jcache.JCacheGaugeSet;
-<%_ } _%>
-import com.codahale.metrics.jvm.*;
-import com.ryantenney.metrics.spring.config.annotation.EnableMetrics;
-import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter;
-<%_ if (databaseType === 'sql') { _%>
-import com.zaxxer.hikari.HikariDataSource;
-<%_ } _%>
-import io.prometheus.client.CollectorRegistry;
-import io.prometheus.client.dropwizard.DropwizardExports;
-import io.prometheus.client.exporter.MetricsServlet;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Marker;
-import org.slf4j.MarkerFactory;
-<%_ if (databaseType === 'sql') { _%>
-import org.springframework.beans.factory.annotation.Autowired;
-<%_ } _%>
-import org.springframework.boot.web.servlet.ServletContextInitializer;
-<%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-import org.springframework.cache.CacheManager;
-<%_ } _%>
-import org.springframework.context.annotation.*;
-
-import javax.annotation.PostConstruct;
-import javax.servlet.ServletContext;
-import java.lang.management.ManagementFactory;
-import java.util.concurrent.TimeUnit;
-
-@Configuration
-@EnableMetrics(proxyTargetClass = true)
-public class MetricsConfiguration extends MetricsConfigurerAdapter implements ServletContextInitializer {
-
-    private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory";
-    private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage";
-    private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads";
-    private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files";
-    private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers";
-    private static final String PROP_METRIC_REG_JVM_ATTRIBUTE_SET = "jvm.attributes";
-<% if (['ehcache', 'infinispan'].includes(cacheProvider)) { %>
-    private static final String PROP_METRIC_REG_JCACHE_STATISTICS = "jcache.statistics";
-<%_ } _%>
-
-    private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class);
-
-    private MetricRegistry metricRegistry = new MetricRegistry();
-
-    private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry();
-
-    private final JHipsterProperties jHipsterProperties;
-<%_ if (databaseType === 'sql') { _%>
-
-    private HikariDataSource hikariDataSource;
-<%_ } _%>
-
-<%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-    // The cacheManager is injected here to force its initialization, so the JCacheGaugeSet
-    // will be correctly created below.
-<%_ } _%>
-    public MetricsConfiguration(JHipsterProperties jHipsterProperties<% if (['ehcache', 'infinispan'].includes(cacheProvider)) { %>, CacheManager cacheManager<% } %>) {
-        this.jHipsterProperties = jHipsterProperties;
-    }
-<%_ if (databaseType === 'sql') { _%>
-
-    @Autowired(required = false)
-    public void setHikariDataSource(HikariDataSource hikariDataSource) {
-        this.hikariDataSource = hikariDataSource;
-    }
-<%_ } _%>
-
-    @Override
-    @Bean
-    public MetricRegistry getMetricRegistry() {
-        return metricRegistry;
-    }
-
-    @Override
-    @Bean
-    public HealthCheckRegistry getHealthCheckRegistry() {
-        return healthCheckRegistry;
-    }
-
-    @PostConstruct
-    public void init() {
-        log.debug("Registering JVM gauges");
-        metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet());
-        metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet());
-        metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet());
-        metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge());
-        metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
-        metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet());
-        <%_ if (['ehcache', 'infinispan'].includes(cacheProvider)) { _%>
-        metricRegistry.register(PROP_METRIC_REG_JCACHE_STATISTICS, new JCacheGaugeSet());
-        <%_ } _%>
-        <%_ if (databaseType === 'sql') { _%>
-        if (hikariDataSource != null) {
-            log.debug("Monitoring the datasource");
-            // remove the factory created by HikariDataSourceMetricsPostProcessor until JHipster migrate to Micrometer
-            hikariDataSource.setMetricsTrackerFactory(null);
-            hikariDataSource.setMetricRegistry(metricRegistry);
-        }
-        <%_ } _%>
-        if (jHipsterProperties.getMetrics().getJmx().isEnabled()) {
-            log.debug("Initializing Metrics JMX reporting");
-            JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build();
-            jmxReporter.start();
-        }
-        if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
-            log.info("Initializing Metrics Log reporting");
-            Marker metricsMarker = MarkerFactory.getMarker("metrics");
-            final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry)
-                .outputTo(LoggerFactory.getLogger("metrics"))
-                .markWith(metricsMarker)
-                .convertRatesTo(TimeUnit.SECONDS)
-                .convertDurationsTo(TimeUnit.MILLISECONDS)
-                .build();
-            reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS);
-        }
-    }
-
-    @Override
-    public void onStartup(ServletContext servletContext) {
-
-        if (jHipsterProperties.getMetrics().getPrometheus().isEnabled()) {
-            String endpoint = jHipsterProperties.getMetrics().getPrometheus().getEndpoint();
-
-            log.debug("Initializing prometheus metrics exporting via {}", endpoint);
-
-            CollectorRegistry.defaultRegistry.register(new DropwizardExports(metricRegistry));
-            servletContext
-                .addServlet("prometheusMetrics", new MetricsServlet(CollectorRegistry.defaultRegistry))
-                .addMapping(endpoint);
-        }
-    }
-}
diff --git a/generators/server/templates/src/main/java/package/config/ReactiveSecurityConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/ReactiveSecurityConfiguration.java.ejs
index dcda97e71c..ba8d9e8ebd 100644
--- a/generators/server/templates/src/main/java/package/config/ReactiveSecurityConfiguration.java.ejs
+++ b/generators/server/templates/src/main/java/package/config/ReactiveSecurityConfiguration.java.ejs
@@ -123,6 +123,7 @@ public class SecurityConfiguration {
             .pathMatchers("/api/**").authenticated()
             .pathMatchers("/management/health").permitAll()
             .pathMatchers("/management/info").permitAll()
+            .pathMatchers("/management/prometheus").permitAll()
             .pathMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN);
         return http.build();
     }
diff --git a/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs b/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs
index b121409e26..95a5e72958 100644
--- a/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs
+++ b/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs
@@ -18,9 +18,6 @@
 -%>
 package <%=packageName%>.config;
 
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.servlet.InstrumentedFilter;
-import com.codahale.metrics.servlets.MetricsServlet;
 <%_ if (reactive) { _%>
 import com.fasterxml.jackson.databind.ObjectMapper;
 <%_ } _%>
@@ -91,15 +88,13 @@ public class WebConfigurer implements ServletContextInitializer, WebServerFactor
 
     private final JHipsterProperties jHipsterProperties;
 
-    private MetricRegistry metricRegistry;
-
     public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) {
 
         this.env = env;
         this.jHipsterProperties = jHipsterProperties;
     }
 
-    <%_ 
+    <%_
         // TODO: remove when this is supported in spring-data / spring-boot
         if (reactive) { _%>
     @Override
@@ -115,7 +110,6 @@ public class WebConfigurer implements ServletContextInitializer, WebServerFactor
             log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles());
         }
         EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC);
-        initMetrics(servletContext, disps);
         <%_ if (!skipClient) { _%>
         if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) {
             initCachingHttpHeadersFilter(servletContext, disps);
@@ -217,32 +211,6 @@ public class WebConfigurer implements ServletContextInitializer, WebServerFactor
     }
     <%_ } _%>
 
-    /**
-     * Initializes Metrics.
-     */
-    private void initMetrics(ServletContext servletContext, EnumSet<DispatcherType> disps) {
-        log.debug("Initializing Metrics registries");
-        servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE,
-            metricRegistry);
-        servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY,
-            metricRegistry);
-
-        log.debug("Registering Metrics Filter");
-        FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter",
-            new InstrumentedFilter());
-
-        metricsFilter.addMappingForUrlPatterns(disps, true, "/*");
-        metricsFilter.setAsyncSupported(true);
-
-        log.debug("Registering Metrics Servlet");
-        ServletRegistration.Dynamic metricsAdminServlet =
-            servletContext.addServlet("metricsServlet", new MetricsServlet());
-
-        metricsAdminServlet.addMapping("/management/metrics/*");
-        metricsAdminServlet.setAsyncSupported(true);
-        metricsAdminServlet.setLoadOnStartup(2);
-    }
-
     @Bean
     public Cors<% if (reactive) { %>Web<% } %>Filter corsFilter() {
         UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
@@ -284,8 +252,4 @@ public class WebConfigurer implements ServletContextInitializer, WebServerFactor
     }
     <%_ } _%>
 
-    @Autowired(required = false)
-    public void setMetricRegistry(MetricRegistry metricRegistry) {
-        this.metricRegistry = metricRegistry;
-    }
 }
diff --git a/generators/server/templates/src/main/java/package/web/rest/AccountResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/AccountResource.java.ejs
index e02247b8f0..01c0d5e32d 100644
--- a/generators/server/templates/src/main/java/package/web/rest/AccountResource.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/AccountResource.java.ejs
@@ -23,7 +23,6 @@ import <%=packageName%>.service.UserService;
 import <%=packageName%>.service.dto.UserDTO;
 import <%=packageName%>.web.rest.errors.InternalServerErrorException;
 
-import com.codahale.metrics.annotation.Timed;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.oauth2.provider.OAuth2Authentication;
@@ -56,7 +55,6 @@ public class AccountResource {
      * @return the login if the user is authenticated
      */
     @GetMapping("/authenticate")
-    @Timed
     public String isAuthenticated(HttpServletRequest request) {
         log.debug("REST request to check if the current user is authenticated");
         return request.getRemoteUser();
@@ -70,7 +68,6 @@ public class AccountResource {
      * @throws InternalServerErrorException 500 (Internal Server Error) if the user couldn't be returned
      */
     @GetMapping("/account")
-    @Timed
     @SuppressWarnings("unchecked")
     public UserDTO getAccount(Principal principal) {
         if (principal != null) {
@@ -88,7 +85,6 @@ public class AccountResource {
     }
 }
 <%_ } else { _%>
-import com.codahale.metrics.annotation.Timed;
 
 <%_ if (authenticationType === 'session') { _%>
 import <%=packageName%>.domain.PersistentToken;
@@ -170,7 +166,6 @@ public class AccountResource {
      * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already used
      */
     @PostMapping("/register")
-    @Timed
     @ResponseStatus(HttpStatus.CREATED)
     public <% if (reactive) { %>Mono<Void><% } else { %>void<% } %> registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) {
         if (!checkPasswordLength(managedUserVM.getPassword())) {
@@ -193,7 +188,6 @@ public class AccountResource {
      * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be activated
      */
     @GetMapping("/activate")
-    @Timed
     public <% if (reactive) { %>Mono<Void><% } else { %>void<% } %> activateAccount(@RequestParam(value = "key") String key) {
         <%_ if (!reactive) { _%>
         Optional<User> user = userService.activateRegistration(key);
@@ -214,7 +208,6 @@ public class AccountResource {
      * @return the login if the user is authenticated
      */
     @GetMapping("/authenticate")
-    @Timed
     <%_ if (!reactive) { _%>
     public String isAuthenticated(HttpServletRequest request) {
         log.debug("REST request to check if the current user is authenticated");
@@ -233,7 +226,6 @@ public class AccountResource {
      * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be returned
      */
     @GetMapping("/account")
-    @Timed
     public <% if (reactive) { %>Mono<UserDTO><% } else { %>UserDTO<% } %> getAccount() {
         return userService.getUserWithAuthorities()
             .map(UserDTO::new)
@@ -252,7 +244,6 @@ public class AccountResource {
      * @throws RuntimeException 500 (Internal Server Error) if the user login wasn't found
      */
     @PostMapping("/account")
-    @Timed
     <%_ if (!reactive) { _%>
     public void saveAccount(@Valid @RequestBody UserDTO userDTO) {
         final String userLogin = SecurityUtils.getCurrentUserLogin().orElseThrow(() -> new InternalServerErrorException("Current user login not found"));
@@ -292,7 +283,6 @@ public class AccountResource {
      * @throws InvalidPasswordException 400 (Bad Request) if the new password is incorrect
      */
     @PostMapping(path = "/account/change-password")
-    @Timed
     public <% if (reactive) { %>Mono<Void><% } else { %>void<% } %> changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) {
         if (!checkPasswordLength(passwordChangeDto.getNewPassword())) {
             throw new InvalidPasswordException();
@@ -307,7 +297,6 @@ public class AccountResource {
      * @throws RuntimeException 500 (Internal Server Error) if the current open sessions couldn't be retrieved
      */
     @GetMapping("/account/sessions")
-    @Timed
     public List<PersistentToken> getCurrentSessions() {
         return persistentTokenRepository.findByUser(
             userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()
@@ -333,7 +322,6 @@ public class AccountResource {
      * @throws UnsupportedEncodingException if the series couldnt be URL decoded
      */
     @DeleteMapping("/account/sessions/{series}")
-    @Timed
     public void invalidateSession(@PathVariable String series) throws UnsupportedEncodingException {
         String decodedSeries = URLDecoder.decode(series, "UTF-8");
         SecurityUtils.getCurrentUserLogin()
@@ -354,7 +342,6 @@ public class AccountResource {
      * @throws EmailNotFoundException 400 (Bad Request) if the email address is not registered
      */
     @PostMapping(path = "/account/reset-password/init")
-    @Timed
     <%_ if (!reactive) { _%>
     public void requestPasswordReset(@RequestBody String mail) {
        mailService.sendPasswordResetMail(
@@ -378,7 +365,6 @@ public class AccountResource {
      * @throws RuntimeException 500 (Internal Server Error) if the password could not be reset
      */
     @PostMapping(path = "/account/reset-password/finish")
-    @Timed
     public <% if (reactive) { %>Mono<Void><% } else { %>void<% } %> finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) {
         if (!checkPasswordLength(keyAndPassword.getNewPassword())) {
             throw new InvalidPasswordException();
diff --git a/generators/server/templates/src/main/java/package/web/rest/AuthResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/AuthResource.java.ejs
index 0aeb66ea79..a5a30acf3a 100755
--- a/generators/server/templates/src/main/java/package/web/rest/AuthResource.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/AuthResource.java.ejs
@@ -18,7 +18,6 @@
 -%>
 package <%=packageName%>.web.rest;
 
-import com.codahale.metrics.annotation.Timed;
 import <%=packageName%>.security.oauth2.OAuth2AuthenticationService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,7 +62,6 @@ public class AuthResource {
      */
     @RequestMapping(value = "/login", method = RequestMethod.POST, consumes = MediaType
         .APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @Timed
     public ResponseEntity<OAuth2AccessToken> authenticate(HttpServletRequest request, HttpServletResponse response, @RequestBody
         Map<String, String> params) {
         return authenticationService.authenticate(request, response, params);
@@ -77,7 +75,6 @@ public class AuthResource {
      * @return an empty response entity.
      */
     @RequestMapping(value = "/logout", method = RequestMethod.POST)
-    @Timed
     public ResponseEntity<?> logout(HttpServletRequest request, HttpServletResponse response) {
         log.info("logging out user {}", SecurityContextHolder.getContext().getAuthentication().getName());
         authenticationService.logout(request, response);
diff --git a/generators/server/templates/src/main/java/package/web/rest/GatewayResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/GatewayResource.java.ejs
index f1f3078db4..d380d3a906 100644
--- a/generators/server/templates/src/main/java/package/web/rest/GatewayResource.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/GatewayResource.java.ejs
@@ -31,8 +31,6 @@ import org.springframework.security.access.annotation.Secured;
 import <%=packageName%>.security.AuthoritiesConstants;
 import org.springframework.web.bind.annotation.*;
 
-import com.codahale.metrics.annotation.Timed;
-
 /**
  * REST controller for managing Gateway configuration.
  */
@@ -55,7 +53,6 @@ public class GatewayResource {
      * @return the ResponseEntity with status 200 (OK) and with body the list of routes
      */
     @GetMapping("/routes")
-    @Timed
     @Secured(AuthoritiesConstants.ADMIN)
     public ResponseEntity<List<RouteVM>> activeRoutes() {
         List<Route> routes = routeLocator.getRoutes();
diff --git a/generators/server/templates/src/main/java/package/web/rest/LogsResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/LogsResource.java.ejs
index 5e9eb1d005..cc4470eaa7 100644
--- a/generators/server/templates/src/main/java/package/web/rest/LogsResource.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/LogsResource.java.ejs
@@ -22,7 +22,6 @@ import <%=packageName%>.web.rest.vm.LoggerVM;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.LoggerContext;
-import com.codahale.metrics.annotation.Timed;
 import org.slf4j.LoggerFactory;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
@@ -42,7 +41,6 @@ import java.util.stream.Collectors;
 public class LogsResource {
 
     @GetMapping("/logs")
-    @Timed
     public <% if (reactive) { %>Flux<% } else { %>List<% } %><LoggerVM> getList() {
         LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
         <%_ if (reactive) { _%>
@@ -58,7 +56,6 @@ public class LogsResource {
 
     @PutMapping("/logs")
     @ResponseStatus(HttpStatus.NO_CONTENT)
-    @Timed
     public void changeLevel(@RequestBody LoggerVM jsonLogger) {
         LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
         context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel()));
diff --git a/generators/server/templates/src/main/java/package/web/rest/UserJWTController.java.ejs b/generators/server/templates/src/main/java/package/web/rest/UserJWTController.java.ejs
index 57b870fda5..dfa811822f 100644
--- a/generators/server/templates/src/main/java/package/web/rest/UserJWTController.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/UserJWTController.java.ejs
@@ -22,7 +22,6 @@ import <%= packageName %>.security.jwt.JWTFilter;
 import <%= packageName %>.security.jwt.TokenProvider;
 import <%= packageName %>.web.rest.vm.LoginVM;
 
-import com.codahale.metrics.annotation.Timed;
 import com.fasterxml.jackson.annotation.JsonProperty;
 
 import org.springframework.http.HttpHeaders;
@@ -61,7 +60,6 @@ public class UserJWTController {
     }
 
     @PostMapping("/authenticate")
-    @Timed
     <%_ if (!reactive) { _%>
     public ResponseEntity<JWTToken> authorize(@Valid @RequestBody LoginVM loginVM) {
 
diff --git a/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs
index 807ee9436c..3c28adfa2d 100644
--- a/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs
+++ b/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs
@@ -43,7 +43,6 @@ import <%=packageName%>.web.rest.util.HeaderUtil;
 <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%>
 import <%=packageName%>.web.rest.util.PaginationUtil;
 <%_ } _%>
-import com.codahale.metrics.annotation.Timed;
 <%_ if (!reactive) { _%>
 import io.github.jhipster.web.util.ResponseUtil;
 <%_ } _%>
@@ -160,7 +159,6 @@ public class UserResource {
      * @throws BadRequestAlertException 400 (Bad Request) if the login or email is already in use
      */
     @PostMapping("/users")
-    @Timed
     @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")")
     public <% if (reactive) { %>Mono<ResponseEntity<User>><% } else { %>ResponseEntity<User><% } %> createUser(@Valid @RequestBody UserDTO userDTO)<% if (!reactive) { %> throws URISyntaxException<% } %> {
         log.debug("REST request to save User : {}", userDTO);
@@ -219,7 +217,6 @@ public class UserResource {
      * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already in use
      */
     @PutMapping("/users")
-    @Timed
     @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")")
     <%_ if (!reactive) { _%>
     public ResponseEntity<UserDTO> updateUser(@Valid @RequestBody UserDTO userDTO) {
@@ -272,7 +269,6 @@ public class UserResource {
      * @return the ResponseEntity with status 200 (OK) and with body all users
      */
     @GetMapping("/users")
-    @Timed
     <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%>
         <%_ if (!reactive) { _%>
     public ResponseEntity<List<UserDTO>> getAllUsers(Pageable pageable) {
@@ -292,7 +288,6 @@ public class UserResource {
      * @return a string list of the all of the roles
      */
     @GetMapping("/users/authorities")
-    @Timed
     @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")")
     public <% if (reactive) { %>Mono<List<String>><% } else { %>List<String><% } %> getAuthorities() {
         return userService.getAuthorities()<% if (reactive) { %>.collectList()<% } %>;
@@ -311,7 +306,6 @@ public class UserResource {
      * @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Found)
      */
     @GetMapping("/users/{login:" + Constants.LOGIN_REGEX + "}")
-    @Timed
     <%_ if (!reactive) { _%>
     public ResponseEntity<UserDTO> getUser(@PathVariable String login) {
         log.debug("REST request to get User : {}", login);
@@ -335,7 +329,6 @@ public class UserResource {
      * @return the ResponseEntity with status 200 (OK)
      */
     @DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}")
-    @Timed
     @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")")
     <%_ if (!reactive) { _%>
     public ResponseEntity<Void> deleteUser(@PathVariable String login) {
@@ -360,7 +353,6 @@ public class UserResource {
      * @return the result of the search
      */
     @GetMapping("/_search/users/{query}")
-    @Timed
     public List<User> search(@PathVariable String query) {
         return StreamSupport
             .stream(userSearchRepository.search(queryStringQuery(query)).spliterator(), false)
diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
index fa126d6708..3e88b42299 100644
--- a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
@@ -120,6 +120,7 @@ spring:
         password:
         <%_ } _%>
         hikari:
+            poolName: Hikari
             auto-commit: false
         <%_ if (devDatabaseType === 'mysql' || devDatabaseType === 'mariadb' || devDatabaseType === 'mssql') { _%>
             data-source-properties:
@@ -351,12 +352,8 @@ jhipster:
     mail: # specific JHipster mail property, for standard properties see MailProperties
         from: <%= baseName %>@localhost
         base-url: http://127.0.0.1:<%= applicationType !== 'uaa' ? serverPort : 8080 %>
-    metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
-        jmx:
-            enabled: true
-        prometheus:
-            enabled: false #expose metrics via prometheus
-        logs: # Reports Dropwizard metrics in the logs
+    metrics:
+        logs: # Reports metrics in the logs
             enabled: false
             report-frequency: 60 # in seconds
     logging:
diff --git a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
index 0040dceaaf..8a6e6ba133 100644
--- a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
@@ -97,6 +97,7 @@ spring:
         password: oracle
         <%_ } _%>
         hikari:
+            poolName: Hikari
             auto-commit: false
         <%_ if (prodDatabaseType === 'mysql' || prodDatabaseType === 'mariadb' || prodDatabaseType === 'mssql') { _%>
             data-source-properties:
@@ -331,12 +332,8 @@ jhipster:
     mail: # specific JHipster mail property, for standard properties see MailProperties
         from: <%= baseName %>@localhost
         base-url: http://my-server-url-to-change # Modify according to your server's URL
-    metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
-        jmx:
-            enabled: true
-        prometheus:
-            enabled: false #expose metrics via prometheus
-        logs: # Reports Dropwizard metrics in the logs
+    metrics:
+        logs: # Reports metrics in the logs
             enabled: false
             report-frequency: 60 # in seconds
     logging:
diff --git a/generators/server/templates/src/main/resources/config/application.yml.ejs b/generators/server/templates/src/main/resources/config/application.yml.ejs
index 9baae96a9f..b508826d36 100644
--- a/generators/server/templates/src/main/resources/config/application.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application.yml.ejs
@@ -111,10 +111,12 @@ management:
         web:
             base-path: /management
             exposure:
-                include: ["configprops", "env", "health", "info", "threaddump", "logfile" ]
+                include: ["configprops", "env", "health", "info", "threaddump", "logfile", "jhi-metrics", "prometheus" ]
     endpoint:
         health:
             show-details: when-authorized
+        jhi-metrics:
+            enabled: true
     info:
         git:
             mode: full
@@ -122,7 +124,32 @@ management:
         mail:
             enabled: false # When using the MailService, configure an SMTP server and set this to true
     metrics:
-        enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead
+        export:
+            # Prometheus is the default metrics backend
+            prometheus:
+                enabled: true
+                step: 60
+        binders:
+            jvm:
+                enabled: true
+            processor:
+                enabled: true
+            uptime:
+                enabled: true
+            logback:
+                enabled: true
+            files:
+                enabled: true
+            integration:
+                enabled: true
+        distribution:
+            percentiles-histogram:
+                all: true
+            percentiles:
+                all: 0, 0.5, 0.75, 0.95, 0.99, 1.0
+        web:
+            server:
+                auto-time-requests: true
 
 spring:
     <%_ if (searchEngine === 'elasticsearch') { _%>
@@ -155,7 +182,10 @@ spring:
     jpa:
         open-in-view: false
         properties:
-            hibernate.jdbc.time_zone: UTC
+            hibernate:
+                generate_statistics: true
+                jdbc:
+                    time_zone: UTC
         hibernate:
             ddl-auto: none
             naming:
diff --git a/generators/server/templates/src/main/resources/logback-spring.xml.ejs b/generators/server/templates/src/main/resources/logback-spring.xml.ejs
index 917c6782f6..a5b65a2021 100644
--- a/generators/server/templates/src/main/resources/logback-spring.xml.ejs
+++ b/generators/server/templates/src/main/resources/logback-spring.xml.ejs
@@ -53,7 +53,7 @@
     <logger name="javax.management.remote" level="WARN"/>
     <logger name="javax.xml.bind" level="WARN"/>
     <logger name="ch.qos.logback" level="WARN"/>
-    <logger name="com.codahale.metrics" level="WARN"/><% if (databaseType === 'cassandra') { %>
+    <% if (databaseType === 'cassandra') { %>
     <logger name="com.datastax" level="WARN"/><% } %>
     <%_ if (cacheProvider === 'hazelcast') { _%>
     <logger name="com.hazelcast" level="INFO"/>


Test patch:
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs
deleted file mode 100644
index fa5a997a72..0000000000
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts.ejs
+++ /dev/null
@@ -1,106 +0,0 @@
-<%#
-Copyright 2013-2018 the original author or authors from the JHipster project.
-
-    This file is part of the JHipster project, see https://www.jhipster.tech/
-    for more information.
-
-        Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-limitations under the License.
--%>
-import { ComponentFixture, TestBed, async } from '@angular/core/testing';
-import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
-import { of, throwError } from 'rxjs';
-
-import { <%=angularXAppName%>TestModule } from '../../../test.module';
-import { <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent } from 'app/admin/metrics/metrics-modal.component';
-import { <%=jhiPrefixCapitalized%>MetricsService } from 'app/admin/metrics/metrics.service';
-
-describe('Component Tests', () => {
-    describe('<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent', () => {
-        let comp: <%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent;
-        let fixture: ComponentFixture<<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent>;
-        let service: <%=jhiPrefixCapitalized%>MetricsService;
-
-        beforeEach(async(() => {
-            TestBed.configureTestingModule({
-                imports: [<%=angularXAppName%>TestModule],
-                declarations: [<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent]
-            })
-                .overrideTemplate(<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent, '')
-                .compileComponents();
-        }));
-
-        beforeEach(() => {
-            fixture = TestBed.createComponent(<%=jhiPrefixCapitalized%>MetricsMonitoringModalComponent);
-            comp = fixture.componentInstance;
-            service = fixture.debugElement.injector.get(<%=jhiPrefixCapitalized%>MetricsService);
-        });
-
-        describe('ngOnInit', () => {
-            it('should count the numbers of each thread type', () => {
-                comp.threadDump = [
-                    {name: 'test1', threadState: 'RUNNABLE'},
-                    {name: 'test2', threadState: 'WAITING'},
-                    {name: 'test3', threadState: 'TIMED_WAITING'},
-                    {name: 'test4', threadState: 'BLOCKED'},
-                    {name: 'test5', threadState: 'BLOCKED'},
-                    {name: 'test5', threadState: 'NONE'}
-                ]
-                fixture.detectChanges()
-
-                expect(comp.threadDumpRunnable).toBe(1)
-                expect(comp.threadDumpWaiting).toBe(1)
-                expect(comp.threadDumpTimedWaiting).toBe(1)
-                expect(comp.threadDumpBlocked).toBe(2)
-                expect(comp.threadDumpAll).toBe(5)
-            });
-
-            it('should return badge-info for WAITING', () => {
-                expect(comp.getBadgeClass('WAITING')).toBe('badge-info');
-            });
-
-            it('should return badge-warning for TIMED_WAITING', () => {
-                expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning');
-            });
-
-            it('should return badge-danger for BLOCKED', () => {
-                expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger');
-            });
-
-            it('should return undefined for anything else', () => {
-                expect(comp.getBadgeClass('')).toBe(undefined);
-            });
-        });
-
-        describe('getBadgeClass', () => {
-            it('should return badge-success for RUNNABLE', () => {
-                expect(comp.getBadgeClass('RUNNABLE')).toBe('badge-success');
-            });
-
-            it('should return badge-info for WAITING', () => {
-                expect(comp.getBadgeClass('WAITING')).toBe('badge-info');
-            });
-
-            it('should return badge-warning for TIMED_WAITING', () => {
-                expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning');
-            });
-
-            it('should return badge-danger for BLOCKED', () => {
-                expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger');
-            });
-
-            it('should return undefined for anything else', () => {
-                expect(comp.getBadgeClass('')).toBe(undefined);
-            });
-        });
-    });
-});
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs
index 1a86aee61a..431eab0b60 100644
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs
+++ b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts.ejs
@@ -67,15 +67,6 @@ describe('Component Tests', () => {
 
                 // THEN
                 expect(service.getMetrics).toHaveBeenCalled();
-                expect(comp.servicesStats).toEqual({ service: 'test' });
-                expect(comp.cachesStats).toEqual({ jcache: { name: 17, value: 2 } });
-            });
-        });
-
-        describe('isNan', () => {
-            it('should return if a variable is NaN', () => {
-                expect(comp.filterNaN(1)).toBe(1);
-                expect(comp.filterNaN('test')).toBe(0);
             });
         });
     });
diff --git a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs
index fa46dd7173..53deb7321f 100644
--- a/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs
+++ b/generators/client/templates/angular/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts.ejs
@@ -45,7 +45,7 @@ describe('Service Tests', () => {
                 service.getMetrics().subscribe(() => {});
 
                 const req = httpMock.expectOne({ method: 'GET' });
-                const resourceUrl = SERVER_API_URL + 'management/metrics';
+                const resourceUrl = SERVER_API_URL + 'management/jhi-metrics';
                 expect(req.request.url).toEqual(resourceUrl);
             });
 
diff --git a/generators/server/templates/src/test/java/package/config/WebConfigurerTest.java.ejs b/generators/server/templates/src/test/java/package/config/WebConfigurerTest.java.ejs
index 1c8623375d..1fa6365b43 100644
--- a/generators/server/templates/src/test/java/package/config/WebConfigurerTest.java.ejs
+++ b/generators/server/templates/src/test/java/package/config/WebConfigurerTest.java.ejs
@@ -18,9 +18,6 @@
 -%>
 package <%= packageName %>.config;
 
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.servlet.InstrumentedFilter;
-import com.codahale.metrics.servlets.MetricsServlet;
 import io.github.jhipster.config.JHipsterConstants;
 import io.github.jhipster.config.JHipsterProperties;
 <%_ if (!skipClient) { _%>
@@ -73,8 +70,6 @@ public class WebConfigurerTest {
 
     private JHipsterProperties props;
 
-    private MetricRegistry metricRegistry;
-
     @Before
     public void setup() {
         servletContext = spy(new MockServletContext());
@@ -87,8 +82,6 @@ public class WebConfigurerTest {
         props = new JHipsterProperties();
 
         webConfigurer = new WebConfigurer(env, props);
-        metricRegistry = new MetricRegistry();
-        webConfigurer.setMetricRegistry(metricRegistry);
     }
 
     @Test
@@ -96,10 +89,6 @@ public class WebConfigurerTest {
         env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION);
         webConfigurer.onStartup(servletContext);
 
-        assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry);
-        assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry);
-        verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class));
-        verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class));
         <%_ if (!skipClient) { _%>
         verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class));
         <%_ } _%>
@@ -113,10 +102,6 @@ public class WebConfigurerTest {
         env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
         webConfigurer.onStartup(servletContext);
 
-        assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry);
-        assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry);
-        verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class));
-        verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class));
         <%_ if (!skipClient) { _%>
         verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class));
         <%_ } _%>
diff --git a/generators/server/templates/src/test/resources/config/application.yml.ejs b/generators/server/templates/src/test/resources/config/application.yml.ejs
index bfc4d9d999..fce0209b3f 100644
--- a/generators/server/templates/src/test/resources/config/application.yml.ejs
+++ b/generators/server/templates/src/test/resources/config/application.yml.ejs
@@ -196,9 +196,8 @@ jhipster:
             # security key (this key should be unique for your application, and kept secret)
             key: <%= rememberMeKey %>
 <%_ } _%>
-    metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
-        jmx.enabled: true
-        logs: # Reports Dropwizard metrics in the logs
+    metrics:
+        logs: # Reports metrics in the logs
             enabled: true
             report-frequency: 60 # in seconds
 
diff --git a/generators/server/templates/src/test/resources/logback.xml.ejs b/generators/server/templates/src/test/resources/logback.xml.ejs
index 5585901a34..ae293a6d6d 100644
--- a/generators/server/templates/src/test/resources/logback.xml.ejs
+++ b/generators/server/templates/src/test/resources/logback.xml.ejs
@@ -33,7 +33,6 @@
     <logger name="javax.mail" level="WARN"/>
     <logger name="javax.xml.bind" level="WARN"/>
     <logger name="ch.qos.logback" level="WARN"/>
-    <logger name="com.codahale.metrics" level="WARN"/>
     <%_ if (databaseType === 'cassandra') { _%>
     <logger name="com.datastax" level="WARN"/>
     <%_ } _%>
diff --git a/test/templates/ci-cd/maven-ngx-yarn/pom.xml b/test/templates/ci-cd/maven-ngx-yarn/pom.xml
index 5034e0b8bf..1c197c8d1f 100644
--- a/test/templates/ci-cd/maven-ngx-yarn/pom.xml
+++ b/test/templates/ci-cd/maven-ngx-yarn/pom.xml
@@ -32,7 +32,7 @@
     </pluginRepositories>
 
     <!-- jhipster-needle-distribution-management -->
-    
+
     <properties>
         <!-- Build properties -->
         <maven.version>3.0.0</maven.version>
@@ -137,34 +137,6 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-cache</artifactId>
         </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-annotation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-json</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-jcache</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-jvm</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-servlet</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-servlets</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.datatype</groupId>
             <artifactId>jackson-datatype-hibernate5</artifactId>
diff --git a/test/utils/expected-files.js b/test/utils/expected-files.js
index ae387253aa..c9d3144e00 100644
--- a/test/utils/expected-files.js
+++ b/test/utils/expected-files.js
@@ -154,7 +154,6 @@ const expectedFiles = {
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/JacksonConfiguration.java`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/LocaleConfiguration.java`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/LoggingAspectConfiguration.java`,
-        `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/MetricsConfiguration.java`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/SecurityConfiguration.java`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/WebConfigurer.java`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/audit/package-info.java`,
@@ -345,8 +344,6 @@ const expectedFiles = {
         `${CLIENT_MAIN_SRC_DIR}app/admin/logs/logs.component.ts`,
         `${CLIENT_MAIN_SRC_DIR}app/admin/logs/logs.route.ts`,
         `${CLIENT_MAIN_SRC_DIR}app/admin/logs/logs.service.ts`,
-        `${CLIENT_MAIN_SRC_DIR}app/admin/metrics/metrics-modal.component.html`,
-        `${CLIENT_MAIN_SRC_DIR}app/admin/metrics/metrics-modal.component.ts`,
         `${CLIENT_MAIN_SRC_DIR}app/admin/metrics/metrics.component.html`,
         `${CLIENT_MAIN_SRC_DIR}app/admin/metrics/metrics.component.ts`,
         `${CLIENT_MAIN_SRC_DIR}app/admin/metrics/metrics.route.ts`,
@@ -462,7 +459,6 @@ const expectedFiles = {
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/logs/logs.service.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics.service.spec.ts`,
-        `${CLIENT_TEST_SRC_DIR}spec/app/admin/metrics/metrics-modal.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/core/user/account.service.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/shared/alert/alert-error.component.spec.ts`,
         `${CLIENT_TEST_SRC_DIR}spec/app/shared/login/login.component.spec.ts`,