synapse.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. {{ template "head" . }}
  2. {{ template "prom_content_head" . }}
  3. <h1>System Resources</h1>
  4. <h3>CPU</h3>
  5. <div id="process_resource_utime"></div>
  6. <script>
  7. new PromConsole.Graph({
  8. node: document.querySelector("#process_resource_utime"),
  9. expr: "rate(process_cpu_seconds_total[2m]) * 100",
  10. name: "[[job]]-[[index]]",
  11. min: 0,
  12. max: 100,
  13. renderer: "line",
  14. height: 150,
  15. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  16. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  17. yUnits: "%",
  18. yTitle: "CPU Usage"
  19. })
  20. </script>
  21. <h3>Memory</h3>
  22. <div id="process_resident_memory_bytes"></div>
  23. <script>
  24. new PromConsole.Graph({
  25. node: document.querySelector("#process_resident_memory_bytes"),
  26. expr: "process_resident_memory_bytes",
  27. name: "[[job]]-[[index]]",
  28. min: 0,
  29. renderer: "line",
  30. height: 150,
  31. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  32. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  33. yUnits: "bytes",
  34. yTitle: "Usage"
  35. })
  36. </script>
  37. <h3>File descriptors</h3>
  38. <div id="process_fds"></div>
  39. <script>
  40. new PromConsole.Graph({
  41. node: document.querySelector("#process_fds"),
  42. expr: "process_open_fds",
  43. name: "[[job]]-[[index]]",
  44. min: 0,
  45. renderer: "line",
  46. height: 150,
  47. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  48. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  49. yUnits: "",
  50. yTitle: "Descriptors"
  51. })
  52. </script>
  53. <h1>Reactor</h1>
  54. <h3>Total reactor time</h3>
  55. <div id="reactor_total_time"></div>
  56. <script>
  57. new PromConsole.Graph({
  58. node: document.querySelector("#reactor_total_time"),
  59. expr: "rate(python_twisted_reactor_tick_time_sum[2m])",
  60. name: "[[job]]-[[index]]",
  61. max: 1,
  62. min: 0,
  63. renderer: "area",
  64. height: 150,
  65. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  66. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  67. yUnits: "s/s",
  68. yTitle: "Usage"
  69. })
  70. </script>
  71. <h3>Average reactor tick time</h3>
  72. <div id="reactor_average_time"></div>
  73. <script>
  74. new PromConsole.Graph({
  75. node: document.querySelector("#reactor_average_time"),
  76. expr: "rate(python_twisted_reactor_tick_time_sum[2m]) / rate(python_twisted_reactor_tick_time_count[2m])",
  77. name: "[[job]]-[[index]]",
  78. min: 0,
  79. renderer: "line",
  80. height: 150,
  81. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  82. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  83. yUnits: "s",
  84. yTitle: "Time"
  85. })
  86. </script>
  87. <h3>Pending calls per tick</h3>
  88. <div id="reactor_pending_calls"></div>
  89. <script>
  90. new PromConsole.Graph({
  91. node: document.querySelector("#reactor_pending_calls"),
  92. expr: "rate(python_twisted_reactor_pending_calls_sum[30s]) / rate(python_twisted_reactor_pending_calls_count[30s])",
  93. name: "[[job]]-[[index]]",
  94. min: 0,
  95. renderer: "line",
  96. height: 150,
  97. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  98. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  99. yTitle: "Pending Calls"
  100. })
  101. </script>
  102. <h1>Storage</h1>
  103. <h3>Queries</h3>
  104. <div id="synapse_storage_query_time"></div>
  105. <script>
  106. new PromConsole.Graph({
  107. node: document.querySelector("#synapse_storage_query_time"),
  108. expr: "sum(rate(synapse_storage_query_time_count[2m])) by (verb)",
  109. name: "[[verb]]",
  110. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  111. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  112. yUnits: "queries/s",
  113. yTitle: "Queries"
  114. })
  115. </script>
  116. <h3>Transactions</h3>
  117. <div id="synapse_storage_transaction_time"></div>
  118. <script>
  119. new PromConsole.Graph({
  120. node: document.querySelector("#synapse_storage_transaction_time"),
  121. expr: "topk(10, rate(synapse_storage_transaction_time_count[2m]))",
  122. name: "[[job]]-[[index]] [[desc]]",
  123. min: 0,
  124. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  125. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  126. yUnits: "txn/s",
  127. yTitle: "Transactions"
  128. })
  129. </script>
  130. <h3>Transaction execution time</h3>
  131. <div id="synapse_storage_transactions_time_sec"></div>
  132. <script>
  133. new PromConsole.Graph({
  134. node: document.querySelector("#synapse_storage_transactions_time_sec"),
  135. expr: "rate(synapse_storage_transaction_time_sum[2m])",
  136. name: "[[job]]-[[index]] [[desc]]",
  137. min: 0,
  138. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  139. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  140. yUnits: "s/s",
  141. yTitle: "Usage"
  142. })
  143. </script>
  144. <h3>Average time waiting for database connection</h3>
  145. <div id="synapse_storage_avg_waiting_time"></div>
  146. <script>
  147. new PromConsole.Graph({
  148. node: document.querySelector("#synapse_storage_avg_waiting_time"),
  149. expr: "rate(synapse_storage_schedule_time_sum[2m]) / rate(synapse_storage_schedule_time_count[2m])",
  150. name: "[[job]]-[[index]]",
  151. min: 0,
  152. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  153. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  154. yUnits: "s",
  155. yTitle: "Time"
  156. })
  157. </script>
  158. <h3>Cache request rate</h3>
  159. <div id="synapse_cache_request_rate"></div>
  160. <script>
  161. new PromConsole.Graph({
  162. node: document.querySelector("#synapse_cache_request_rate"),
  163. expr: "rate(synapse_util_caches_cache:total[2m])",
  164. name: "[[job]]-[[index]] [[name]]",
  165. min: 0,
  166. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  167. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  168. yUnits: "rps",
  169. yTitle: "Cache request rate"
  170. })
  171. </script>
  172. <h3>Cache size</h3>
  173. <div id="synapse_cache_size"></div>
  174. <script>
  175. new PromConsole.Graph({
  176. node: document.querySelector("#synapse_cache_size"),
  177. expr: "synapse_util_caches_cache:size",
  178. name: "[[job]]-[[index]] [[name]]",
  179. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  180. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  181. yUnits: "",
  182. yTitle: "Items"
  183. })
  184. </script>
  185. <h1>Requests</h1>
  186. <h3>Requests by Servlet</h3>
  187. <div id="synapse_http_server_request_count_servlet"></div>
  188. <script>
  189. new PromConsole.Graph({
  190. node: document.querySelector("#synapse_http_server_request_count_servlet"),
  191. expr: "rate(synapse_http_server_in_flight_requests_count[2m])",
  192. name: "[[job]]-[[index]] [[method]] [[servlet]]",
  193. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  194. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  195. yUnits: "req/s",
  196. yTitle: "Requests"
  197. })
  198. </script>
  199. <h4>&nbsp;(without <tt>EventStreamRestServlet</tt> or <tt>SyncRestServlet</tt>)</h4>
  200. <div id="synapse_http_server_request_count_servlet_minus_events"></div>
  201. <script>
  202. new PromConsole.Graph({
  203. node: document.querySelector("#synapse_http_server_request_count_servlet_minus_events"),
  204. expr: "rate(synapse_http_server_in_flight_requests_count{servlet!=\"EventStreamRestServlet\", servlet!=\"SyncRestServlet\"}[2m])",
  205. name: "[[job]]-[[index]] [[method]] [[servlet]]",
  206. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  207. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  208. yUnits: "req/s",
  209. yTitle: "Requests"
  210. })
  211. </script>
  212. <h3>Average response times</h3>
  213. <div id="synapse_http_server_response_time_avg"></div>
  214. <script>
  215. new PromConsole.Graph({
  216. node: document.querySelector("#synapse_http_server_response_time_avg"),
  217. expr: "rate(synapse_http_server_response_time_seconds_sum[2m]) / rate(synapse_http_server_response_count[2m])",
  218. name: "[[job]]-[[index]] [[servlet]]",
  219. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  220. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  221. yUnits: "s/req",
  222. yTitle: "Response time"
  223. })
  224. </script>
  225. <h3>All responses by code</h3>
  226. <div id="synapse_http_server_responses"></div>
  227. <script>
  228. new PromConsole.Graph({
  229. node: document.querySelector("#synapse_http_server_responses"),
  230. expr: "rate(synapse_http_server_responses[2m])",
  231. name: "[[method]] / [[code]]",
  232. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  233. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  234. yUnits: "req/s",
  235. yTitle: "Requests"
  236. })
  237. </script>
  238. <h3>Error responses by code</h3>
  239. <div id="synapse_http_server_responses_err"></div>
  240. <script>
  241. new PromConsole.Graph({
  242. node: document.querySelector("#synapse_http_server_responses_err"),
  243. expr: "rate(synapse_http_server_responses{code=~\"[45]..\"}[2m])",
  244. name: "[[method]] / [[code]]",
  245. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  246. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  247. yUnits: "req/s",
  248. yTitle: "Requests"
  249. })
  250. </script>
  251. <h3>CPU Usage</h3>
  252. <div id="synapse_http_server_response_ru_utime"></div>
  253. <script>
  254. new PromConsole.Graph({
  255. node: document.querySelector("#synapse_http_server_response_ru_utime"),
  256. expr: "rate(synapse_http_server_response_ru_utime_seconds[2m])",
  257. name: "[[job]]-[[index]] [[servlet]]",
  258. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  259. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  260. yUnits: "s/s",
  261. yTitle: "CPU Usage"
  262. })
  263. </script>
  264. <h3>DB Usage</h3>
  265. <div id="synapse_http_server_response_db_txn_duration"></div>
  266. <script>
  267. new PromConsole.Graph({
  268. node: document.querySelector("#synapse_http_server_response_db_txn_duration"),
  269. expr: "rate(synapse_http_server_response_db_txn_duration_seconds[2m])",
  270. name: "[[job]]-[[index]] [[servlet]]",
  271. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  272. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  273. yUnits: "s/s",
  274. yTitle: "DB Usage"
  275. })
  276. </script>
  277. <h3>Average event send times</h3>
  278. <div id="synapse_http_server_send_time_avg"></div>
  279. <script>
  280. new PromConsole.Graph({
  281. node: document.querySelector("#synapse_http_server_send_time_avg"),
  282. expr: "rate(synapse_http_server_response_time_seconds_sum{servlet='RoomSendEventRestServlet'}[2m]) / rate(synapse_http_server_response_count{servlet='RoomSendEventRestServlet'}[2m])",
  283. name: "[[job]]-[[index]] [[servlet]]",
  284. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  285. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  286. yUnits: "s/req",
  287. yTitle: "Response time"
  288. })
  289. </script>
  290. <h1>Federation</h1>
  291. <h3>Sent Messages</h3>
  292. <div id="synapse_federation_client_sent"></div>
  293. <script>
  294. new PromConsole.Graph({
  295. node: document.querySelector("#synapse_federation_client_sent"),
  296. expr: "rate(synapse_federation_client_sent[2m])",
  297. name: "[[job]]-[[index]] [[type]]",
  298. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  299. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  300. yUnits: "req/s",
  301. yTitle: "Requests"
  302. })
  303. </script>
  304. <h3>Received Messages</h3>
  305. <div id="synapse_federation_server_received"></div>
  306. <script>
  307. new PromConsole.Graph({
  308. node: document.querySelector("#synapse_federation_server_received"),
  309. expr: "rate(synapse_federation_server_received[2m])",
  310. name: "[[job]]-[[index]] [[type]]",
  311. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  312. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  313. yUnits: "req/s",
  314. yTitle: "Requests"
  315. })
  316. </script>
  317. <h3>Pending</h3>
  318. <div id="synapse_federation_transaction_queue_pending"></div>
  319. <script>
  320. new PromConsole.Graph({
  321. node: document.querySelector("#synapse_federation_transaction_queue_pending"),
  322. expr: "synapse_federation_transaction_queue_pending",
  323. name: "[[type]]",
  324. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  325. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  326. yUnits: "",
  327. yTitle: "Units"
  328. })
  329. </script>
  330. <h1>Clients</h1>
  331. <h3>Notifiers</h3>
  332. <div id="synapse_notifier_listeners"></div>
  333. <script>
  334. new PromConsole.Graph({
  335. node: document.querySelector("#synapse_notifier_listeners"),
  336. expr: "synapse_notifier_listeners",
  337. name: "[[job]]-[[index]]",
  338. min: 0,
  339. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  340. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  341. yUnits: "",
  342. yTitle: "Listeners"
  343. })
  344. </script>
  345. <h3>Notified Events</h3>
  346. <div id="synapse_notifier_notified_events"></div>
  347. <script>
  348. new PromConsole.Graph({
  349. node: document.querySelector("#synapse_notifier_notified_events"),
  350. expr: "rate(synapse_notifier_notified_events[2m])",
  351. name: "[[job]]-[[index]]",
  352. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  353. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  354. yUnits: "events/s",
  355. yTitle: "Event rate"
  356. })
  357. </script>
  358. {{ template "prom_content_tail" . }}
  359. {{ template "tail" }}