[英]Munin master not fetching data from external Munin-node
我試圖使我的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和munin_master上的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$
還重新啟動了穆寧。
/etc/munin# /etc/init.d/munin-node restart
* Stopping Munin-Node [ OK ]
* Starting Munin-Node [ OK ]
這對於munin_master似乎工作正常。 但是,當Munin主站嘗試通過端口4949(通過發送SYN位)與10.0.0.1建立新連接時。 外部節點拒絕連接並以復位位作為響應。 由於指定了外部節點接受此連接,所以我看不到為什么會發生這種情況。
默認情況下,我位於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
任何有關如何解決此問題的建議將不勝感激:)
在節點10.0.0.1上,鍵入$ tail -f /var/log/munin/munin-node.log
然后按兩次Enter鍵以清除屏幕。 這只供您查看新結果。
在另一個窗口中,轉到節點10.0.0.4,然后鍵入$ telnet 10.0.0.1 4949
,查看難題的答案是否在其中一個窗口中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.