Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-11615

cbhealthchecker generates incorrect timestamps when scale specified

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Fix
    • Major
    • 3.0
    • 2.2.0
    • tools
    • Security Level: Public
    • None

    Description

      From Tom Green...

      When specifying a 'scale' for cbhealthchecker, an incorrect set of timestamps are reported in the results json.

      Specifically, after running each of these cbhealthchecker commands:
      /opt/couchbase/bin/cbhealthchecker -c 172.16.0.96:8091 -b default -j -u Administrator -p password -s minute
      /opt/couchbase/bin/cbhealthchecker -c 172.16.0.96:8091 -b default -j -u Administrator -p password -s hour
      /opt/couchbase/bin/cbhealthchecker -c 172.16.0.96:8091 -b default -j -u Administrator -p password -s day

      Then referring to the following data in the generated JSON:
      object->buckets_summary->op->samples->timestamps
      and
      object->scale

      Regardless of whether the scale is set to 'minute','hour','day' etc the gap between each of the timestamps is 66 minutes and 40 seconds.

      The expected result is that the timestamps should vary as the scale is changed.
      E.g. every second for scale minute, every 15 seconds for scale hour etc

      Results data:

      These were generated by running the above commands and taking the unix timestamp for each of the first few results and converting to human readable time. Regardless of scale, the time gap remains same.

      DAY SCALE
      vagrant@precise64:~$ date -d @1391426444000
      Wed Jul 19 17:33:20 UTC 46062
      vagrant@precise64:~$ date -d @1391426448000
      Wed Jul 19 18:40:00 UTC 46062
      vagrant@precise64:~$ date -d @1391426452000
      Wed Jul 19 19:46:40 UTC 46062
      vagrant@precise64:~$ date -d @1391426456000
      Wed Jul 19 20:53:20 UTC 46062
      vagrant@precise64:~$ date -d @1391426460000
      Wed Jul 19 22:00:00 UTC 46062

      HOUR scale

      vagrant@precise64:~$ date -d @1391425592000
      Sun Jul 9 20:53:20 UTC 46062
      vagrant@precise64:~$ date -d @1391425596000
      Sun Jul 9 22:00:00 UTC 46062
      vagrant@precise64:~$ date -d @1391425600000
      Sun Jul 9 23:06:40 UTC 46062
      vagrant@precise64:~$ date -d @1391425604000
      Mon Jul 10 00:13:20 UTC 46062
      vagrant@precise64:~$ date -d @1391425608000
      Mon Jul 10 01:20:00 UTC 46062
      vagrant@precise64:~$

      MINUTE SCALE
      vagrant@precise64:~$ date -d @1391426632000
      Fri Jul 21 21:46:40 UTC 46062
      vagrant@precise64:~$ date -d @1391426636000
      Fri Jul 21 22:53:20 UTC 46062
      vagrant@precise64:~$ date -d @1391426640000
      Sat Jul 22 00:00:00 UTC 46062
      vagrant@precise64:~$ date -d @1391426644000
      Sat Jul 22 01:06:40 UTC 46062
      vagrant@precise64:~$ date -d @1391426648000
      Sat Jul 22 02:13:20 UTC 46062

      Cheers,
      Tom

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bcui Bin Cui (Inactive)
            tom-cb Tom Green (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty