我正在尝试让我的munin主从另一个外部munin节点获取数据。但我似乎遇到了问题。 Munin主存在10.0.0.4,而外部节点在10.0.0.1。我试图让10.0.0.4从10.0.0.1获取数据。
我相信我已正确设置配置:
在munin_master上编辑/etc/munin/munin.conf,使其从10.0.0.1获取数据。
[muninServer.vm]
address 10.0.0.1
use_node_name yes
在munin_master上重新启动了Munin和apache。
/etc/init.d/munin-node restart
* Stopping Munin-Node [ OK ]
* Starting Munin-Node [ OK ]
还在munin_master上重启了apache2
/etc/init.d/apache2 restart
在外部munin节点上编辑/etc/munin/munin-node.conf,允许munin_master从外部munin节点收集文件。
allow ^10\.0\.0\.4$
还重启了munin。
/etc/munin# /etc/init.d/munin-node restart
* Stopping Munin-Node [ OK ]
* Starting Munin-Node [ OK ]
这似乎对munin_master很好。但是,当Munin master尝试在端口4949上建立与10.0.0.1的新连接时(通过发送SYN位)。外部节点拒绝连接并以复位位响应。由于指定外部节点接受此连接,我不明白为什么会发生这种情况。
我在10.0.0.1的本地防火墙默认接受所有流量。所以这不是原因:
iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination
Chain FORWARD (policy ACCEPT) target prot opt source destination
Chain OUTPUT (policy ACCEPT) target prot opt source destination
可能需要注意的是,在外部节点上使用:telnet 127.0.0.1 4949工作正常,而在munin_master上使用telnet 10.0.0.1 4949则被拒绝。
试图找出端口是否正在侦听外部节点:
lsof | grep TCP | grep LISTEN
munin-nod 4669 root 5u IPv4 2095805 0t0 TCP localhost:munin (LISTEN)
netstat -tulpn
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4949 0.0.0.0:* LISTEN 4669/perl
外部节点上munin-node.conf中的信息内容。
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setsid 1
user root
group root
ignore_file [\#~]$
ignore_file DEADJOE$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
allow ^127\.0\.0\.1$
allow ^::1$
allow ::ffff:158.36.119.179
allow ^10\.0\.0\.4$
allow ^128\.39\.74\.58$
host 127.0.0.1
host ::ffff:158.36.119.179
port 4949
任何有关如何解决此问题的建议都将非常感激:)
答案 0 :(得分:0)
在节点10.0.0.1上,键入$ tail -f /var/log/munin/munin-node.log
然后按几次进入以清除屏幕。这只是为了让您看到新结果。
在另一个窗口中,转到节点10.0.0.4,然后键入
$ telnet 10.0.0.1 4949
并查看您的难题的答案是否在其中一个窗口中。