microsoft / SCOM_Rubrik_Monitoring

A SCOM Management Pack with a PowerShell script that provides external monitoring of a Rubrik cluster
MIT License
15 stars 7 forks source link

Rubrik.CDM.BackupJob #3

Open Beeb0102 opened 3 years ago

Beeb0102 commented 3 years ago

Hello!

We have seen that SCOM Class "Rubrik.CDM.BackupJob" is not working anymore as there is no BackupJobID inside Rubrik nowadays to get. Rubrik version has been upgraded so many times up until 2021, and I don't see how to get the BackupJob Class working. Could you help, please? Is there any chance to improve this part of the script?

Thank you!

hur13y commented 3 years ago

Hi sweetybeeb,

unfortunately this project has gone a bit stale as we have not been actively using for monitoring our Rubrik environment. We are currently in the planning stages to move Rubrik monitoring into a new cloud based monitoring solution so our focus has not been on continuing this journey with SCOM.

I will reach out to our SCOM team and see if they have any input to help unblock but if the issue is the BackupJobID it might be just a new property we need to switch to. What build of Rubrik CDM are you currently running?

Beeb0102 commented 3 years ago

Hi hur13y,

so grateful that you poked me here on this topic. Yes, well, we wanted to give it a try first with using SCOM monitoring as it is the primary monitoring tool in the company. The Rubrik Powershell module is of 5.3.0 version (5.3.1-p3-18910 - Rubrik cluster version)

The main issues discovered in the PowerShell script I have spotted are:

Example:

$RubrikBackupJobsToAdd = $RubrikBackupJobs | Where-Object {$_.ObjectId -notin $SCOMBackupJobs.Name} Write-Log -HideTime "Found $($RubrikBackupJobsToAdd.Count) Backup Jobs in Rubrik that are not yet managed in SCOM" if ($RubrikBackupJobsToAdd) { foreach($RubrikBackupJob in $RubrikBackupJobsToAdd) { Set-SCOMSDKDiscovery -Class 'Rubrik.CDM.BackupJob' -Properties @{"ID"=$RubrikBackupJob.ObjectId;"ClusterID"=$RubrikBackupJob.ClusterID;"Type"=$RubrikBackupJob.ObjectType} } }

Variable $RubrikBackupJobs results :

MissedLocalSnapshots 14
ObjectName xxxxxxx ObjectState Active
ClusterID xxxxxxx LatestLocalSnapshot 2021-04-29 20:00:03 ArchivalComplianceStatus InCompliance
SlaDomain xxxxxx ObjectType Mssql
ObjectLinkingId MssqlDatabase:::fc2132ab-7f69-4075-9412-2c25f5d6d5b4 ProtectedOn 2021-04-28 13:20:38 ArchivalSnapshotLag 0
SlaDomainId xxxxxx
LatestArchivalSnapshot 2021-04-29 20:00:03 Location xxxx
SlaDomainState Active
LatestReplicationSnapshot
ComplianceStatus NonCompliance
ClusterName xxxxxx

As we can see, there is no ObjectID, but there is ObjectLinkingID above. So, $RubrikBackupJobs.ObjectId - returns nothing, but $RubrikBackupJobs.ObjectLinkingID returns all the current Filesets or MSSQLDatabase IDs. My reckoning is that we can use this ObjectLinkingID instead, yet I am not sure how to fix the $SCOMBackupJobs :-)

Can you guide me on how to fix this please? Or perhaps there is someone from the SCOM team that can help? :)

BTW, which cloud-based monitoring solution are you focused on now? We've been looking at some methods to monitor big MSSQL environments with SCOM that are taking backup very frequently on Rubrik (15 mins or more). Perhaps, SCOM will not face it all.

Thank you so much again!