AR ホームベーカリー

オイラのアウトプット用ホームベーカリー!

webalizer で雑に集計

各ページ (URLpath に対応) のヒット数だけ雑に確認したい、で access_log を解析するのに未だに webalzier は有効、というか SaaS ばっかでその後が育ちませんでしたね。

server-setting.info

いつもコンフィグ忘れるので、こちらに。

サンプル

~/Workspace/webalizer/
+ example
  - access_log-20250108
  - access_log-20250117
  - access_log-20250124
  - access_log-20250131
  - webalizer.conf
  + output

こういう感じで、解析対象のドメインごとにディレクトリを切って、その下に webalizer.conf と解析対象のログを設置する。

LogFile /Users/donbulinux/Workspace/webalizer/example/ssl_example-access_log-20250108
LogFile /Users/donbulinux/Workspace/webalizer/example/ssl_example-access_log-20250117
LogFile /Users/donbulinux/Workspace/webalizer/example/ssl_example-access_log-20250124
LogFile /Users/donbulinux/Workspace/webalizer/example/ssl_example-access_log-20250131
#LogType clf
# カレントディレクトリにたくさん生成されるので、出力専用ディレクトリを指定した方がよい
OutputDir /Users/donbulinux/Workspace/webalizer/example/output/
#Incremental yes
#IncrementalName webalizer.current
#ReportTitle Usage Statistics for
HostName www.example.com
HTMLExtension html

# Warning: Truncating oversized referrer field 対策
#ReallyQuiet yes

#  全てのサイト情報を表示するための別のHTMLページを作成するか否かを指定できます。
AllSites yes

#  全てのURL情報を表示するための別のHTMLページを作成するか否かを指定できます。
AllURLs yes

これで output ディレクトリ以下にファイルが生成されるのでよしなに index.html から見る。

別プロジェクトの例なので2月と3月の出力になっている

ヒット数だけ確認したいなら、 url_YYYYMM.html に一覧が出るので、これで。

ぼやき

冒頭でも書いたけど、 SaaS でメトリクスによる解析が一般化したのもあって、このあたり自前でやる (アクセスログを保持しておいてあとから解析する) みたいなものが消えてしまって辛いですよ〜。

前も書いた気がするけど、車輪の再開発したらええんかなあ、という気になっている。 なんもかんも高くてどうしようと言われるとなんもできないのだった。