【问题标题】:what is the log format of elastic search?elasticsearch的日志格式是什么?
【发布时间】:2017-09-21 12:32:33
【问题描述】:

elasticsearch 日志示例格式:[2017-08-30T06:27:19,158][WARN ][o.e.m.j.JvmGcMonitorService] [Glsuj_2] [gc][296816] overhead, spent [1.2s] collecting in the last [1.3s]

你能解释一下这是什么意思吗?当我们观察日志时? 请解释一下日志中的每一个字?

o.e.m.j.JvmGcMonitorService 是什么意思?

Glsuj_2 是什么意思?

gc 是什么意思?

296816 是什么意思?

【问题讨论】:

    标签: elasticsearch logging


    【解决方案1】:

    日志消息由JvmGcMonitorService class 组成。 我认为这是查找日志记录语义的最佳位置。在 github is still open 上请求文档的故障单。

    这也适用于涉及更多的警告,例如SLOW_GC_LOG_MESSAGE

    直接回答(部分)您的问题

    o.e.m.j.JvmGcMonitorService - 日志记录类的缩写限定名

    Glsuj_2你的节点名

    gc - “垃圾收集” - 'gc' 被硬编码在日志字符串中

    296816 - 一个序列号,当 gc 被监控时递增

    但是日志中有趣的部分在它之后开始:spent [1.2s] collecting in the last [1.3s]。同样:括号内的部分由 JvmGcMonitorService 填充。

    【讨论】:

      【解决方案2】:

      根据 Tommy 的回复,日志文件将包含以下详细信息。

      [gc][{}][{}][{}] duration [{}], collections [{}]/[{}], total [{}]/[{}], memory [{}]->[{}]/[{}], all_pools {}
      

      大括号使用下面的值替换,使用它们的位置顺序。因此,从左到右读取的第一个 {} 被“name”的值替换,最后一个被 pools.apply(lastJvmStats, currentJvmStats) 返回的值替换。

       name,
       seq,
       totalGcCollectionCount,
       currentGcCollectionTime,
       currentGcCollectionCount,
       TimeValue.timeValueMillis(elapsed),
       currentGcCollectionTime,
       totalGcCollectionTime,
       lastJvmStats.getMem().getHeapUsed(),
       currentJvmStats.getMem().getHeapUsed(),
       maxHeapUsed,
       pools.apply(lastJvmStats, currentJvmStats)
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-09-08
        • 2010-12-18
        • 1970-01-01
        • 1970-01-01
        • 2014-03-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多