synapse.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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]]",
  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_resource_maxrss"></div>
  23. <script>
  24. new PromConsole.Graph({
  25. node: document.querySelector("#process_resource_maxrss"),
  26. expr: "process_psutil_rss:max",
  27. name: "Maxrss",
  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{job='synapse'}",
  43. name: "FDs",
  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:total[2m]) / 1000",
  60. name: "time",
  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:total[2m]) / rate(python_twisted_reactor_tick_time:count[2m]) / 1000",
  77. name: "time",
  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:total[30s])/rate(python_twisted_reactor_pending_calls:count[30s])",
  93. name: "calls",
  94. min: 0,
  95. renderer: "line",
  96. height: 150,
  97. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  98. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  99. yTitle: "Pending Cals"
  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: "rate(synapse_storage_query_time:count[2m])",
  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: "rate(synapse_storage_transaction_time:count[2m])",
  122. name: "[[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_msec"></div>
  132. <script>
  133. new PromConsole.Graph({
  134. node: document.querySelector("#synapse_storage_transactions_time_msec"),
  135. expr: "rate(synapse_storage_transaction_time:total[2m]) / 1000",
  136. name: "[[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>Database scheduling latency</h3>
  145. <div id="synapse_storage_schedule_time"></div>
  146. <script>
  147. new PromConsole.Graph({
  148. node: document.querySelector("#synapse_storage_schedule_time"),
  149. expr: "rate(synapse_storage_schedule_time:total[2m]) / 1000",
  150. name: "Total latency",
  151. min: 0,
  152. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  153. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  154. yUnits: "s/s",
  155. yTitle: "Usage"
  156. })
  157. </script>
  158. <h3>Cache hit ratio</h3>
  159. <div id="synapse_cache_ratio"></div>
  160. <script>
  161. new PromConsole.Graph({
  162. node: document.querySelector("#synapse_cache_ratio"),
  163. expr: "rate(synapse_util_caches_cache:total[2m]) * 100",
  164. name: "[[name]]",
  165. min: 0,
  166. max: 100,
  167. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  168. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  169. yUnits: "%",
  170. yTitle: "Percentage"
  171. })
  172. </script>
  173. <h3>Cache size</h3>
  174. <div id="synapse_cache_size"></div>
  175. <script>
  176. new PromConsole.Graph({
  177. node: document.querySelector("#synapse_cache_size"),
  178. expr: "synapse_util_caches_cache:size",
  179. name: "[[name]]",
  180. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  181. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  182. yUnits: "",
  183. yTitle: "Items"
  184. })
  185. </script>
  186. <h1>Requests</h1>
  187. <h3>Requests by Servlet</h3>
  188. <div id="synapse_http_server_request_count_servlet"></div>
  189. <script>
  190. new PromConsole.Graph({
  191. node: document.querySelector("#synapse_http_server_request_count_servlet"),
  192. expr: "rate(synapse_http_server_request_count:servlet[2m])",
  193. name: "[[servlet]]",
  194. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  195. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  196. yUnits: "req/s",
  197. yTitle: "Requests"
  198. })
  199. </script>
  200. <h4>&nbsp;(without <tt>EventStreamRestServlet</tt> or <tt>SyncRestServlet</tt>)</h4>
  201. <div id="synapse_http_server_request_count_servlet_minus_events"></div>
  202. <script>
  203. new PromConsole.Graph({
  204. node: document.querySelector("#synapse_http_server_request_count_servlet_minus_events"),
  205. expr: "rate(synapse_http_server_request_count:servlet{servlet!=\"EventStreamRestServlet\", servlet!=\"SyncRestServlet\"}[2m])",
  206. name: "[[servlet]]",
  207. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  208. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  209. yUnits: "req/s",
  210. yTitle: "Requests"
  211. })
  212. </script>
  213. <h3>Average response times</h3>
  214. <div id="synapse_http_server_response_time_avg"></div>
  215. <script>
  216. new PromConsole.Graph({
  217. node: document.querySelector("#synapse_http_server_response_time_avg"),
  218. expr: "rate(synapse_http_server_response_time_seconds[2m]) / rate(synapse_http_server_response_count[2m]) / 1000",
  219. name: "[[servlet]]",
  220. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  221. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  222. yUnits: "s/req",
  223. yTitle: "Response time"
  224. })
  225. </script>
  226. <h3>All responses by code</h3>
  227. <div id="synapse_http_server_responses"></div>
  228. <script>
  229. new PromConsole.Graph({
  230. node: document.querySelector("#synapse_http_server_responses"),
  231. expr: "rate(synapse_http_server_responses[2m])",
  232. name: "[[method]] / [[code]]",
  233. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  234. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  235. yUnits: "req/s",
  236. yTitle: "Requests"
  237. })
  238. </script>
  239. <h3>Error responses by code</h3>
  240. <div id="synapse_http_server_responses_err"></div>
  241. <script>
  242. new PromConsole.Graph({
  243. node: document.querySelector("#synapse_http_server_responses_err"),
  244. expr: "rate(synapse_http_server_responses{code=~\"[45]..\"}[2m])",
  245. name: "[[method]] / [[code]]",
  246. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  247. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  248. yUnits: "req/s",
  249. yTitle: "Requests"
  250. })
  251. </script>
  252. <h3>CPU Usage</h3>
  253. <div id="synapse_http_server_response_ru_utime"></div>
  254. <script>
  255. new PromConsole.Graph({
  256. node: document.querySelector("#synapse_http_server_response_ru_utime"),
  257. expr: "rate(synapse_http_server_response_ru_utime_seconds[2m])",
  258. name: "[[servlet]]",
  259. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  260. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  261. yUnits: "s/s",
  262. yTitle: "CPU Usage"
  263. })
  264. </script>
  265. <h3>DB Usage</h3>
  266. <div id="synapse_http_server_response_db_txn_duration"></div>
  267. <script>
  268. new PromConsole.Graph({
  269. node: document.querySelector("#synapse_http_server_response_db_txn_duration"),
  270. expr: "rate(synapse_http_server_response_db_txn_duration_seconds[2m])",
  271. name: "[[servlet]]",
  272. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  273. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  274. yUnits: "s/s",
  275. yTitle: "DB Usage"
  276. })
  277. </script>
  278. <h3>Average event send times</h3>
  279. <div id="synapse_http_server_send_time_avg"></div>
  280. <script>
  281. new PromConsole.Graph({
  282. node: document.querySelector("#synapse_http_server_send_time_avg"),
  283. expr: "rate(synapse_http_server_response_time_second{servlet='RoomSendEventRestServlet'}[2m]) / rate(synapse_http_server_response_count{servlet='RoomSendEventRestServlet'}[2m]) / 1000",
  284. name: "[[servlet]]",
  285. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  286. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  287. yUnits: "s/req",
  288. yTitle: "Response time"
  289. })
  290. </script>
  291. <h1>Federation</h1>
  292. <h3>Sent Messages</h3>
  293. <div id="synapse_federation_client_sent"></div>
  294. <script>
  295. new PromConsole.Graph({
  296. node: document.querySelector("#synapse_federation_client_sent"),
  297. expr: "rate(synapse_federation_client_sent[2m])",
  298. name: "[[type]]",
  299. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  300. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  301. yUnits: "req/s",
  302. yTitle: "Requests"
  303. })
  304. </script>
  305. <h3>Received Messages</h3>
  306. <div id="synapse_federation_server_received"></div>
  307. <script>
  308. new PromConsole.Graph({
  309. node: document.querySelector("#synapse_federation_server_received"),
  310. expr: "rate(synapse_federation_server_received[2m])",
  311. name: "[[type]]",
  312. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  313. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  314. yUnits: "req/s",
  315. yTitle: "Requests"
  316. })
  317. </script>
  318. <h3>Pending</h3>
  319. <div id="synapse_federation_transaction_queue_pending"></div>
  320. <script>
  321. new PromConsole.Graph({
  322. node: document.querySelector("#synapse_federation_transaction_queue_pending"),
  323. expr: "synapse_federation_transaction_queue_pending",
  324. name: "[[type]]",
  325. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  326. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  327. yUnits: "",
  328. yTitle: "Units"
  329. })
  330. </script>
  331. <h1>Clients</h1>
  332. <h3>Notifiers</h3>
  333. <div id="synapse_notifier_listeners"></div>
  334. <script>
  335. new PromConsole.Graph({
  336. node: document.querySelector("#synapse_notifier_listeners"),
  337. expr: "synapse_notifier_listeners",
  338. name: "listeners",
  339. min: 0,
  340. yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  341. yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
  342. yUnits: "",
  343. yTitle: "Listeners"
  344. })
  345. </script>
  346. <h3>Notified Events</h3>
  347. <div id="synapse_notifier_notified_events"></div>
  348. <script>
  349. new PromConsole.Graph({
  350. node: document.querySelector("#synapse_notifier_notified_events"),
  351. expr: "rate(synapse_notifier_notified_events[2m])",
  352. name: "events",
  353. yAxisFormatter: PromConsole.NumberFormatter.humanize,
  354. yHoverFormatter: PromConsole.NumberFormatter.humanize,
  355. yUnits: "events/s",
  356. yTitle: "Event rate"
  357. })
  358. </script>
  359. {{ template "prom_content_tail" . }}
  360. {{ template "tail" }}