nginx-cache-hit-rateプラグイン このプラグインにはReadBackwards.pmというperlのモジュールが必要なのでインストールします。 apt-get install libfile-readbackwards-per 次に/etc/nginx/nginx.confに次の記述を追記して新しいログのフォーマットをcacheという名前で定義します。 log_format cache '$remote_addr - $host [$time_local] "$request" $status ' '$body_bytes_sent "$http_referer" ' 'rt=$request_time ut="$upstream_response_time" ' 'cs=$upstream_cache_status'; キャッシュヒット率を監視したいサイトの設定ファイル
![MuninでServersMan@VPSを監視: nginx その1](https://cdn-ak-scissors.b.st-hatena.com/image/square/fc0b7a09eee390fe90607b7e0b1ab1018ab6bcc1/height=288;version=1;width=512/https%3A%2F%2Fscratchpad.jp%2Fwp-content%2Fuploads%2F2014%2F01%2F8770293e39dff2db2b4ccf766a510301_s.jpg)