Munin的Postfix插件无法正常工作

我在FreeBSD 9.1机器上安装了一个新的munin(系统监视器),运行良好。 现在我想将我们的Postfix服务器包含在munin中的同一台机器上,所以我尝试使用“autoconf”参数运行标准的“postfix_mailqueue”插件。 但是,这似乎不工作,因为找不到“plugin.sh”。

以下是命令行的一些输出:

root@chaos ~ % echo $MUNIN_LIBDIR /usr/local/share/munin root@chaos ~ % root@chaos ~ % file $MUNIN_LIBDIR/plugins/plugin.sh /usr/local/share/munin/plugins/plugin.sh: ASCII text root@chaos ~ % root@chaos ~ % /usr/local/share/munin/plugins/postfix_mailqueue autoconf .: cannot open /plugins/plugin.sh: No such file or directory 

任何想法,我可能会错过这里?

PS:其他标准的munin插件工作正常,例如Apache。

它看起来像postfix_mailqueue插件没有得到$MUNIN_LIBDIR环境variables。 由于它已经设置在你的shell中,你可能只需要导出它。 看起来你正在运行(t)csh,所以你应该使用setenv MUNIN_LIBDIR /usr/local/share/munin 。 如果您正在运行bourne shell派生项,那么命令是export MUNIN_LIBDIR=/usr/local/share/munin

或者,您可以通过munin-run插件,为您设置所有正确的环境variables。 要直接从主插件目录munin-run --servicedir /usr/local/share/munin/plugins/ postfix_mailqueue autoconf ,请使用munin-run --servicedir /usr/local/share/munin/plugins/ postfix_mailqueue autoconf