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

[Backup Service] 'backup_task_run' stat is not populated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • Cheshire-Cat
    • 7.0.0
    • tools
    • 7.0.0-3435

    Description

       

      Description:

      The 'backup_task_run' stat does not seem to be populated

      http://10.112.210.101:8091/pools/default/stats/range/backup_task_run
      

      Steps to reproduce:

      1. Create a repository and take a one off or scheduled backup (I took a scheduled backup followed by a one off backup).

      2. Fetch the 'backup_task_run' stat and observe the response is not populated.

       

      http://10.112.210.101:8091/pools/default/stats/range/backup_task_run
       
      {"data":[],"errors":[]}

       

      What I expected to happen:

      I expected the stat to indicate that two tasks have been dispatched.

       

      Side note

      The the backup_dispatched stat is working correctly.

       

      http://10.112.210.101:8091/pools/default/stats/range/backup_dispatched
       
      {"data":[{"metric":{"nodes":["10.112.210.101:8091"],"cluster":"self","instance":"backup","name":"backup_dispatched","repository":"my_repo","result":"success","state":"active"},"values":[[1603580697,"2"],[1603580707,"2"],[1603580717,"2"],[1603580727,"2"],[1603580737,"2"],[1603580747,"2"],[1603580757,"2"]]}],"errors":[]}
      

       

      The values field tracks the stat. It is list of time since the epoch followed by the stat at that time e.g. [1603580757, "2"] suggests the stat 'backups_dispatched' is 2 at time 1603580757 (I think that's seconds since the epoch).

       

      Attachments

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

        Activity

          It seems to work ok

          % http --auth Administrator:asdasd http://localhost:9001/pools/default/stats/range/backup_task_run                                                                                                                                                                                                                                                                                                                    
          HTTP/1.1 200 OK
          Cache-Control: no-cache,no-store,must-revalidate
          Content-Length: 298
          Content-Type: application/json
          Date: Wed, 21 Oct 2020 05:00:36 GMT
          Expires: Thu, 01 Jan 1970 00:00:00 GMT
          Pragma: no-cache
          Server: Couchbase Server
          X-Content-Type-Options: nosniff
          X-Frame-Options: DENY
          X-Permitted-Cross-Domain-Policies: none
          X-XSS-Protection: 1; mode=block
           
          {
              "data": [
                  {
                      "metric": {
                          "cluster": "self",
                          "instance": "backup",
                          "name": "backup_task_run",
                          "nodes": [
                              "[::1]:9000"
                          ],
                          "repository": "test-repo",
                          "result": "success",
                          "state": "active",
                          "task_type": "BACKUP"
                      },
                      "values": [
                          [
                              1603256396,
                              "1"
                          ],
                          [
                              1603256406,
                              "1"
                          ],
                          [
                              1603256416,
                              "1"
                          ],
                          [
                              1603256426,
                              "1"
                          ],
                          [
                              1603256436,
                              "1"
                          ]
                      ]
                  }
              ],
              "errors": []
          }
          

          Without a timeline of events it is difficult to say what happened but it could be that the service had not been polled for stats yet, you can check in the prometheus UI to see if it was poll or not or hit the prometheus enpoint in the backup service ndoes to see if the numbers seem correct.

          carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment - It seems to work ok % http --auth Administrator:asdasd http://localhost:9001/pools/default/stats/range/backup_task_run HTTP/1.1 200 OK Cache-Control: no-cache,no-store,must-revalidate Content-Length: 298 Content-Type: application/json Date: Wed, 21 Oct 2020 05:00:36 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Pragma: no-cache Server: Couchbase Server X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block   { "data": [ { "metric": { "cluster": "self", "instance": "backup", "name": "backup_task_run", "nodes": [ "[::1]:9000" ], "repository": "test-repo", "result": "success", "state": "active", "task_type": "BACKUP" }, "values": [ [ 1603256396, "1" ], [ 1603256406, "1" ], [ 1603256416, "1" ], [ 1603256426, "1" ], [ 1603256436, "1" ] ] } ], "errors": [] } Without a timeline of events it is difficult to say what happened but it could be that the service had not been polled for stats yet, you can check in the prometheus UI to see if it was poll or not or hit the prometheus enpoint in the backup service ndoes to see if the numbers seem correct.

          Considering the feature is still under development, I will close it for now and attempt to replicate it again in the future and see it if works.

          asad.zaidi Asad Zaidi (Inactive) added a comment - Considering the feature is still under development, I will close it for now and attempt to replicate it again in the future and see it if works.

          People

            Unassigned Unassigned
            asad.zaidi Asad Zaidi (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