Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2165

Introduce cluster-wide logging stats

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1.2
    • Logging, Metrics
    • None

    Description

      Based on TS-2145, I'm going to introduce cluster-wide logging stats, so that we can see the logging status of whole cluster.

      I have submitted a patch, which has been tested in our product and master branch. Here is an example to show how this patch works:

      I tested it with:
      1) Two log clients, test78/test79, in the same cluster.
      2) One log server, test81.

      I used jtest to do stress testing(rm -rf /var/run/trafficserver/*.snap to clear history value before testing), after a while, stop jtest, and use following commands to verify the logging metrics:

      ==Log client1: test78==

      [root@test78 ~]# lynx -dump http://localhost:8080/stat/ | grep -E 'cluster.*sent_to_network|log_access_ok'
      proxy.node.log.event_log_access_ok=6898925
      proxy.cluster.log.event_log_access_ok=8795630
      proxy.cluster.log.num_sent_to_network=8795630
      proxy.cluster.log.num_lost_before_sent_to_network=0
      proxy.cluster.log.bytes_sent_to_network=1268834448
      proxy.cluster.log.bytes_lost_before_sent_to_network=0
      proxy.cluster.log.bytes_sent_to_network_avg_10s=0
      proxy.process.log.event_log_access_ok=6898925
      

      ==Log client2: test79==

      [root@test79 ~]# lynx -dump http://localhost:8080/stat/ | grep -E 'cluster.*sent_to_network|log_access_ok'
      proxy.node.log.event_log_access_ok=1896705
      proxy.cluster.log.event_log_access_ok=8795630
      proxy.cluster.log.num_sent_to_network=8795630
      proxy.cluster.log.num_lost_before_sent_to_network=0
      proxy.cluster.log.bytes_sent_to_network=1268834448
      proxy.cluster.log.bytes_lost_before_sent_to_network=0
      proxy.cluster.log.bytes_sent_to_network_avg_10s=0
      proxy.process.log.event_log_access_ok=1896705
      

      ==Log server: test81==

      [root@test81.cn8 trafficserver]# lynx -dump http://localhost:8080/stat/ | grep -E "received_from_network|_to_disk" | grep process
      proxy.process.log.num_received_from_network=8795630
      proxy.process.log.num_flush_to_disk=8795630
      proxy.process.log.num_lost_before_flush_to_disk=0
      proxy.process.log.bytes_received_from_network=1268834448
      proxy.process.log.bytes_flush_to_disk=857743696
      proxy.process.log.bytes_lost_before_flush_to_disk=0
      proxy.process.log.bytes_written_to_disk=857743696
      proxy.process.log.bytes_lost_before_written_to_disk=0
      

      According these stats data above, We can easy to verify whether the logs in the whole cluster are lost.

      Attachments

        Activity

          People

            yunkai Yunkai Zhang
            yunkai Yunkai Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: