Bug 2270946

Summary: [CephFS-Mirror][RFE] - Provide metrics support for the Replication Start/End Notifications
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Hemanth Kumar <hyelloji>
Component: CephFSAssignee: Jos Collin <jcollin>
Status: CLOSED ERRATA QA Contact: Hemanth Kumar <hyelloji>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: ceph-eng-bugs, cephqe-warriors, dwalveka, jcollin, tserlin, vshankar
Target Milestone: ---Keywords: FutureFeature
Target Release: 7.1z2Flags: dwalveka: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-18.2.1-235.el9cp Doc Type: Enhancement
Doc Text:
With this enhancement, metrics support for the replication start and end notifications is provided. These metrics enable monitoring logic for data replication. This enhancement provides labeled metrics: last_synced_start, last_synced_end, last_synced_duration, last_synced_bytes as requested.
Story Points: ---
Clone Of:
: 2303452 (view as bug list) Environment:
Last Closed: 2024-11-07 14:38:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2303452    

Description Hemanth Kumar 2024-03-22 10:05:25 UTC
Description of problem:
-----------------------

At present, metrics counters for the average/sum of time taken to sync all the snapshots are provided.
 
Metrics should be provided or enable monitoring logic to generate the following alerts:

* Metrics reflecting the alerts for start time of data replication.
* Metrics reflecting the alerts for end time of data replication.
* Metrics reflecting the alerts for time taken for the data replication(single snapshot replication) to complete

Also. include the metrics for start/end when a data replication restarts due to some failures.

Metrics available at present : 
------------------------------


  {
    "key": "cephfs_mirror_peers",
    "value": [
      {
        "labels": {
          "peer_cluster_filesystem": "cephfs",
          "peer_cluster_name": "remote_site",
          "source_filesystem": "cephfs",
          "source_fscid": "1"
        },
        "counters": {
          "snaps_synced": 201,
          "snaps_deleted": 200,
          "snaps_renamed": 0,
          "sync_failures": 1,
          "avg_sync_time": {
            "avgcount": 201,
            "sum": 21.406007450,
            "avgtime": 0.106497549
          },
          "sync_bytes": 132
        }
      }
    ]
  }

Comment 1 Venky Shankar 2024-03-26 12:20:52 UTC
Jos - Please create an upstream tracker for this.

Comment 10 errata-xmlrpc 2024-11-07 14:38:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 7.1 security, bug fix, and enhancement updates), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:9010