生產環境下有需求:要每擱五分鐘統計下這段時間內的網站訪問量、UV、獨立IP等信息,用直觀的數據表格表現出來html
環境描述:python
網站爲Nginx服務,系統每日凌晨會對日誌進行分割,拷貝到其餘位置,當前日誌清空nginx
NGINX日誌配置信息:git
http { log_format main '$remote_addr - [$time_local] "$request" ' ' - $status "User_Cookie:$guid" '; } server { if ($http_cookie ~* "(.*)$"){ #if ($http_cookie ~* "JCRB_VOTE=([A-Z0-9]*)"){ set $guid $1; } } 日誌只統計:客戶IP、訪問時間、請求路徑、狀態碼、客戶端緩存
日誌access.log示例json
221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104291798 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283738 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283903 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283995 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104292817 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 121.28.161.2 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=XC9EHH&voteString=2|14|29|31|33|&keyString=xmtwb2016&jsoncallback=jQuery18008703299721237272_1479104243850&_=1479104285026 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=211799D6E388EC17CC4B0F5353424F04" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 101.27.93.120 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=99U4R3&voteString=0|1|2|3|4|&keyString=xmtwb2016&jsoncallback=jQuery180026725079771131277_1479104393301&_=1479104413870 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=55CA71DFC55332CDC978091D5787E328" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285036 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285194 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285303 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104293800 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=2|7|15|21|23|&keyString=xmtwb2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296352 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=1|11|12|22|27|&keyString=xmtwx2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296404 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=1|30|37|38|39|&keyString=xmtgx2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296451 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtwx2016&jsoncallback=jQuery18008259619923322621_1479104293001&_=1479104294141 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtwb2016&jsoncallback=jQuery18008259619923322621_1479104293000&_=1479104294139 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmttth2016&jsoncallback=jQuery18008259619923322621_1479104293002&_=1479104294142 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtzp2016&jsoncallback=jQuery18008259619923322621_1479104293003&_=1479104294144 HTTP/1.1" - 200 "User_Cookie:" 121.28.161.2 - [14/Nov/2016:14:19:37 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=211799D6E388EC17CC4B0F5353424F04" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtzmt2016&jsoncallback=jQuery18008259619923322621_1479104293004&_=1479104294145 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtgx2016&jsoncallback=jQuery18008259619923322621_1479104293005&_=1479104294146 HTTP/1.1" - 200 "User_Cookie:" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104294806 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286275 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 101.27.93.120 - [14/Nov/2016:14:19:38 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=55CA71DFC55332CDC978091D5787E328" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286451 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.192.216.166 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=8lrg49&voteString=1|2|3|6|11|16|21|27|37|&keyString=xmtwx2016&jsoncallback=jQuery18005909615200944245_1479104270260&_=1479104303736 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=9D2FE299B5042B989382AA82B56A8506" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286622 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104295808 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287539 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287697 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287785 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 117.136.2.149 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=cwp238&voteString=2|13|18|23|28|&keyString=xmtwb2016&jsoncallback=jQuery18004623273138422519_1479104263786&_=1479104281947 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=BF38C42EF499AAACB05A6EA87E3B1EB9" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104296807 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.192.216.166 - [14/Nov/2016:14:19:40 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=9D2FE299B5042B989382AA82B56A8506" 183.207.217.213 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104288831 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104288992 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104289087 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104297802 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 60.31.197.14 - [14/Nov/2016:14:19:41 +0800] "GET /captcha?0.9926116424744409 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=DB00034D5EC927BE007CE54F3D67587D" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104291798 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283738 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283903 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:35 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104283995 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104292817 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 121.28.161.2 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=XC9EHH&voteString=2|14|29|31|33|&keyString=xmtwb2016&jsoncallback=jQuery18008703299721237272_1479104243850&_=1479104285026 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=211799D6E388EC17CC4B0F5353424F04" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 101.27.93.120 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=99U4R3&voteString=0|1|2|3|4|&keyString=xmtwb2016&jsoncallback=jQuery180026725079771131277_1479104393301&_=1479104413870 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=55CA71DFC55332CDC978091D5787E328" 221.1.204.218 - [14/Nov/2016:14:19:36 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285036 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285194 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104285303 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104293800 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=2|7|15|21|23|&keyString=xmtwb2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296352 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=1|11|12|22|27|&keyString=xmtwx2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296404 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 101.27.93.130 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=wvt2qr&voteString=1|30|37|38|39|&keyString=xmtgx2016&jsoncallback=jQuery18006269013724414528_1479104280845&_=1479104296451 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8AFB9444EE47A0BA61F01CE62AC641F5" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtwx2016&jsoncallback=jQuery18008259619923322621_1479104293001&_=1479104294141 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtwb2016&jsoncallback=jQuery18008259619923322621_1479104293000&_=1479104294139 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmttth2016&jsoncallback=jQuery18008259619923322621_1479104293002&_=1479104294142 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtzp2016&jsoncallback=jQuery18008259619923322621_1479104293003&_=1479104294144 HTTP/1.1" - 200 "User_Cookie:" 121.28.161.2 - [14/Nov/2016:14:19:37 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=211799D6E388EC17CC4B0F5353424F04" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtzmt2016&jsoncallback=jQuery18008259619923322621_1479104293004&_=1479104294145 HTTP/1.1" - 200 "User_Cookie:" 222.219.53.119 - [14/Nov/2016:14:19:37 +0800] "GET /result?keyString=xmtgx2016&jsoncallback=jQuery18008259619923322621_1479104293005&_=1479104294146 HTTP/1.1" - 200 "User_Cookie:" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:37 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104294806 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286275 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 101.27.93.120 - [14/Nov/2016:14:19:38 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=55CA71DFC55332CDC978091D5787E328" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286451 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.192.216.166 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=8lrg49&voteString=1|2|3|6|11|16|21|27|37|&keyString=xmtwx2016&jsoncallback=jQuery18005909615200944245_1479104270260&_=1479104303736 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=9D2FE299B5042B989382AA82B56A8506" 183.207.217.213 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104286622 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:38 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104295808 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287539 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287697 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104287785 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:39 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 117.136.2.149 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=cwp238&voteString=2|13|18|23|28|&keyString=xmtwb2016&jsoncallback=jQuery18004623273138422519_1479104263786&_=1479104281947 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=BF38C42EF499AAACB05A6EA87E3B1EB9" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104296807 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.192.216.166 - [14/Nov/2016:14:19:40 +0800] "GET /captcha HTTP/1.1" - 200 "User_Cookie:JSESSIONID=9D2FE299B5042B989382AA82B56A8506" 183.207.217.213 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=UUFSBD&voteString=7|9|16|27|37|&keyString=xmtwb2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104288831 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 183.207.217.213 - [14/Nov/2016:14:19:40 +0800] "GET /vote?captcha=UUFSBD&voteString=5|7|29|37|39|&keyString=xmtwx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104288992 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 183.207.217.213 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=UUFSBD&voteString=3|6|10|13|23|&keyString=xmtgx2016&jsoncallback=jQuery180009671276737935841_1479103609944&_=1479104289087 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=D87A6A561C05BF969F4FF425605A2A1E" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 503 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743" 222.219.53.119 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=ech568&voteString=25|26|30|31|32|&keyString=xmtwb2016&jsoncallback=jQuery180011070688814614982_1479104232505&_=1479104297802 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=8C09C2378073EF08B7EB09946932A516" 60.31.197.14 - [14/Nov/2016:14:19:41 +0800] "GET /captcha?0.9926116424744409 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=DB00034D5EC927BE007CE54F3D67587D" 221.1.204.218 - [14/Nov/2016:14:19:41 +0800] "GET /vote?captcha=2RNBVC&voteString=14|14|3|1|14|4|14|13|14|&keyString=xmtwx2016&jsoncallback=jQuery18008265754313951313_1479103527546&_=1479103570861 HTTP/1.1" - 200 "User_Cookie:JSESSIONID=EF33AF20138880201DFA0AB1C756F743"
程序目錄結構:緩存
html目錄(最終生成的數據頁面,也是網頁的初始樣式):cookie
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>日誌分析</title> <meta http-equiv="Refresh" Content="5"/> <style> body{ margin: 0 auto; background-color: #797878; } div{ width: 60%; margin: auto; /*border: 1px solid black;*/ border-radius:5px } table{ width: 100%; text-align: center; background-color:#dddddd } .table_top{ width: 100%; background-color: #2459a2; color: white; font-weight: bold; } </style> </head> <body> <div> </div> <div style="height: 1000px; "></div> </body> </html>
main目錄(程序啓動接口):框架
#!/usr/bin/env python # -*- coding:utf-8 -*- #-Author-Lian import time,datetime import re LOG_PATH="/data/nginx/logs/access.log" #日誌文件 HTML_PATH="../html/index.html" #生成數據html文件 TABLE_TMP="../template/table_tmp" #表格框架格式 TIMES_PRE=300 #刷新頻率 單位秒 def handle(): date_time = datetime.datetime.now() current_date = str(date_time).split(" ")[0] #獲取當前日期 年-月-日 create_table(current_date) #建立信息表單 last_site = 0 #上一次文件讀到的位置 while True: page_view = 0 #頁面訪問量 succed_visit = 0 # 200狀態碼 reject_visit = 0 # 被拒絕的訪問503狀態碼 unique_ip = set([]) # 獨立IP unique_visitor= set([]) # 獨立訪客 date_time = datetime.datetime.now() # 生成時間日期 date = str(date_time).split(" ")[0] # 截取當前日期 年-月-日 if date != current_date: # 若是次日,光標位置從新設置到文件首部 current_date = date # 更新current_date 值 last_site = 0 create_table(current_date) # 建立信息表單 current_time = str(date_time).split(".")[0] # 日期 年-月-日-時-分-秒 with open(LOG_PATH,"r") as file: print("---------",current_date,last_site) file.seek(last_site) logs = file.readlines() last_site = file.tell() # 更新光標位置 for line in logs: page_view += 1 # 頁面訪問量+1 obj_sd=re.search("- 200",line) # 匹配200狀態碼+1 if obj_sd: succed_visit +=1 obj_rt = re.search("- 503", line) # 匹配503狀態碼+1 if obj_rt: reject_visit +=1 obj_ip = re.match("\d+\.\d+\.\d+\.\d+",line) # 匹配獨立IP unique_ip.add(obj_ip.group()) # 添加集合,自動去重 obj_uv = re.search("User_Cookie:...*", line) # 匹配獨立訪客 if obj_uv: # 去空 unique_visitor.add(obj_uv.group()) # 添加集合,自動去重 upload_data(current_time,page_view,succed_visit,reject_visit,len(unique_ip),len(unique_visitor)) #html文件內添加統計數據 time.sleep(TIMES_PRE) def upload_data(current_time,page_view,succed_visit,reject_visit,unique_ip,unique_visitor): with open(HTML_PATH, "r+",encoding="utf-8") as file: list = file.readlines() list.insert(-6,"<tr>\n") list.insert(-6, "<td>%s</td>\n"%current_time) #時間 list.insert(-6, "<td>%s</td>\n"%page_view) #頁面訪問量 list.insert(-6, "<td>%s</td>\n" % succed_visit) # 200訪問 list.insert(-6, "<td>%s</td>\n" % reject_visit) # 503訪問 list.insert(-6, "<td>%s</td>\n" % unique_ip) # 獨立IP數 list.insert(-6, "<td>%s</td>\n" % unique_visitor) # 獨立訪客數 list.insert(-6,"</tr>\n") file.seek(0) #文件清空 file.truncate(0) for line in list: #新數據寫入文件 file.write(line) def create_table(current_date): #建立信息表單 with open(HTML_PATH, "r+", encoding="utf-8") as file: list = file.readlines() with open(TABLE_TMP, "r", encoding="utf-8") as table_tmp: for line in table_tmp: if "日期" in line: line = line.replace("日期","日期:%s"%current_date) list.insert(-4, line) # 建立新的表單 file.seek(0) #文件清空 file.truncate(0) for line in list: #新數據寫入文件 file.write(line) if __name__ == '__main__': handle()
template(表格模板):ide
<table border="1"> <thead> <tr> <td class="table_top" colspan="6" >日期</td> </tr> <tr> <td style="width: 25%">時間</td> <td style="width: 15%">頁面瀏覽量</td> <td style="width: 15%">200狀態碼</td> <td style="width: 15%">503狀態碼</td> <td style="width: 15%">獨立IP數</td> <td style="width: 15%">獨立訪客數</td> </tr> </thead> <tbody> </tbody> </table>
注:table_tmp最後一行必定要一換行符網站
最終效果圖:
總結:
整個程序能夠針對不一樣的日誌類型進行增長刪減,程序也能夠做爲之後開發監控系統其中網站監測的一個模塊
完整程序代碼-》》https://coding.net/u/James_Lian/p/LogAnalysis/git/tree/master/