【问题标题】:Unable to trace Mysql in PacketbeatPacketbeat 中无法追踪 Mysql
【发布时间】:2015-05-27 05:17:28
【问题描述】:
  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]

【问题讨论】:

  • 配置看起来不错。如果你像这样启动 packetbeat:packetbeat -e -c /etc/packetbeat/packetbeat.conf -d "mysql,mysqldetailed,publish" 你有什么提示吗?
  • 这是我得到的输出: output_elasticsearch.go:58: INFO [ElasticsearchOutput] Using Elasticsearch http://175.41.145.234:9200' 'output_elasticsearch.go:59: INFO [ElasticsearchOutput] Using index pattern [packetbeat-]YYYY.MM.DD' 'output_elasticsearch.go:60: INFO [ElasticsearchOutput] Topology expires after 15s' 'publish.go:220: INFO Using Elasticsearch to store the topology' 'publish.go:185: DBG Add topology entry for localhost: [10.150.147.210 fe80::2000:aff:fe96:93d2]' 'publish.go:185: DBG Add topology entry for localhost: [10.150.147.210 fe80::2000:aff:fe96:93d2]
  • 我必须提及或配置任何东西以在 conf 文件中跟踪 mysql ?
  • 请帮帮我..我想追踪mysql到packetbeat...告诉我我必须配置什么。
  • 您还可以配置 packetbeat 来监控 mysqld 进程,在文件底部添加(或注释掉)以下行:procs: enabled: true monitored: - process: mysqld cmdline_grep: mysqld

标签: mysql monitoring kibana packetbeat


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2011-11-05
    • 1970-01-01
    • 2020-02-05
    • 2012-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-05
    • 1970-01-01
    相关资源
    最近更新 更多