我正在尝试使用 munin 将多个图形堆叠成一个图形。这个想法是将所有 Web 服务器 CPU 图形堆叠成一个图形。
Munin配置源图:
[WEB1.virtualservers]
address 10.11.6.72
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
[WEB2.virtualservers]
address 10.11.6.73
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
[WEB3.virtualservers]
address 10.11.6.74
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
这是我为 sum/stack 应用的 munin 配置:
[virtualservers;secure2]
update no
contacts no
web_cpu.graph_title Secure - CPU Usage
web_cpu.cpu_user.label user
web_cpu.cpu_user.sum WEB1.virtualservers:cpu_user.user WEB2.virtualservers:cpu_user.user WEB3.virtualservers:cpu_user.user
我试过:
- 更新是
- 更新号
- 和
- 堆
- cpu_user.用户
- cpu_用户.cpu
- cpu.cpu_用户
- 用户CPU
- CPU 的 CPU
这是我每次遇到的错误:
2015/02/03 10:10:35 [ERROR] filename is empty for $VAR1 = {
'#%#name' => 'z1_0',
'cdef' => 'z1_0,UN,0,z1_0,IF',
'graph' => 'no',
'label' => 'z1_0'
};
, WEB1.virtualservers:cpu_user.user
2015/02/03 10:10:35 [PERL WARNING] Use of uninitialized value within @group in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/Utils.pm line 1171, <GEN1> line 745.
2015/02/03 10:10:35 [ERROR] filename is empty for $VAR1 = {
'#%#name' => 'z1_1',
'cdef' => 'z1_1,UN,0,z1_1,IF',
'graph' => 'no',
'label' => 'z1_1'
};
, WEB2.virtualservers:cpu_user.user
2015/02/03 10:10:35 [PERL WARNING] Use of uninitialized value within @group in concatenation (.) or string at /usr/share/perl5/vendor_perl/Munin/Master/Utils.pm line 1171, <GEN1> line 745.
2015/02/03 10:10:35 [ERROR] filename is empty for $VAR1 = {
'#%#name' => 'z1_2',
'cdef' => 'z1_2,UN,0,z1_2,IF,z1_0,ADDNAN,z1_1,ADDNAN',
'colour' => undef,
'draw' => undef,
'graph' => 'yes',
'label' => 'user'
};
, WEB3.virtualservers:cpu_user.user
我的源图运行良好
我的网络服务器正在运行带有 munin-node-win32-1.6.0.0-installer 的 Windows...不确定这是否会导致此问题...
答案1
它是否与一个外部数据源一起工作? 好啊。你的这一行有误:
web_cpu.cpu_user.sum WEB1.virtualservers:cpu_user.user WEB2.virtualservers:cpu_user.user WEB3.virtualservers:cpu_user.user
服务器不知道如何合并数据,因为“.sum”不是算术运算。
在绘制配置中你必须执行以下操作:
graph_order <list all direct order plus> DrawLocalName=ExternalDrawName.SpecifiedDrawName <next_def> <next2_def_etc> ...
然后后来:
your_sum.cdef SpecifiedName1,SpecifiedName2,+,SpecifiedName3,+
注意,cdef 使用逆波兰表示法。它的工作方式类似于堆栈。