One thing that is often overlooked after a RecoverPoint solution is implemented is the ongoing Protection Window value for your Consistency Groups. During the design phase, the Journal sizes are (hopefully) diligently and accurately calculated according to your RPO.
But as time goes by, how many people actually check that the projected Protection Windows are in fact correct ? If they are underspec’d, your RPO’s may well be hosed.
It’s easy to check manually in Unisphere. Expand the Consistency Group, the Replica Copy then in the Journal TAB;
But even for a small amount of Groups, collating that info is going to be tedious. Of course this information can also be shown using the get_group_statistcs command;
But it’s buried deep amongst other stats and not easy to collate, due to the scattered nature of the output.
But why not script @ automate it and have the details for every Consistency Group emailed to you ? That’d be Cool….. PowerShell to the rescue.
So here it is. You’ll need plink in the working directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<# .DESCRIPTION This script connects to a RecoverPoint Cluster and runs the get_consistency_groups cmdlet. The data is filtered to extract only the Consistemcy Group Names and the curretn Protection Window. Edit variables/paramters as required. Author: Brett Sinclair www.pragmaticio.com #> $DataDir = "c:\scripts\working" Clear-Content $DataDir\*.txt $SMTPSrv = "yoursmtpserver.com" $RPCluster = "YourCLusterName" $MailTo = "recipient@domain.com.au" $CGroups = (./plink.exe -ssh $RPCluster -P 22 -l admin -pw passwd get_groups | select-string -pattern 'Copies' -context 1 | % {($_.context.precontext)[0]}) $CGroups = $CGroups -replace "^..|..$|\s,''" | Out-file $DataDir\CGroups.txt #Get stats & clean output $PWin = (./plink.exe -ssh $RPCluster -P 22 -l admin -pw admin get_group_statistics | select-string -Pattern 'Protection Window:' -Context 3 | %{($_.context.postcontext)[1]}) $PWin -replace " Value","" | Out-File $DataDir\Pwin.txt # Join files & columns $counter=type $DataDir\CGroups.txt|measure $total=$counter.count $f1 = get-content $DataDir\CGroups.txt $f2 = get-content $DataDir\Pwin.txt for ($i=0; $i -lt $total; $i++) { ($f1[$i] + $f2[$i]) | Out-File $DataDir\msgbody.txt -append } # Send Email $MsgBody = (gc $DataDir\msgbody.txt) | out-string send-mailmessage -from RecoverPoint@domain.com.au -to $MailTo -subject "RecoverPoint - Current Protection Window Stats" -body "$MsgBody" -SmtpServer $SMTPSrv |
and here’s what the email looks like;
Add it as a task schedule and your set.
My next challenge is to format it according to some SLA thresholds and save as a webpage for monitoring. Sounds like fun, stay tuned.
Enjoy.