![Munin 配額使用情況](https://rvso.com/image/568273/Munin%20%E9%85%8D%E9%A1%8D%E4%BD%BF%E7%94%A8%E6%83%85%E6%B3%81.png)
我試圖讓 Munin 報告配額使用情況,但沒有成功。在quota_usage_之上它說:
# Usage: place in /etc/munin/node.d/quota-usage_<dev> (or link it there using
# ln -s), for example quota-usage_hda3. Use underscores instead of slashes, for
# example to monitor /dev/mapper/vol-foo, name this quota-usage_mapper_vol-foo
所以我就這樣做了,但似乎不起作用。
munin-node.log 說:
2011/11/25-11:05:08 [23728] Error output from quota_usage_:
2011/11/25-11:05:08 [23728] Can't exec "/etc/munin/plugins/quota_usage_": No such file or directory at /usr/share/perl5/Munin/Node/Service.pm line 215, <STDIN> line 87.
2011/11/25-11:05:08 [23728] # ERROR: Failed to exec.
2011/11/25-11:05:08 [23728] Service 'quota_usage_' exited with status 42/0.
有什麼想法我做錯了嗎?我正在運行 Debian 6,以防萬一。我將它符號鏈接為quota-usage_xvda
(它在 Xen VPS 上運行)並且repquota /dev/xvda
運行得很好。
更新 - 通過將其放入 /etc/munin/plugins/ 並將其設置為以 root 身份運行(正如 Dom 建議的那樣)來讓它工作,但我現在在 munin-graph.log 中得到了這個:
2011/11/25 18:15:10 [RRD ERROR] Unable to graph /var/cache/munin/www/xxx/xxx/quota_usage_xvda-week.png : opening '/var/lib/munin/--g.rrd': No such file or directory
經過一番研究,這看起來像是個錯誤: http://munin-monitoring.org/ticket/794
編輯差異顯示修復了它,但我現在只在圖表中報告了 2 個用戶,而不是我擁有的大約十幾個。那好吧...
答案1
試著跑quota-usage_xvda
。如果它有效,您必須在 munin-node.conf 中為此外掛程式新增 root 使用者。然後您可以通過 進行檢查munin-run quota-usage_xvda
。檢查您的repquota是否位於/usr/sbin/目錄中(因為它是硬編碼在插件中的)。您確定該連結是好的嗎? quota_usage_ 應該位於 /etc/munin/plugins 目錄之外