如何操作munin membyuser插件?

如何操作munin membyuser插件?

我无法运行这个插件会员登录

图表未显示,例如截图

munin 节点配置如下:

/etc/munin/plugin-conf.d/munin-node
...
[membyuser]
env.USERS user1 user2 user3 user4
...

munin-graph.log说:

[RRD ERROR] Unable to graph /var/cache/munin/www/myhost/host/membyuser-week.png : opening '/var/lib/munin/--g.rrd': No such file or directory
[RRD ERROR] Unable to graph /var/cache/munin/www/myhost/host/membyuser-day.png : opening '/var/lib/munin/--g.rrd': No such file or directory
[RRD ERROR] Unable to graph /var/cache/munin/www/myhost/host/membyuser-year.png : opening '/var/lib/munin/--g.rrd': No such file or directory

我验证了目录存在且可写。这不是问题。

我发起了调试并说:

 [DEBUG] Node name: membyuser
 [DEBUG] Expanding specials for membyuser: "root","others".
 [DEBUG] Checking field lengths for membyuser: "".
 [DEBUG] Treating fields "root","others".
 [DEBUG] Processing field "root" [root].
 DEBUG: single_value: Checking field "root".
 DEBUG: single_value: Checking field "others".
 [DEBUG] service myhost :: myhost :: membyuser has 2 elements.
 [DEBUG] RRD name / filename: root / /var/lib/munin/--g.rrd
 [DEBUG] Drawing field "root".
 [DEBUG] Processing field "others" [others].
 [DEBUG] service myhost :: myhost :: membyuser has 2 elements.
 [DEBUG] RRD name / filename: others / /var/lib/munin/myhost/myhost-membyuser-others-g.rrd
 [DEBUG] Drawing field "others".


rrdtool 'graph' '--font' \
    'DEFAULT:0:DejaVuSans' \
    '--font' \
    'LEGEND:7:DejaVuSansMono' \
    '-W' \
    'Munin 1.4.5' \
    '/var/cache/munin/www/myhost/myhost/membyuser-month.png' \
    '--title' \
    'Memory usage, by user - by month' \
    '--start' \
    '-33d' \
    '--base' \
    '1000' \
    '-r' \
    '--lower-limit' \
    '0' \
    '--vertical-label' \
    'KB' \
    '--height' \
    '175' \
    '--width' \
    '400' \
    '--imgformat' \
    'PNG' \
    '--units-exponent' \
    '0' \
    'DEF:aothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MAX' \
    'DEF:iothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MIN' \
    'DEF:gothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:AVERAGE' \
    'DEF:aroot=/var/lib/munin/--g.rrd:42:MAX' \
    'DEF:iroot=/var/lib/munin/--g.rrd:42:MIN' \
    'DEF:groot=/var/lib/munin/--g.rrd:42:AVERAGE' \
    'CDEF:croot=groot,POP,UNKN' \
    'COMMENT:      ' \
    'COMMENT: Cur\:' \
    'COMMENT:Min\:' \
    'COMMENT:Avg\:' \
    'COMMENT:Max\:  \j' \
    'AREA:groot#00CC00:root   ' \
    'GPRINT:croot:LAST:%6.2lf' \
    'GPRINT:iroot:MIN:%6.2lf' \
    'GPRINT:groot:AVERAGE:%6.2lf' \
    'GPRINT:aroot:MAX:%6.2lf\j' \
    'CDEF:cothers=gothers' \
    'STACK:gothers#0066B3:others ' \
    'GPRINT:cothers:LAST:%6.2lf' \
    'GPRINT:iothers:MIN:%6.2lf' \
    'GPRINT:gothers:AVERAGE:%6.2lf' \
    'GPRINT:aothers:MAX:%6.2lf\j' \
    'COMMENT:Last update\: Fri Mar 15 20\:15\:05 2013\r' \
    '--end' \
    '1363370400'
 [RRD ERROR] Unable to graph /var/cache/munin/www/myhost/myhost/membyuser-month.png : opening '/var/lib/munin/--g.rrd': No such file or directory


rrdtool 'graph' '--font' \
    'DEFAULT:0:DejaVuSans' \
    '--font' \
    'LEGEND:7:DejaVuSansMono' \
    '-W' \
    'Munin 1.4.5' \
    '/var/cache/munin/www/myhost/myhost/membyuser-week.png' \
    '--title' \
    'Memory usage, by user - by week' \
    '--start' \
    '-8d' \
    '--base' \
    '1000' \
    '-r' \
    '--lower-limit' \
    '0' \
    '--vertical-label' \
    'KB' \
    '--height' \
    '175' \
    '--width' \
    '400' \
    '--imgformat' \
    'PNG' \
    '--units-exponent' \
    '0' \
    'DEF:aothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MAX' \
    'DEF:iothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MIN' \
    'DEF:gothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:AVERAGE' \
    'DEF:aroot=/var/lib/munin/--g.rrd:42:MAX' \
    'DEF:iroot=/var/lib/munin/--g.rrd:42:MIN' \
    'DEF:groot=/var/lib/munin/--g.rrd:42:AVERAGE' \
    'CDEF:croot=groot,POP,UNKN' \
    'COMMENT:      ' \
    'COMMENT: Cur\:' \
    'COMMENT:Min\:' \
    'COMMENT:Avg\:' \
    'COMMENT:Max\:  \j' \
    'AREA:groot#00CC00:root   ' \
    'GPRINT:croot:LAST:%6.2lf' \
    'GPRINT:iroot:MIN:%6.2lf' \
    'GPRINT:groot:AVERAGE:%6.2lf' \
    'GPRINT:aroot:MAX:%6.2lf\j' \
    'CDEF:cothers=gothers' \
    'STACK:gothers#0066B3:others ' \
    'GPRINT:cothers:LAST:%6.2lf' \
    'GPRINT:iothers:MIN:%6.2lf' \
    'GPRINT:gothers:AVERAGE:%6.2lf' \
    'GPRINT:aothers:MAX:%6.2lf\j' \
    'COMMENT:Last update\: Fri Mar 15 20\:15\:05 2013\r' \
    '--end' \
    '1363374000'
 [RRD ERROR] Unable to graph /var/cache/munin/www/myhost/myhost/membyuser-week.png : opening '/var/lib/munin/--g.rrd': No such file or directory


