2013-02-21 63 views
1

下午好。Memcached:插件Munin錯誤

我試圖使用memcached插件,當我使用命令「munin-run」來測試它們時出現錯誤。

返回的錯誤是:我有困難發現了一個解決方案

$ip =~ s/_/./g; 
my $address = "$ip:$port"; 

Use of uninitialized value $ip in substitution (s///) at /etc/munin/plugins/memcached_hits line 28. 
Use of uninitialized value $ip in concatenation (.) or string at /etc/munin/plugins/memcached_hits line 29. 
Use of uninitialized value $port in concatenation (.) or string at /etc/munin/plugins/memcached_hits line 29. 
Use of uninitialized value $ip in hash element at /usr/share/perl5/Cache/Memcached.pm line 253. 
Use of uninitialized value $ip in index at /usr/share/perl5/Cache/Memcached.pm line 279. 
Use of uninitialized value in subroutine entry at /usr/share/perl5/Cache/Memcached.pm line 288. 
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.14/Socket.pm line 260. 

的線28和memcached_hits插件29,請參考下面的各個碼。有人能幫助我嗎?

謝謝。

+0

嗨,任何人都可以幫助我嗎? – hdegenaro 2013-03-05 20:17:48

回答

2

讓這可能居住在這裏確認您的memcached配置文件:

/etc/munin/plugin-conf.d/memcached 

看起來是這樣的:

[memcached_*] 
env.host 127.0.0.1 
env.port 11211 
env.timescale 3 

一些默認的配置文件包含的ENV線這樣的額外的信息:

# BAD! DELETE *default* 
[memcached_*] 
env.host 127.0.0.1 *default* 
env.port 11211  *default* 
env.timescale 3  *default*