• This topic has 8 replies, 3 voices, and was last updated June 29, 2021 by Joseph L.

VM Journal Used report

  • Hi,

    I’m trying to report on used journal for a VM while it’s in a recovery test but I’m seeing a mismatch between what the ZVM believes is used and what the Zerto API and vcenter believes is used.

    I’m seeing the Zerto API and vcenter reporting a higher figure for journal used (almost 100% used) but the ZVM isn’t alerting. The warning threshold is set to much lower than the figure that is being reported by the API and vcenter.

    I believe the issue is that the API is reporting on the storage space used and not the journal space being used within the allocated storage space.

    The powershell script that I’m using the pull information from the API is below:

    ########################

    #================================================================================================
    # Connect to ZVM REST API
    #================================================================================================
    $ZertoServer = “ZVM IP”
    $Credentials = Get-Credential
    #================================================================================================
    # Building ZVR API string and invoking REST API
    #================================================================================================
    $BaseURL = “https://” + $ZertoServer + “:9669/v1/”
    $ZertoSessionURL = $BaseURL + “session/add”
    $Header = @{“Authorization” = “Basic “+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Credentials.UserName+”:”+$Credentials.GetNetworkCredential().Password))}
    $Type = “application/json”

    add-type @”
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
    public bool CheckValidationResult(
    ServicePoint srvPoint, X509Certificate certificate,
    WebRequest request, int certificateProblem) {
    return true;
    }
    }
    “@
    [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]’Ssl3,Tls,Tls11,Tls12′

    $ZertoSessionResponse = Invoke-WebRequest -Method POST -Uri $ZertoSessionURL -Headers $Header -ContentType $Type
    # Extracting the token from the JSON response
    $ZertoSession = $ZertoSessionResponse.headers.get_item(“x-zerto-session”)
    $ZertoSessionHeader = @{“Accept”=”application/json”
    “x-zerto-session”=”$ZertoSession”}
    #================================================================================================
    # Grab Journal Info from API
    #================================================================================================

    $volumesURL = $BaseURL+”volumes”
    $allvolumes = Invoke-RestMethod -Method GET -Uri $volumesURL -Headers $ZertoSessionHeader -ContentType $Type

    $VMName = “VM Name”
    (($allvolumes | Where-Object {($_.ProtectedVm.Name -eq $VMName) -and ($_.VolumeType -eq “Journal”)}).Size.UsedInBytes | measure -Sum).Sum / 1Mb

    ########################

    For the VM in question, this gives me a figure of 4094715 Mb. The warning threshold is set to 4044800 Mb. The ZVM should be alerting but it isn’t. Any ideas?

    Thanks in advance, and let me know if you need any more context or would rather speak about this over the phone.

    Hi,

    This is Kalsang from Zerto.

    Did you check under the VMsettings and verify the hard limit and threshold size, please?

    Best,

    Hi, yep I’ve checked that. For reference they’re:

    Hard limit: 4000 GB
    Warning threshold: 3950 GB

    I think a more concise way to phrase my query is:

    The values that I’m getting from the API are the journal sizes as seen at a storage/hypervisor level. I’d like to know how I can see the journal sizes as seen in the software/ZVM level.

    Hello Nick,

     

    You can look at the journal sizes in your analytics for the affected VPGs\VMs.  Hope this is helpful.

     

    Thank you,

    Joe

    Hi,

     

    We operate a dark site, is there another way to view this information? Is it accessible through the API?

You must be logged in to create new topics. Click here to login