metrics.component.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <div>
  2. <h2>
  3. <span id="metrics-page-heading" jhiTranslate="metrics.title">Application Metrics</span>
  4. <button class="btn btn-primary float-right" (click)="refresh()">
  5. <fa-icon [icon]="'sync'"></fa-icon> <span jhiTranslate="metrics.refresh.button">Refresh</span>
  6. </button>
  7. </h2>
  8. <h3 jhiTranslate="metrics.jvm.title">JVM Metrics</h3>
  9. <div class="row" *ngIf="!updatingMetrics">
  10. <div class="col-md-4">
  11. <b jhiTranslate="metrics.jvm.memory.title">Memory</b>
  12. <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>
  13. <ngb-progressbar type="success" [max]="metrics.gauges['jvm.memory.total.max'].value" [value]="metrics.gauges['jvm.memory.total.used'].value" [striped]="true" [animated]="false">
  14. <span>{{metrics.gauges['jvm.memory.total.used'].value * 100 / metrics.gauges['jvm.memory.total.max'].value | number:'1.0-0'}}%</span>
  15. </ngb-progressbar>
  16. <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>
  17. <ngb-progressbar [max]="metrics.gauges['jvm.memory.heap.max'].value" [value]="metrics.gauges['jvm.memory.heap.used'].value" [striped]="true" [animated]="false" type="success">
  18. <span>{{metrics.gauges['jvm.memory.heap.used'].value * 100 / metrics.gauges['jvm.memory.heap.max'].value | number:'1.0-0'}}%</span>
  19. </ngb-progressbar>
  20. <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>
  21. <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">
  22. <span>{{metrics.gauges['jvm.memory.non-heap.used'].value * 100 / metrics.gauges['jvm.memory.non-heap.committed'].value | number:'1.0-0'}}%</span>
  23. </ngb-progressbar>
  24. </div>
  25. <div class="col-md-4">
  26. <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>
  27. <p><span jhiTranslate="metrics.jvm.threads.runnable">Runnable</span> {{metrics.gauges['jvm.threads.runnable.count'].value}}</p>
  28. <ngb-progressbar [value]="metrics.gauges['jvm.threads.runnable.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="success">
  29. <span>{{metrics.gauges['jvm.threads.runnable.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}%</span>
  30. </ngb-progressbar>
  31. <p><span jhiTranslate="metrics.jvm.threads.timedwaiting">Timed Waiting</span> ({{metrics.gauges['jvm.threads.timed_waiting.count'].value}})</p>
  32. <ngb-progressbar [value]="metrics.gauges['jvm.threads.timed_waiting.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="warning">
  33. <span>{{metrics.gauges['jvm.threads.timed_waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}%</span>
  34. </ngb-progressbar>
  35. <p><span jhiTranslate="metrics.jvm.threads.waiting">Waiting</span> ({{metrics.gauges['jvm.threads.waiting.count'].value}})</p>
  36. <ngb-progressbar [value]="metrics.gauges['jvm.threads.waiting.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="warning">
  37. <span>{{metrics.gauges['jvm.threads.waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}%</span>
  38. </ngb-progressbar>
  39. <p><span jhiTranslate="metrics.jvm.threads.blocked">Blocked</span> ({{metrics.gauges['jvm.threads.blocked.count'].value}})</p>
  40. <ngb-progressbar [value]="metrics.gauges['jvm.threads.blocked.count'].value" [max]="metrics.gauges['jvm.threads.count'].value" [striped]="true" [animated]="false" type="success">
  41. <span>{{metrics.gauges['jvm.threads.blocked.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}%</span>
  42. </ngb-progressbar>
  43. </div>
  44. <div class="col-md-4">
  45. <b jhiTranslate="metrics.jvm.gc.title">Garbage collections</b>
  46. <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-MarkSweep.count']">
  47. <div class="col-md-9" jhiTranslate="metrics.jvm.gc.marksweepcount">Mark Sweep count</div>
  48. <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-MarkSweep.count'].value}}</div>
  49. </div>
  50. <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-MarkSweep.time']">
  51. <div class="col-md-9" jhiTranslate="metrics.jvm.gc.marksweeptime">Mark Sweep time</div>
  52. <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-MarkSweep.time'].value}}ms</div>
  53. </div>
  54. <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-Scavenge.count']">
  55. <div class="col-md-9" jhiTranslate="metrics.jvm.gc.scavengecount">Scavenge count</div>
  56. <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-Scavenge.count'].value}}</div>
  57. </div>
  58. <div class="row" *ngIf="metrics.gauges['jvm.garbage.PS-Scavenge.time']">
  59. <div class="col-md-9" jhiTranslate="metrics.jvm.gc.scavengetime">Scavenge time</div>
  60. <div class="col-md-3 text-right">{{metrics.gauges['jvm.garbage.PS-Scavenge.time'].value}}ms</div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="well well-lg" *ngIf="updatingMetrics" jhiTranslate="metrics.updating">Updating...</div>
  65. <h3 jhiTranslate="metrics.jvm.http.title">HTTP requests (events per second)</h3>
  66. <p *ngIf="metrics.counters">
  67. <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>
  68. </p>
  69. <div class="table-responsive" *ngIf="!updatingMetrics">
  70. <table class="table table-striped">
  71. <thead>
  72. <tr>
  73. <th jhiTranslate="metrics.jvm.http.table.code">Code</th>
  74. <th jhiTranslate="metrics.jvm.http.table.count">Count</th>
  75. <th class="text-right" jhiTranslate="metrics.jvm.http.table.mean">Mean</th>
  76. <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (1 min)</th>
  77. <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (5 min)</th>
  78. <th class="text-right"><span jhiTranslate="metrics.jvm.http.table.average">Average</span> (15 min)</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <tr>
  83. <td jhiTranslate="metrics.jvm.http.code.ok">OK</td>
  84. <td>
  85. <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">
  86. <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count}}</span>
  87. </ngb-progressbar>
  88. </td>
  89. <td class="text-right">
  90. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].mean_rate) | number:'1.0-2'}}
  91. </td>
  92. <td class="text-right">
  93. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m1_rate) | number:'1.0-2'}}
  94. </td>
  95. <td class="text-right">
  96. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m5_rate) | number:'1.0-2'}}
  97. </td>
  98. <td class="text-right">
  99. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m15_rate) | number:'1.0-2'}}
  100. </td>
  101. </tr>
  102. <tr>
  103. <td jhiTranslate="metrics.jvm.http.code.notfound">Not Found</td>
  104. <td>
  105. <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">
  106. <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count}}</span>
  107. </ngb-progressbar>
  108. </td>
  109. <td class="text-right">
  110. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].mean_rate) | number:'1.0-2'}}
  111. </td>
  112. <td class="text-right">
  113. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m1_rate) | number:'1.0-2'}}
  114. </td>
  115. <td class="text-right">
  116. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m5_rate) | number:'1.0-2'}}
  117. </td>
  118. <td class="text-right">
  119. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m15_rate) | number:'1.0-2'}}
  120. </td>
  121. </tr>
  122. <tr>
  123. <td jhiTranslate="metrics.jvm.http.code.servererror">Server error</td>
  124. <td>
  125. <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">
  126. <span>{{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count}}</span>
  127. </ngb-progressbar>
  128. </td>
  129. <td class="text-right">
  130. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].mean_rate) | number:'1.0-2'}}
  131. </td>
  132. <td class="text-right">
  133. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m1_rate) | number:'1.0-2'}}
  134. </td>
  135. <td class="text-right">
  136. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m5_rate) | number:'1.0-2'}}
  137. </td>
  138. <td class="text-right">
  139. {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m15_rate) | number:'1.0-2'}}
  140. </td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </div>
  145. <h3 jhiTranslate="metrics.servicesstats.title">Services statistics (time in millisecond)</h3>
  146. <div class="table-responsive" *ngIf="!updatingMetrics">
  147. <table class="table table-striped">
  148. <thead>
  149. <tr>
  150. <th jhiTranslate="metrics.servicesstats.table.name">Service name</th>
  151. <th class="text-right" jhiTranslate="metrics.servicesstats.table.count">Count</th>
  152. <th class="text-right" jhiTranslate="metrics.servicesstats.table.mean">Mean</th>
  153. <th class="text-right" jhiTranslate="metrics.servicesstats.table.min">Min</th>
  154. <th class="text-right" jhiTranslate="metrics.servicesstats.table.p50">p50</th>
  155. <th class="text-right" jhiTranslate="metrics.servicesstats.table.p75">p75</th>
  156. <th class="text-right" jhiTranslate="metrics.servicesstats.table.p95">p95</th>
  157. <th class="text-right" jhiTranslate="metrics.servicesstats.table.p99">p99</th>
  158. <th class="text-right" jhiTranslate="metrics.servicesstats.table.max">Max</th>
  159. </tr>
  160. </thead>
  161. <tbody>
  162. <tr *ngFor="let entry of servicesStats | keys">
  163. <td>{{entry.key}}</td>
  164. <td class="text-right">{{entry.value.count}}</td>
  165. <td class="text-right">{{entry.value.mean * 1024 | number:'1.0-0'}}</td>
  166. <td class="text-right">{{entry.value.min * 1024 | number:'1.0-0'}}</td>
  167. <td class="text-right">{{entry.value.p50 * 1024 | number:'1.0-0'}}</td>
  168. <td class="text-right">{{entry.value.p75 * 1024 | number:'1.0-0'}}</td>
  169. <td class="text-right">{{entry.value.p95 * 1024 | number:'1.0-0'}}</td>
  170. <td class="text-right">{{entry.value.p99 * 1024 | number:'1.0-0'}}</td>
  171. <td class="text-right">{{entry.value.max * 1024 | number:'1.0-0'}}</td>
  172. </tr>
  173. </tbody>
  174. </table>
  175. </div>
  176. <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>
  177. <div class="table-responsive" *ngIf="!updatingMetrics && metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'] && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0">
  178. <table class="table table-striped">
  179. <thead>
  180. <tr>
  181. <th><span jhiTranslate="metrics.datasource.usage">Usage</span> ({{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value}} / {{metrics.gauges['HikariPool-1.pool.TotalConnections'].value}})</th>
  182. <th class="text-right" jhiTranslate="metrics.datasource.count">Count</th>
  183. <th class="text-right" jhiTranslate="metrics.datasource.mean">Mean</th>
  184. <th class="text-right" jhiTranslate="metrics.datasource.min">Min</th>
  185. <th class="text-right" jhiTranslate="metrics.datasource.p50">p50</th>
  186. <th class="text-right" jhiTranslate="metrics.datasource.p75">p75</th>
  187. <th class="text-right" jhiTranslate="metrics.datasource.p95">p95</th>
  188. <th class="text-right" jhiTranslate="metrics.datasource.p99">p99</th>
  189. <th class="text-right" jhiTranslate="metrics.datasource.max">Max</th>
  190. </tr>
  191. </thead>
  192. <tbody>
  193. <tr>
  194. <td>
  195. <div class="progress progress-striped">
  196. <ngb-progressbar [max]="metrics.gauges['HikariPool-1.pool.TotalConnections'].value" [value]="metrics.gauges['HikariPool-1.pool.ActiveConnections'].value" [striped]="true" [animated]="false" type="success">
  197. <span>{{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value * 100 / metrics.gauges['HikariPool-1.pool.TotalConnections'].value | number:'1.0-0'}}%</span>
  198. </ngb-progressbar>
  199. </div>
  200. </td>
  201. <td class="text-right">{{metrics.histograms['HikariPool-1.pool.Usage'].count}}</td>
  202. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].mean) | number:'1.0-2'}}</td>
  203. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].min) | number:'1.0-2'}}</td>
  204. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p50) | number:'1.0-2'}}</td>
  205. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p75) | number:'1.0-2'}}</td>
  206. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p95) | number:'1.0-2'}}</td>
  207. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p99) | number:'1.0-2'}}</td>
  208. <td class="text-right">{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].max) | number:'1.0-2'}}</td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. </div>
  213. </div>