• This topic has 4 replies, 2 voices, and was last updated October 10, 2018 by Terry W.

API VPG query failover state

  • I’m querying the Zerto API for VPGs
    “https://” + $ZertoServer + “:”+$ZertoPort+”/v1/vpgs”

    When I have a VPG in a TEST failed over state, there is no where that tells me what state it is in

    ActiveProcessesApi       : @{RunningFailOverTestApi=}
    ActualRPO                : 9
    BackupEnabled            : False
    ConfiguredRpoSeconds     : 300
    Entities                 : @{Protected=4; Recovery=4; Source=4; Target=4}
    FailSafeHistory          : @{ActualFailSafeHistory=240; ConfiguredFailSafeHistory=240; FailSafeDescription=}
    HistoryStatusApi         : @{ActualHistoryInMinutes=1441; ConfiguredHistoryInMinutes=1440; EarliestCheckpoint=}
    IOPs                     : 4
    LastTest                 : 10/9/2018 2:22:28 AM
    Link                     : @{href=https://1.1.1.1.1:9669/v1/vpgs/9c71ce41-cf58-453b-a7af-99d0d6120c31; identifier=9c71ce41-cf58-453b-a7af-99d0d6120c31; rel=; type=VpgApi}
    Link_{0}                 : @{href=https://1.1.1.1.1:9669/v1/vpgs/9c71ce41-cf58-453b-a7af-99d0d6120c31; rel=self; type=VpgApi}
    OrganizationName         : 
    Priority                 : 1
    ProgressPercentage       : 0
    ProtectedSite            : @{href=https://1.1.1.1.1:9669/v1/peersites/93af3465-0fca-4f0f-b14c-8ed8a54914bf; identifier=93af3465-0fca-4f0f-b14c-8ed8a54914bf; rel=; 
                               type=PeerSiteApi}
    ProvisionedStorageInMB   : 2978816
    RecoverySite             : @{href=https://1.1.1.1.1:9669/v1/localsite; identifier=5dc986e0-4858-48f6-af14-6c53d11b5f21; rel=; type=LocalSiteApi}
    ServiceProfile           : @{href=https://1.1.1.1.1:9669/v1/serviceprofiles/2f86f750-aea6-45af-9a61-16d12b108f6b; identifier=2f86f750-aea6-45af-9a61-16d12b108f6b; rel=; 
                               type=ServiceProfileIdentifier}
    ServiceProfileIdentifier : 2f86f750-aea6-45af-9a61-16d12b108f6b
    ServiceProfileName       : System Service Profile
    SourceSite               : SouthPole
    Status                   : 1
    SubStatus                : 0
    TargetSite               : NorthPole
    ThroughputInMB           : 0.04052734375
    UsedStorageInMB          : 2955072
    VmsCount                 : 1
    VpgIdentifier            : 9c71ce41-cf58-453b-a7af-99d0d6120c31
    VpgName                  : FileServ-c-FS01
    Zorg                     : @{href=https://1.1.1.1.1:9669/v1/zorgs/00000000-0000-0000-0000-000000000000; identifier=00000000-0000-0000-0000-000000000000; rel=; type=ZorgApi}

    Is this the right place to look or should I be looking somewhere else
    If i want to query what vpgs are failed over (test or otherwise) then stop the fail over

    EDIT: Zerto 6.0 Update 3

    er.. why is this marked as spam?

    Great question, Terry. Not sure why this came in as Spam either and I just released it from the Spam folder for you. I also pinged some of our SMEs to see if they can answer your actual question (versus the spam one!)

    Thanks!

    -Sean M, Zerto Sales Operations

    Thanks, appreciate that

    Right I have found the property I was looking for

    $VMList = Invoke-RestMethod -Uri $VMListURL -TimeoutSec 100 -Headers $zertoSessionHeader -ContentType $TypeJSON
    $VMList | Where-Object {$_.ActiveProcessesApi.RunningFailOverTestApi -ne $null} | select vpgname, VpgIdentifier,@{label='State';expression={$_.ActiveProcessesApi.RunningFailOverTestApi | select -ExpandProperty stage}}
    
    VpgName               VpgIdentifier                        State 
    -------               -------------                        ----- 
    Authentication-c-DC02 32ef8ce8-e1fe-4066-b0d9-aad5341fa7d2 InTest

    I’ll then use that to send to the stop fail-over API call

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