statshow一個簡易的API監控伺服器,statstics監控專案使用
require dirname ( __FILE__ ). ' /vendor/autoload.php ' ;
$ server = new statshow StatShow ( ' 0.0.0.0 ' , 8081 );
$ server -> start ();
highcharts圖表的展示
第三方比較好用的資料檢索
https://cloud.tencent.com/document/product/614/47044
https://cloud.tencent.com/document/product/614/56447 https://cloud.tencent.com/document/product/614/47044
| select uri,histogram (cast ( TIMESTAMP as timestamp) ,interval 1 minute) as analytic_time, count (*) as log_count group by uri order by analytic_time limit 1000
| select uri, count (*) as log_count group by uri order by log_count desc limit 1000
| select remote_addr, count (*) as log_count group by remote_addr order by log_count desc limit 1000
| select remote_addr,ip_to_city(remote_addr),uri, count (*) as log_count group by remote_addr,uri order by log_count desc
| select uri,remote_addr,count (*) as log_count group by uri,remote_addr order by log_count desc