rrdtool 'graph' '--font' \
    'DEFAULT:0:DejaVuSans' \
    '--font' \
    'LEGEND:7:DejaVuSansMono' \
    '-W' \
    'Munin 1.4.5' \
    '/var/cache/munin/www/myhost/myhost/membyuser-day.png' \
    '--title' \
    'Memory usage, by user - by day' \
    '--start' \
    '-30h' \
    '--base' \
    '1000' \
    '-r' \
    '--lower-limit' \
    '0' \
    '--vertical-label' \
    'KB' \
    '--height' \
    '175' \
    '--width' \
    '400' \
    '--imgformat' \
    'PNG' \
    '--units-exponent' \
    '0' \
    'DEF:aothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MAX' \
    'DEF:iothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MIN' \
    'DEF:gothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:AVERAGE' \
    'DEF:aroot=/var/lib/munin/--g.rrd:42:MAX' \
    'DEF:iroot=/var/lib/munin/--g.rrd:42:MIN' \
    'DEF:groot=/var/lib/munin/--g.rrd:42:AVERAGE' \
    'CDEF:croot=groot,POP,UNKN' \
    'COMMENT:      ' \
    'COMMENT: Cur\:' \
    'COMMENT:Min\:' \
    'COMMENT:Avg\:' \
    'COMMENT:Max\:  \j' \
    'AREA:groot#00CC00:root   ' \
    'GPRINT:croot:LAST:%6.2lf' \
    'GPRINT:iroot:MIN:%6.2lf' \
    'GPRINT:groot:AVERAGE:%6.2lf' \
    'GPRINT:aroot:MAX:%6.2lf\j' \
    'CDEF:cothers=gothers' \
    'STACK:gothers#0066B3:others ' \
    'GPRINT:cothers:LAST:%6.2lf' \
    'GPRINT:iothers:MIN:%6.2lf' \
    'GPRINT:gothers:AVERAGE:%6.2lf' \
    'GPRINT:aothers:MAX:%6.2lf\j' \
    'COMMENT:Last update\: Fri Mar 15 20\:15\:05 2013\r' \
    '--end' \
    '1363374900'
 [RRD ERROR] Unable to graph /var/cache/munin/www/myhost/myhost/membyuser-day.png : opening '/var/lib/munin/--g.rrd': No such file or directory


rrdtool 'graph' '--font' \
    'DEFAULT:0:DejaVuSans' \
    '--font' \
    'LEGEND:7:DejaVuSansMono' \
    '-W' \
    'Munin 1.4.5' \
    '/var/cache/munin/www/myhost/myhost/membyuser-year.png' \
    '--title' \
    'Memory usage, by user - by year' \
    '--start' \
    '-400d' \
    '--base' \
    '1000' \
    '-r' \
    '--lower-limit' \
    '0' \
    '--vertical-label' \
    'KB' \
    '--height' \
    '175' \
    '--width' \
    '400' \
    '--imgformat' \
    'PNG' \
    '--units-exponent' \
    '0' \
    'DEF:aothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MAX' \
    'DEF:iothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:MIN' \
    'DEF:gothers=/var/lib/munin/myhost/myhost-membyuser-others-g.rrd:42:AVERAGE' \
    'DEF:aroot=/var/lib/munin/--g.rrd:42:MAX' \
    'DEF:iroot=/var/lib/munin/--g.rrd:42:MIN' \
    'DEF:groot=/var/lib/munin/--g.rrd:42:AVERAGE' \
    'CDEF:croot=groot,POP,UNKN' \
    'COMMENT:      ' \
    'COMMENT: Cur\:' \
    'COMMENT:Min\:' \
    'COMMENT:Avg\:' \
    'COMMENT:Max\:  \j' \
    'AREA:groot#00CC00:root   ' \
    'GPRINT:croot:LAST:%6.2lf' \
    'GPRINT:iroot:MIN:%6.2lf' \
    'GPRINT:groot:AVERAGE:%6.2lf' \
    'GPRINT:aroot:MAX:%6.2lf\j' \
    'CDEF:cothers=gothers' \
    'STACK:gothers#0066B3:others ' \
    'GPRINT:cothers:LAST:%6.2lf' \
    'GPRINT:iothers:MIN:%6.2lf' \
    'GPRINT:gothers:AVERAGE:%6.2lf' \
    'GPRINT:aothers:MAX:%6.2lf\j' \
    'COMMENT:Last update\: Fri Mar 15 20\:15\:05 2013\r' \
    '--end' \
    '1363305600'
 [RRD ERROR] Unable to graph /var/cache/munin/www/myhost/myhost/membyuser-year.png : opening '/var/lib/munin/--g.rrd': No such file or directory
 Graphed service : membyuser (0.01 sec * 4)

我不知道如何修复..

答案1

在屏幕截图中,我看到您使用的是 Munin v. 1.4.5。非常旧的版本。我使用的是 2.xx,并且没有 membyuser 插件。也许问题出在这个插件上,其定义不正确。我在 url 上看到了这个插件的一些版本: http://munin-monitoring.org/browser/munin-contrib/plugins/system/membyuser

但是我建议您升级 munin,因为旧版本有很多错误。

相关内容