ログ解析にgrepするなんて今
   だけですよねー
    荒木靖宏(twitter:ar1@)
  Debian 開発者(ar@debian.org)
ログ処理

 grep
 sort
 uniq
apt-cache search log analyze
analog - web server log analyzer
aspell-ar-large - Large Arabic dictionary for aspell
awstats - powerful and featureful web server log analyzer
calamaris - log analyzer for Squid or Oops proxy log files
epylog - New logs analyzer and parser
librevm0-dev - The Reverse Engineering Vector Machine
librevm0 - The Reverse Engineering Vector Machine
fossology-agents-single - architecture for analyzing software, agents (single machine case)
fossology-agents - architecture for analyzing software, analysis agents
fossology-common - architecture for analyzing software, common files
fossology-db - architecture for analyzing software, database
fossology-dev - architecture for analyzing software, development files
fossology-scheduler-single - architecture for analyzing software, scheduler (single machine case)
fossology-scheduler - architecture for analyzing software, scheduler
fossology-web-single - architecture for analyzing software, web interface (single machine case)
fossology-web - architecture for analyzing software, web interface
fossology - open and modular architecture for analyzing software
fwlogwatch - Firewall log analyzer
goaccess - log analyzer and interactive viewer for the Apache Webserver
harden-nids - Harden a system by using a network intrusion detection system
hspell - Hebrew spell checker and morphological analyzer
hunspell-tools - tools for hunspell
hunspell - spell checker and morphological analyzer (program)
libhunspell-1.2-0 - spell checker and morphological analyzer (shared library)
libhunspell-dev - spell checker and morphological analyzer (development)
imsniff - Simple program to log Instant Messaging activity on the network
apt-cache search log analyze |wc

      43     340 2503
とても正気の沙汰とは思えない
そこで役に立つ3つのサービス
splunkにはサービスではなく
インストールして使うソフトもあり
• ログの収集、解析までをワンストップで行う
  SaaS
 – まず、ログ収集デーモンをクライアントにインス
   トール
 – その後はSumologicのWebコンソールで作業
 – ログはテキスト形式であればあらゆるOK
• 一日500MBまでのログ収集&処理無料
• 利用実績
 – Netflix, orange, limelightなどなど
rpmやdebでインストール
  収集するログを指定
   S3の位置を指定
_collector=“コレクタ名”
といった具合で検索分を
書く


     “LogReduce”ボタンを押すと集計ロ
     グ
絞り込みラクラク
検索エンジン的構文
| parse "t*t*t*t*t*t*t*.*t*t*t*/*%*t*"
as
ts, edge_loc, bytes, ip, method, host, u
ri_stem, filetype, status, referer, user_
agent, ver,throwaway, uri_query
| sum(bytes) as size_mb by filetype
| size_mb/1024/1024 as size_mb
| sort by size_mb
| limit 10
ファイルタイプ割合




| parse "t*t*t*t*t*t*t*.*t*t*t*/*%*t*" as
ts, edge_loc, bytes, ip, method, host, uri_stem, filetype, status, referer
, user_agent, ver,throwaway, uri_query
| sum(bytes) as size_mb by filetype
| size_mb/1024/1024 as size_mb
| sort by size_mb
ファイルタイプ別毎分転送サイズ




| parse "t*t*t*t*t*t*t*.*t*t*t*/*%*t*" as
ts, edge_loc, bytes, ip, method, host, uri_stem, filetype, status, referer, user_ag
ent, ver,throwaway, uri_query
| timeslice 1m
| sum(bytes) as size by filetype, _timeslice
| transpose row _timeslice column filetype as js, css, png, gif, ico, html, jpg, xml
ダッシュボード
ログ解析にgrepするなんて


  綺麗なログばかりじゃない
当たりの後で手組みしても遅くない
  可視化時間はもったいない

ログブラウズ、解析サービスSumologicの紹介