1
  1. 我正在使用packetbeat进行监控,并且正在使用 ubuntu 作为操作系统。

  2. 我配置了所有东西,MySQL 的端口是 3306。我在 kibana 中获取仪表板,但是如果我开始使用 MySQL,我在 Packetbeat 中什么也得不到。它无法追踪。

[interfaces] #Select on which network interfaces to sniff. You can use the "any" # keyword to sniff on all connected interfaces. device = "any"

[protocols] #Configure which protocols to monitor and on which ports are they #running. You can disable a given protocol by commenting out its #configuration.

[protocols.http] ports = [80, 8080, 8000, 5000, 8002]

[protocols.mysql] ports = [3306]

[protocols.pgsql] ports = [5432]

#[protocols.redis] #ports = [6379]

4

1 回答 1

1

如果使用“localhost”,MySQL 将尝试通过 UNIX 套接字连接(请参阅https://dev.mysql.com/doc/refman/5.5/en/connecting.html)。但是,如果您指定 IP(可能是 127.0.0.1),它将改为通过 TCP 连接,从而允许 Packetbeat 嗅探该连接。

于 2015-11-24T12:07:32.420 回答