-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring.html
187 lines (186 loc) · 13.9 KB
/
monitoring.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Babl Low-Latency WebSocket Server - Monitoring</title>
<link rel="stylesheet" type="text/css" href="assets/style/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Babl Low Latency Java Websocket Server is a high performance solution for real-time web messaging.">
<meta name="keywords" content="Java Websocket web-socket low-latency high-performance garbage-free allocation-free real-time messaging scalable server"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<div class="nav" role="navigation">
<div class="nav-top">
<ul>
<li class="logo" role="logo">
<h3>
<p>BABL</p>
</h3>
</li>
<li>
<a href="https://hub.docker.com/r/aitusoftware/babl" target="_" role="link">
<svg viewBox="0 0 60 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="docker">
<title>Docker Logo</title>
<desc>Docker Link</desc>
<defs>
<linearGradient id="grad1" x1="0%" y1="100%" x2="100%" y2="0%">
<stop offset="0%" />
<stop offset="100%" />
</linearGradient>
</defs>
<g transform="translate(10.000000, 18.000000)">
<path d="M36.6816828,14.0007123 C34.5223014,18.6710524 29.1844403,26 17,26 C4.98681223,26 1.89812143,18.7391462 1.16159055,13.9999765 Z M13.914,19.597 C13.69,19.09 13.117,18.906 12.595,19.088 C10.161,19.934 6.036,20.054 3.451,20.054 C3.913,20.738 4.463,21.398 5.107,22.017 C7.258,22.017 10.103,21.888 13.404,20.915 C13.934,20.759 14.138,20.102 13.914,19.597 Z M17,16 C15.8954305,16 15,16.8954305 15,18 C15,19.1045695 15.8954305,20 17,20 C18.1045695,20 19,19.1045695 19,18 C19,16.8954305 18.1045695,16 17,16 Z M36.5,0 C38.908,2.22 39.391,4.265 39,6 C40.339,4.978 42.162,4.533 45,5.516 C43.93,9.829 41.147,10.983 39,11 C38.579,11.003 38.182,10.972 37.828,10.924 C37.6924745,11.4110991 37.4683827,12.1225663 37.1251065,12.9750343 C36.174843,12.766512 35.3893743,12.399283 35,12 C33.819,13.874 27.479,13.461 27,12 C25.625,13.75 20.25,13.438 19,12 C17.938,13.375 12.063,13.688 11,12 C9.94,13.088 5.875,13.688 4,12 C2.96486686,13.0351331 1.2947704,13.0119941 1.03455553,13.001692 C0.859446112,11.2268752 1,10 1,10 L1,10 L31,10 C34.834,10 35,9 35,9 C33.705,7.227 32.586,3.543 36.5,0 Z" id="Path-2"></path>
<path d="M17,17 C17.1030055,17 17.2023735,17.0155739 17.2958778,17.0444954 C17.1209475,17.1222959 17,17.2970236 17,17.5 C17,17.7761424 17.2238576,18 17.5,18 C17.7029764,18 17.8777041,17.8790525 17.9560454,17.7052949 C17.9844261,17.7976265 18,17.8969945 18,18 C18,18.5522847 17.5522847,19 17,19 C16.4477153,19 16,18.5522847 16,18 C16,17.4477153 16.4477153,17 17,17 Z" id="Oval-2"></path>
<path d="M19,10 L14,10 L14,5 L19,5 L19,10 Z M29,5 L24,5 L24,10 L29,10 L29,5 Z M9,5 L4,5 L4,10 L9,10 L9,5 Z M24,0 L24,5 L19,5 L19,0 L24,0 Z M14,0 L14,5 L9,5 L9,0 L14,0 Z" id="Shape"></path>
</g>
</svg>
</a>
</li>
<li>
<a href="https://github.com/babl-ws/babl" target="_" role="link">
<svg width="163px" height="158px" viewBox="0 0 163 158" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="github">
<title>Github Logo</title>
<desc>Github Link</desc>
<g>
<path d="M21,80.387 C21,107.068 38.303,129.704 62.297,137.689 C65.315,138.248 66.423,136.379 66.423,134.784 C66.423,133.344 66.367,128.587 66.341,123.541 C49.541,127.194 45.996,116.416 45.996,116.416 C43.249,109.436 39.291,107.58 39.291,107.58 C33.812,103.832 39.704,103.909 39.704,103.909 C45.768,104.334 48.961,110.132 48.961,110.132 C54.347,119.364 63.088,116.695 66.534,115.152 C67.076,111.25 68.641,108.584 70.368,107.077 C56.955,105.55 42.855,100.372 42.855,77.233 C42.855,70.64 45.214,65.253 49.077,61.024 C48.45,59.502 46.383,53.361 49.662,45.043 C49.662,45.043 54.733,43.42 66.273,51.233 C71.09,49.895 76.256,49.224 81.388,49.201 C86.52,49.224 91.69,49.895 96.516,51.233 C108.042,43.42 113.106,45.043 113.106,45.043 C116.393,53.361 114.325,59.502 113.698,61.024 C117.57,65.253 119.913,70.64 119.913,77.233 C119.913,100.427 105.786,105.534 92.339,107.029 C94.505,108.903 96.435,112.578 96.435,118.212 C96.435,126.291 96.365,132.794 96.365,134.784 C96.365,136.391 97.452,138.274 100.513,137.681 C124.494,129.687 141.775,107.059 141.775,80.387 C141.775,47.035 114.738,20 81.388,20 C48.041,20 21,47.035 21,80.387 Z" id="Fill-52"></path>
<path d="M43.872,106.703 C43.739,107.004 43.267,107.093 42.837,106.887 C42.399,106.69 42.153,106.281 42.295,105.98 C42.425,105.671 42.898,105.586 43.335,105.791 C43.774,105.989 44.024,106.402 43.872,106.703" id="Fill-53"></path>
<path d="M46.318,109.431 C46.03,109.698 45.467,109.574 45.085,109.152 C44.69,108.731 44.616,108.168 44.908,107.897 C45.205,107.63 45.751,107.755 46.147,108.176 C46.542,108.602 46.619,109.161 46.318,109.431" id="Fill-54"></path>
<path d="M48.699,112.909 C48.329,113.166 47.724,112.925 47.35,112.388 C46.98,111.851 46.98,111.207 47.358,110.949 C47.733,110.691 48.329,110.923 48.708,111.456 C49.077,112.001 49.077,112.646 48.699,112.909" id="Fill-55"></path>
<path d="M51.961,116.269 C51.63,116.634 50.925,116.536 50.409,116.038 C49.881,115.551 49.734,114.86 50.066,114.495 C50.401,114.129 51.11,114.232 51.63,114.726 C52.154,115.212 52.314,115.908 51.961,116.269" id="Fill-56"></path>
<path d="M56.461,118.22 C56.315,118.693 55.636,118.908 54.952,118.707 C54.269,118.5 53.822,117.946 53.96,117.468 C54.102,116.992 54.784,116.768 55.473,116.983 C56.155,117.189 56.603,117.739 56.461,118.22" id="Fill-57"></path>
<path d="M61.403,118.582 C61.42,119.08 60.84,119.493 60.122,119.501 C59.4,119.518 58.816,119.115 58.808,118.625 C58.808,118.122 59.375,117.713 60.097,117.701 C60.815,117.687 61.403,118.087 61.403,118.582" id="Fill-58"></path>
<path d="M66.002,117.799 C66.088,118.285 65.589,118.784 64.876,118.916 C64.175,119.045 63.526,118.745 63.437,118.263 C63.35,117.765 63.858,117.266 64.558,117.137 C65.272,117.013 65.911,117.305 66.002,117.799" id="Fill-59"></path>
</g>
</svg>
</a>
</li>
</ul>
</div>
<div class="burger">
<div></div>
</div>
<div class="nav-side">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="getting_started.html">Getting Started</a></li>
<li><a href="application.html">Application</a></li>
<li><a href="broadcast.html">Broadcast</a></li>
<li><a href="multi_topic_broadcast.html">Multi-Topic Broadcast</a></li>
<li><a href="architecture.html">Architecture</a></li>
<li><a href="session_lifecycle.html">Session Lifecycle</a></li>
<li><a href="monitoring.html">Monitoring</a></li>
<li><a href="configuration.html">Configuration</a></li>
<li><a href="performance_tuning.html">Performance</a></li>
<li><a href="open_source.html">Open Source</a></li>
<li><a href="pro_features.html">Pro Features</a></li>
<li><a href="support.html">Support</a></li>
</ul>
</div>
</div>
<div class="container" role="main">
<div class="content-heading">
<h3>Monitoring</h3>
</div>
<div class="content-body">
<p>
In order to maintain a constant memory footprint, <strong>Babl</strong> exports metrics to memory-mapped files that can be
processed by external programs. This means reporting of metrics remains fast, and prevents
allocation occurring due to 3rd-party monitoring libraries.<br/><br/>
The recommended approach is to read and interpret the exported monitoring data, and push to a metrics back-end for processing.<br/><br/>
Supported customers can benefit from integration with popular metrics backends (e.g. Influx, Prometheus),
and pre-prepared charts formatted for the Grafana charting system. See <a href="support.html">Support</a> for more information.
</p>
<h4 class="heading heading-primary">Exported Metrics</h4>
<h5>Server Statistics</h5>
<p>
Records server-wide statistics, contained in the server mark-file
<code>${SERVER_DIR}/babl-server.mark</code>.<br/><br/>
Can be read using the program <code>com.aitusoftware.babl.monitoring.ServerStatisticsPrinter</code>:
</p>
<pre>$ java -cp babl-0.10.0-all.jar \
com.aitusoftware.babl.monitoring.ServerStatisticsPrinter \
$SERVER_DIR
Timestamp: 2021-03-14T15:32:05.358Z
Bytes Read: 42826384
Bytes Written: 42621246
Active Sessions: 176
Back Pressure Events: 2
Invalid Opcode Events: 0
Max Event Loop Ms : 1</pre>
<ul class="list list-primary">
<li><em>Timestamp</em> - written by the server event-loop on each iteration; can be used as a liveness check</li>
<li><em>Bytes Read</em> - total number of bytes read from sockets</li>
<li><em>Bytes Written</em> - total number of bytes written to sockets</li>
<li><em>Active Sessions</em> - number of web-socket sessions currently connected</li>
<li><em>Back Pressure Events</em> - number of times the user Application could not keep up with incoming message rates</li>
<li><em>Invalid Opcode Events</em> - number of invalid web-socket frames received</li>
<li><em>Max Event Loop Ms</em> - max time (in milliseconds) spent processing all connected sessions</li>
</ul>
<h5>Session Statistics</h5>
<p>
Records per-session statistics, contained in files named <code>${SERVER_DIR}/babl-session-statistics-N.data</code>.<br/><br/>
Can be read using the program <code>com.aitusoftware.babl.monitoring.SessionStatisticsPrinter</code>:
</p>
<pre>$ java -cp babl-0.10.0-all.jar \
com.aitusoftware.babl.monitoring.SessionStatisticsPrinter \
$SERVER_DIR
Session ID: 711
Session State: CONNECTED
Bytes Read: 433878
Bytes Written: 433397
Frames Decoded: 1271
Frames Encoded: 2043
Messages Received: 1090
Messages Sent: 2043
Receive Buffered Bytes: 0
Send Buffered Bytes: 0
Invalid Messages Received: 0
Invalid Pings Received: 0
Send Back Pressure Events: 0</pre>
<ul class="list list-primary">
<li><em>Session ID</em> - server-assigned ID of the session</li>
<li><em>Session State</em> - current state of the session</li>
<li><em>Bytes Read</em> - total number of bytes read from session's socket</li>
<li><em>Bytes Written</em> - total number of bytes written to session's socket</li>
<li><em>Frames Decoded</em> - total number of web-socket frames decoded</li>
<li><em>Frames Encoded</em> - total number of web-socket frames encoded</li>
<li><em>Messages Received</em> - total number of complete messages received</li>
<li><em>Messages Sent</em> - total number of complete messages sent</li>
<li><em>Receive Buffered Bytes</em> - snapshot of the number of bytes currently queued for processing</li>
<li><em>Send Buffered Bytes</em> - snapshot of the number of bytes currently queued for sending</li>
<li><em>Invalid Messages Received</em> - total number of invalid messages received on the session</li>
<li><em>Invalid Pings Received</em> - total number of invalid pings received on the session</li>
<li><em>Send Back Pressure Events</em> - number of times the server has been unable to write data to the remote peer</li>
</ul>
<h5>Errors</h5>
<p>
Any exceptions are logged to an <code>ErrorBuffer</code> for efficient reporting, and can be viewed using the program <code>com.aitusoftware.babl.monitoring.ErrorPrinter</code>:
</p>
<pre>$ java -cp babl-0.10.0-all.jar \
com.aitusoftware.babl.monitoring.ErrorPrinter \
$SERVER_DIR
No errors reported.</pre>
<h4 class="heading heading-primary">Docker</h4>
<p>
If running <strong>Babl</strong> in the supplied docker container, utility scripts are provided for viewing monitoring data:
</p>
<ul class="list list-primary">
<li><code>/babl/bin/babl_print_server_stats.sh</code></li>
<li><code>/babl/bin/babl_print_session_stats.sh</code></li>
<li><code>/babl/bin/babl_print_errors.sh</code></li>
</ul>
<p>
If running the server in <code>DETACHED</code> mode, Aeron statistics can be displayed with:
</p>
<ul class="list list-primary">
<li><code>/babl/bin/babl_aeron_stat.sh</code></li>
</ul>
</div>
</div>
<div class="copyright">
Copyright 2020 <a href="https://aitusoftware.com">Aitu Software Limited</a>
</div>
<script rel="javascript" src="assets/js/babl.js"></script>
</body>
</html>