1
0

synapse.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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. <h1>Storage</h1>
  88. <h3>Queries</h3>
  89. <div id="synapse_storage_query_time"></div>
  90. <script>
  91. new PromConsole.Graph({
  92. node: document.querySelector("#synapse_storage_query_time"),
  93. expr: "sum(rate(synapse_storage_query_time_count[2m])) by (verb)",
  94. name: "[[verb]]",
  95. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  96. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  97. yUnits: "queries/s",
  98. yTitle: "Queries"
  99. })
  100. </script>
  101. <h3>Transactions</h3>
  102. <div id="synapse_storage_transaction_time"></div>
  103. <script>
  104. new PromConsole.Graph({
  105. node: document.querySelector("#synapse_storage_transaction_time"),
  106. expr: "topk(10, rate(synapse_storage_transaction_time_count[2m]))",
  107. name: "[[job]]-[[index]] [[desc]]",
  108. min: 0,
  109. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  110. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  111. yUnits: "txn/s",
  112. yTitle: "Transactions"
  113. })
  114. </script>
  115. <h3>Transaction execution time</h3>
  116. <div id="synapse_storage_transactions_time_sec"></div>
  117. <script>
  118. new PromConsole.Graph({
  119. node: document.querySelector("#synapse_storage_transactions_time_sec"),
  120. expr: "rate(synapse_storage_transaction_time_sum[2m])",
  121. name: "[[job]]-[[index]] [[desc]]",
  122. min: 0,
  123. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  124. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  125. yUnits: "s/s",
  126. yTitle: "Usage"
  127. })
  128. </script>
  129. <h3>Average time waiting for database connection</h3>
  130. <div id="synapse_storage_avg_waiting_time"></div>
  131. <script>
  132. new PromConsole.Graph({
  133. node: document.querySelector("#synapse_storage_avg_waiting_time"),
  134. expr: "rate(synapse_storage_schedule_time_sum[2m]) / rate(synapse_storage_schedule_time_count[2m])",
  135. name: "[[job]]-[[index]]",
  136. min: 0,
  137. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  138. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  139. yUnits: "s",
  140. yTitle: "Time"
  141. })
  142. </script>
  143. <h3>Cache request rate</h3>
  144. <div id="synapse_cache_request_rate"></div>
  145. <script>
  146. new PromConsole.Graph({
  147. node: document.querySelector("#synapse_cache_request_rate"),
  148. expr: "rate(synapse_util_caches_cache:total[2m])",
  149. name: "[[job]]-[[index]] [[name]]",
  150. min: 0,
  151. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  152. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  153. yUnits: "rps",
  154. yTitle: "Cache request rate"
  155. })
  156. </script>
  157. <h3>Cache size</h3>
  158. <div id="synapse_cache_size"></div>
  159. <script>
  160. new PromConsole.Graph({
  161. node: document.querySelector("#synapse_cache_size"),
  162. expr: "synapse_util_caches_cache:size",
  163. name: "[[job]]-[[index]] [[name]]",
  164. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  165. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  166. yUnits: "",
  167. yTitle: "Items"
  168. })
  169. </script>
  170. <h1>Requests</h1>
  171. <h3>Requests by Servlet</h3>
  172. <div id="synapse_http_server_request_count_servlet"></div>
  173. <script>
  174. new PromConsole.Graph({
  175. node: document.querySelector("#synapse_http_server_request_count_servlet"),
  176. expr: "rate(synapse_http_server_in_flight_requests_count[2m])",
  177. name: "[[job]]-[[index]] [[method]] [[servlet]]",
  178. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  179. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  180. yUnits: "req/s",
  181. yTitle: "Requests"
  182. })
  183. </script>
  184. <h4>&nbsp;(without <tt>EventStreamRestServlet</tt> or <tt>SyncRestServlet</tt>)</h4>
  185. <div id="synapse_http_server_request_count_servlet_minus_events"></div>
  186. <script>
  187. new PromConsole.Graph({
  188. node: document.querySelector("#synapse_http_server_request_count_servlet_minus_events"),
  189. expr: "rate(synapse_http_server_in_flight_requests_count{servlet!=\"EventStreamRestServlet\", servlet!=\"SyncRestServlet\"}[2m])",
  190. name: "[[job]]-[[index]] [[method]] [[servlet]]",
  191. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  192. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  193. yUnits: "req/s",
  194. yTitle: "Requests"
  195. })
  196. </script>
  197. <h3>Average response times</h3>
  198. <div id="synapse_http_server_response_time_avg"></div>
  199. <script>
  200. new PromConsole.Graph({
  201. node: document.querySelector("#synapse_http_server_response_time_avg"),
  202. expr: "rate(synapse_http_server_response_time_seconds_sum[2m]) / rate(synapse_http_server_response_count[2m])",
  203. name: "[[job]]-[[index]] [[servlet]]",
  204. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  205. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  206. yUnits: "s/req",
  207. yTitle: "Response time"
  208. })
  209. </script>
  210. <h3>All responses by code</h3>
  211. <div id="synapse_http_server_responses"></div>
  212. <script>
  213. new PromConsole.Graph({
  214. node: document.querySelector("#synapse_http_server_responses"),
  215. expr: "rate(synapse_http_server_responses[2m])",
  216. name: "[[method]] / [[code]]",
  217. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  218. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  219. yUnits: "req/s",
  220. yTitle: "Requests"
  221. })
  222. </script>
  223. <h3>Error responses by code</h3>
  224. <div id="synapse_http_server_responses_err"></div>
  225. <script>
  226. new PromConsole.Graph({
  227. node: document.querySelector("#synapse_http_server_responses_err"),
  228. expr: "rate(synapse_http_server_responses{code=~\"[45]..\"}[2m])",
  229. name: "[[method]] / [[code]]",
  230. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  231. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  232. yUnits: "req/s",
  233. yTitle: "Requests"
  234. })
  235. </script>
  236. <h3>CPU Usage</h3>
  237. <div id="synapse_http_server_response_ru_utime"></div>
  238. <script>
  239. new PromConsole.Graph({
  240. node: document.querySelector("#synapse_http_server_response_ru_utime"),
  241. expr: "rate(synapse_http_server_response_ru_utime_seconds[2m])",
  242. name: "[[job]]-[[index]] [[servlet]]",
  243. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  244. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  245. yUnits: "s/s",
  246. yTitle: "CPU Usage"
  247. })
  248. </script>
  249. <h3>DB Usage</h3>
  250. <div id="synapse_http_server_response_db_txn_duration"></div>
  251. <script>
  252. new PromConsole.Graph({
  253. node: document.querySelector("#synapse_http_server_response_db_txn_duration"),
  254. expr: "rate(synapse_http_server_response_db_txn_duration_seconds[2m])",
  255. name: "[[job]]-[[index]] [[servlet]]",
  256. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  257. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  258. yUnits: "s/s",
  259. yTitle: "DB Usage"
  260. })
  261. </script>
  262. <h3>Average event send times</h3>
  263. <div id="synapse_http_server_send_time_avg"></div>
  264. <script>
  265. new PromConsole.Graph({
  266. node: document.querySelector("#synapse_http_server_send_time_avg"),
  267. expr: "rate(synapse_http_server_response_time_seconds_sum{servlet='RoomSendEventRestServlet'}[2m]) / rate(synapse_http_server_response_count{servlet='RoomSendEventRestServlet'}[2m])",
  268. name: "[[job]]-[[index]] [[servlet]]",
  269. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  270. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  271. yUnits: "s/req",
  272. yTitle: "Response time"
  273. })
  274. </script>
  275. <h1>Federation</h1>
  276. <h3>Sent Messages</h3>
  277. <div id="synapse_federation_client_sent"></div>
  278. <script>
  279. new PromConsole.Graph({
  280. node: document.querySelector("#synapse_federation_client_sent"),
  281. expr: "rate(synapse_federation_client_sent[2m])",
  282. name: "[[job]]-[[index]] [[type]]",
  283. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  284. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  285. yUnits: "req/s",
  286. yTitle: "Requests"
  287. })
  288. </script>
  289. <h3>Received Messages</h3>
  290. <div id="synapse_federation_server_received"></div>
  291. <script>
  292. new PromConsole.Graph({
  293. node: document.querySelector("#synapse_federation_server_received"),
  294. expr: "rate(synapse_federation_server_received[2m])",
  295. name: "[[job]]-[[index]] [[type]]",
  296. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  297. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  298. yUnits: "req/s",
  299. yTitle: "Requests"
  300. })
  301. </script>
  302. <h3>Pending</h3>
  303. <div id="synapse_federation_transaction_queue_pending"></div>
  304. <script>
  305. new PromConsole.Graph({
  306. node: document.querySelector("#synapse_federation_transaction_queue_pending"),
  307. expr: "synapse_federation_transaction_queue_pending",
  308. name: "[[type]]",
  309. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  310. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  311. yUnits: "",
  312. yTitle: "Units"
  313. })
  314. </script>
  315. <h1>Clients</h1>
  316. <h3>Notifiers</h3>
  317. <div id="synapse_notifier_listeners"></div>
  318. <script>
  319. new PromConsole.Graph({
  320. node: document.querySelector("#synapse_notifier_listeners"),
  321. expr: "synapse_notifier_listeners",
  322. name: "[[job]]-[[index]]",
  323. min: 0,
  324. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  325. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  326. yUnits: "",
  327. yTitle: "Listeners"
  328. })
  329. </script>
  330. <h3>Notified Events</h3>
  331. <div id="synapse_notifier_notified_events"></div>
  332. <script>
  333. new PromConsole.Graph({
  334. node: document.querySelector("#synapse_notifier_notified_events"),
  335. expr: "rate(synapse_notifier_notified_events[2m])",
  336. name: "[[job]]-[[index]]",
  337. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  338. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  339. yUnits: "events/s",
  340. yTitle: "Event rate"
  341. })
  342. </script>
  343. {{ template "prom_content_tail" . }}
  344. {{ template "tail" }}