¶°µé½âÇÑ ºÒÆò

Á¤Àû ÆÄÀÏÀ»À§ÇÑ SQL Äõ¸® µµ±¸ ¹× ¶óÀ̺귯¸®
Áö±Ý ´Ù¿î·Îµå

¶°µé½âÇÑ ºÒÆò ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • BSD License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Samuel Stauffer
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://danga.com/gearman/

¶°µé½âÇÑ ºÒÆò ű×


¶°µé½âÇÑ ºÒÆò ¼³¸í

Á¤Àû ÆÄÀÏÀ»À§ÇÑ SQL Äõ¸® µµ±¸ ¹× ¶óÀ̺귯¸® Squawk´Â ±¸Á¶È­ µÈ / ¹Ý ±¸Á¶È­ µÈ Á¤Àû ÆÄÀÏ¿¡ ´ëÇØ SQL Äõ¸®¸¦ ½ÇÇàÇϱâÀ§ÇÑ µµ¼­°ü ¹× ¸í·É ÁÙ µµ±¸ÀÔ´Ï´Ù. (¿¹ : Apache Logs, CSV ÆÄÀÏ, TCPDUMP Ãâ·Â). LOG ÆÄÀÏ ¶Ç´Â ´Ù¸¥ ±¸Á¶È­ µÈ ÆÄÀÏÀÇ µ¥ÀÌÅ͸¦ ½±°Ô Äõ¸®ÇÏ´Â °ÍÀº SQUAWKÀÔ´Ï´Ù. Squawk°¡ ´Ù¾çÇÑ UNIX µµ±¸¸¦ °áÇÕÇÏ¿© ¼öÇà ÇÒ ¼öÀÖ´Â ¸ðµç °ÍÀÌ ÀÖÁö¸¸ ´õ º¹ÀâÇÑ °ü°è¸¦ Ç¥ÇöÇϱⰡ ´õ ½±°Ô ÀÌ·ç¾îÁú ¼ö ÀÖ½À´Ï´Ù. ÀÌ´Â µ¥ÀÌÅͺ£À̽º°¡ ¾ø°Å³ª »ç¿ëµÇ´Â Àǹ̰¡ ¾ø½À´Ï´Ù. ±×°ÍÀº ´ÜÁöº¸°í tool.squawk¸¦ Ad-hoc Äõ¸®¿¡ ´ëÇÑ ¸í·É ÁÙ¿¡¼­ »ç¿ëÇÒ ¼ö ÀÖÀ¸¸ç,º¸´Ù ½ÉÃþÀû Àκ¸°í µµ±¸ÀÇ ÀϺηΠ¶óÀ̺귯¸®·Î »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. ÁÖ¿ä °³¹ß ÁßÀÔ´Ï´Ù. API´Â º¯°æÇÒ ¼ö ÀÖ½À´Ï´Ù. SQL ±â´É * Áý°è : count, min, max, avg, sum * group by * mode by (´ÜÀÏ ¿­) * limit * * offset * where * ¿­ º°Äª * Ç¥ÁØ SQL * Å×ÀÌºí ¸ñ·Ï¿¡¼­ remdeparturesÀÇ ºÎ¼Ó¼­ ¿¡¼­ ½°Ç¥°¡ ¾Æ´Ñ °ø°£À» ±¸ºÐ ±âÈ£·Î »ç¿ëÇÕ´Ï´Ù. ÀÌ·¸°ÔÇÏ¸é ¸í·É ÁÙ¿¡¼­ ´õ ½±°Ô ÆÄÀÏÀ» ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. (¿¹ : Access.log *) Æļ­ * °øÅë ¾×¼¼½º ÆÄÀÏ Çü½Ä (nginx, apache) * csvoutput Çü½Ä (´ëºÎºÐÀÇ µ¥ÀÌÅͺ£À̽º ¸í·É ÁÙ µµ±¸¿Í °°Àº) * json * csvexamplessql Äõ¸® ¸í·É ÁÙ : $ squawk "count ¼±Åà (1) nÀ¸·Î, »óÅ ¼ø¼­·Î Access.log ±×·ì¿¡¼­ »óÅ ¼ø¼­·Î status Onder "n | »óÅ --------------------------------------- 381353 | 200180668 | 30217976 | 40412952 | 30110836 | 304735 | 403420 | 206376 | 416123 | 40046 | 5005 | 5023 | 4083 | 4051 | 504SQL ±â¹Ý API¸¦ ÅëÇØ API : Query = Query ( "count count (1) from from remote_addr" "ÆÄÀÏ" "" "ÆÄÀÏ¿¡¼­ n, remote_addr" ""¿¡¼­ n, remote_addr "°ú remote_addr" "" "" "" ""Limit 10 ") Source = AccessLogParser ("access.log ") Output_Console (Äõ¸® (¼Ò½º)) # ORQUERY = Äõ¸® ("Äõ¸® ( "COUNT (1)¸¦ n, remote_addr" ""ÆÄÀÏ¿¡¼­ ""¿©±â¿¡¼­ "¿©±â¼­"¿©±â¼­ = 200 "" " ¹× remote_addr! = '-' ""n desc ""limit 10 ") source = accesslogParser ("access.log ") Äõ¸®ÀÇ Çà (¼Ò½º) : rowcode »ý¼º Äõ¸®¸¦ ÀμâÇÕ´Ï´Ù. source = accesslogparser ( "access.log") ÇÊÅ͸µ µÊ = ÇÊÅÍ (¼Ò½º, ¶÷´Ù Çà : Çà == 200) group_by = groupby (filtered, group_by = "remote_addr", select = ) order_by = orderby (group_by,'count (1) ', true) Limit = Á¦ÇÑ (order_by, 10) ÇàÀÇ Çà¿¡ ´ëÇÑ Çà : Çà ¿ä±¸ »çÇ× Àμâ : ¡¤ ÆÄÀ̽㠡¤ Pyparsing.


¶°µé½âÇÑ ºÒÆò °ü·Ã ¼ÒÇÁÆ®¿þ¾î