Unable to trace Mysql in Packetbeat

762 Views Asked by At
  1. I'm using packetbeat for monitoring and I'm using ubuntu as an operating system.

  2. I configured everything and the port for MySQL is 3306. I'm getting the dashboards in kibana, but if I start using MySQL I'm not getting anything in Packetbeat. It is unable to trace.

[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]

1

There are 1 best solutions below

0
On

MySQL will attempt to connect via UNIX socket if using "localhost" (see https://dev.mysql.com/doc/refman/5.5/en/connecting.html). But if you specify the IP (probably 127.0.0.1) it will connect via TCP instead, allowing Packetbeat to sniff that connection.