- 論壇徽章:
- 0
|
我想用tcpdump抓取Zabbix的數(shù)據(jù)庫MySQL的數(shù)據(jù)包。
但原來的Zabbix Server里配置文件用的socket方式連接到MySQL,- # egrep 'DBHost=' zabbix_server.conf
- DBHost=localhost
復(fù)制代碼 無論是監(jiān)聽eth0或者lo都無法抓到數(shù)據(jù)包。1.這個(gè)問題要怎么解決。
后面更改DBHost為本機(jī)IP后,- egrep 'DBHost=' zabbix_server.conf
- DBHost=10.31.74.105
復(fù)制代碼 監(jiān)聽eth0無法抓到數(shù)據(jù)包,監(jiān)控lo可以抓到數(shù)據(jù)包。2.這是為什么呢?我的10.31.74.105是配置在eth0上的啊
網(wǎng)卡信息:- # ifconfig
- eth0 Link encap:Ethernet HWaddr 00:0C:29:06:B3:E5
- inet addr:10.31.74.105 Bcast:10.31.74.255 Mask:255.255.255.0
- inet6 addr: fe80::20c:29ff:fe06:b3e5/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:316066 errors:0 dropped:0 overruns:0 frame:0
- TX packets:308105 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:66589493 (63.5 MiB) TX bytes:42328318 (40.3 MiB)
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:65536 Metric:1
- RX packets:4194045 errors:0 dropped:0 overruns:0 frame:0
- TX packets:4194045 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:215066750 (205.1 MiB) TX bytes:215066750 (205.1 MiB)
復(fù)制代碼 監(jiān)聽lo的抓包信息- # tcpdump -i lo -s 0 -l -w - dst port 3306 | strings
- tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
- 2WLX
- O{AK
- select escalationid,actionid,triggerid,eventid,r_eventid,nextcheck,esc_step,status,itemid from escalations order by actionid,triggerid,itemid,escalationidr
- 2WYZ
- 2W?^
復(fù)制代碼 監(jiān)聽eth0無法抓到數(shù)據(jù)包- # tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings
- tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
復(fù)制代碼 |
|