@@ -114,6 +114,7 @@ INSERT INTO `alarm_rule` (`name`, `type`, `query_range`, `contacts`, `level`, `m
114114 ' {"metric":"sentry_sys_mem_usage", "tags":{"ip":"127.0.0.1"}, "aggregation":"max", "down_sample":10, "compare_type":0, "compare_days_ago":0, "compare_seconds":60}' ,
115115 ' {"less_than": -8.0, "greater_than": 8.0, "error_count": 1}' );
116116
117+ /* create dashboard for sentry_server monitor */
117118INSERT INTO ` dashboard` (` name` , ` creator` , ` app_name` , ` chart_layout` )
118119 VALUES (' sentry server monitor' , ' eric' , ' sentry_server' , ' [{"w":6,"h":4,"x":0,"y":0,"i":"1","moved":false,"static":true},{"w":6,"h":4,"x":6,"y":0,"i":"2","moved":false,"static":true},{"w":4,"h":4,"x":0,"y":4,"i":"3","moved":false,"static":true},{"w":4,"h":4,"x":4,"y":4,"i":"4","moved":false,"static":true},{"w":4,"h":4,"x":8,"y":4,"i":"5","moved":false,"static":true},{"w":4,"h":4,"x":0,"y":8,"i":"6","moved":false,"static":true},{"w":4,"h":4,"x":4,"y":8,"i":"7","moved":false,"static":true},{"w":4,"h":4,"x":8,"y":8,"i":"8","moved":false,"static":true}]' );
119120
@@ -165,3 +166,79 @@ INSERT INTO `line` (`chart_id`, `name`, `metric`, `tags`, `offset`)
165166
166167INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
167168 VALUES (8 , ' chan size' , ' sentry_server_chan_size' , ' {"chan":"*"}' , 0 );
169+
170+ /* create dashboard for machine monitor (cpu, memory, disk, network ...) */
171+ INSERT INTO ` dashboard` (` name` , ` creator` , ` app_name` , ` chart_layout` )
172+ VALUES (' machine monitor' , ' eric' , ' sentry_agent' , ' [{"w":4,"h":4,"x":0,"y":0,"i":"9","moved":false,"static":true},{"w":4,"h":4,"x":4,"y":0,"i":"10","moved":false,"static":true},{"w":4,"h":4,"x":8,"y":0,"i":"11","moved":false,"static":true},{"w":4,"h":4,"x":0,"y":4,"i":"12","moved":false,"static":true},{"w":4,"h":4,"x":4,"y":4,"i":"13","moved":false,"static":true},{"w":4,"h":4,"x":8,"y":4,"i":"14","moved":false,"static":true},{"w":4,"h":4,"x":0,"y":8,"i":"15","moved":false,"static":true},{"w":4,"h":4,"x":4,"y":8,"i":"16","moved":false,"static":true},{"w":4,"h":4,"x":8,"y":8,"i":"17","moved":false,"static":true},{"w":6,"h":4,"x":0,"y":12,"i":"18","moved":false,"static":true},{"w":6,"h":4,"x":6,"y":12,"i":"19","moved":false,"static":true}]' );
173+
174+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
175+ VALUES (2 , ' cpu usage' , ' line' , ' max' , ' 10s' , 10 );
176+
177+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
178+ VALUES (9 , ' cpu' , ' sentry_sys_cpu_usage' , ' {}' , 0 );
179+
180+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
181+ VALUES (2 , ' load average' , ' line' , ' max' , ' 10s' , 10 );
182+
183+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
184+ VALUES (10 , ' load' , ' sentry_sys_load_average' , ' {}' , 0 );
185+
186+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
187+ VALUES (2 , ' memory usage' , ' line' , ' max' , ' 10s' , 10 );
188+
189+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
190+ VALUES (11 , ' memory' , ' sentry_sys_mem_usage' , ' {}' , 0 );
191+
192+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
193+ VALUES (2 , ' disk usage' , ' line' , ' max' , ' 10s' , 10 );
194+
195+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
196+ VALUES (12 , ' disk usage' , ' sentry_sys_disk_usage' , ' {"device":"*"}' , 0 );
197+
198+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
199+ VALUES (2 , ' disk io wait' , ' line' , ' max' , ' 10s' , 10 );
200+
201+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
202+ VALUES (13 , ' io wait' , ' sentry_sys_io_wait' , ' {}' , 0 );
203+
204+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
205+ VALUES (2 , ' disk io util' , ' line' , ' max' , ' 10s' , 10 );
206+
207+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
208+ VALUES (14 , ' io util' , ' sentry_sys_io_util' , ' {}' , 0 );
209+
210+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
211+ VALUES (2 , ' disk io stats' , ' line' , ' max' , ' 10s' , 10 );
212+
213+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
214+ VALUES (15 , ' read bytes/s' , ' sentry_sys_io_read' , ' {}' , 0 );
215+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
216+ VALUES (15 , ' write bytes/s' , ' sentry_sys_io_write' , ' {}' , 0 );
217+
218+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
219+ VALUES (2 , ' net stats in bytes' , ' line' , ' max' , ' 10s' , 10 );
220+
221+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
222+ VALUES (16 , ' bytes sent/s' , ' sentry_sys_net_bytes_sent' , ' {}' , 0 );
223+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
224+ VALUES (16 , ' bytes recv/s' , ' sentry_sys_net_bytes_recv' , ' {}' , 0 );
225+
226+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
227+ VALUES (2 , ' net stats in packets' , ' line' , ' max' , ' 10s' , 10 );
228+
229+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
230+ VALUES (17 , ' packets sent/s' , ' sentry_sys_net_packets_sent' , ' {}' , 0 );
231+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
232+ VALUES (17 , ' packets recv/s' , ' sentry_sys_net_packets_recv' , ' {}' , 0 );
233+
234+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
235+ VALUES (2 , ' tcp status' , ' line' , ' max' , ' 10s' , 10 );
236+
237+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
238+ VALUES (18 , ' status' , ' sentry_sys_tcp_status' , ' {"status":"*"}' , 0 );
239+
240+ INSERT INTO ` chart` (` dashboard_id` , ` name` , ` type` , ` aggregation` , ` down_sample` , ` topn_limit` )
241+ VALUES (2 , ' process number' , ' line' , ' max' , ' 10s' , 10 );
242+
243+ INSERT INTO ` line` (` chart_id` , ` name` , ` metric` , ` tags` , ` offset` )
244+ VALUES (19 , ' number' , ' sentry_sys_process_number' , ' {}' , 0 );
0 commit comments