Monitoring Symantec System Recovery Through Automation
I love the SSR product (500+ active deployments), but unfortunaltey, management options for large-to-enterprise installations just do not exist. And yes, I am aware Symantec has an Altiris-based Management Solution, however, in my environment, installing an agent on remote PC's is simply not an option (due in part to software compatibility and support restrictions).
That said, I have come to the conclusion that I will have to write a custom reporting module to get the data I need and so far I have made some significant progress, but I still have a few roadblocks.
My goal is to create a roll-up reporting system -- my SSR backup server at each site will run a small custom application to poll each SSR instance at the site, grab a handful of information about the backups and push the data to a central SQL database. From this SQL database, I will write a custom reports/dashboards/etc... to be able to have an enterprise view of the backup status.
As I said earlier, I have made some progress -- I am gathering /some/ data, as shown in the examples below and the data is reporting up to the SQL database as designed.
My troubles come with getting /detailed/ information from SSR... Let's look at some examples:
----------------- Example #1
My first attempt at this was to start at the image level... Get a list of JOBS from SSR and (hopefully) find the last time the job ran and the status.
This example returns a LOT of good information, however, I cannot seem to find a last image time or last image result. As you can see, I have tried to use the "Next Backup Expected" and "Last Backup Expected" options and the output of those objects makes no sense (in my environment, they both return the same value of 3:00:00 AM, which is not specified as a backup time and does not match what the GUI says the Next/Last Backup times are).
I would probably PREFER to use this method in my application.
For Each oImageJob In oBESRApp.ImageJobs
If oImageJob.Enabled Then
Console.WriteLine("Backup Job ID: " & vbTab & oImageJob.ID)
Console.WriteLine("Backup Job Display Name: " & vbTab & oImageJob.DisplayName)
Console.WriteLine("Type: " & vbTab & oImageJob.Type)
Console.WriteLine("Description: " & vbTab & oImageJob.Description)
Console.WriteLine("Next Backup: " & vbTab & oImageJob.NextExpectedBackup)
Console.WriteLine("Last Backup: " & vbTab & oImageJob.LastExpectedBackup)
For Each oVolume In oImageJob.Volumes
Console.WriteLine("Volumes: " & vbTab & oVolume)
----------------- Example #2
Since I have not been able to get the data I was hoping to find, I figured I would try from the volume level... Use the API to get a list of ALL volumes on the SSR instance and get the LastImage.TimeStamp for each. This works, but creates a few technical challenges:
- In /some/ cases, I need to be able to exclude drives from reporting based on the SSR instance -- an example here would be, on my SSR backup server, I would not want to report the image status of my iSCSI SAN attached as D: (because I am not backing it up using SSR), but I would want other D: drives, on other SSR instances to report
- This method forces me to use an On Error statement (which I hate to have to do), because SSR will not have a Last Image Time Stamp for a drive it does not have an image for. This must be trapped, or a Null Exception is returned.
For Each oVolume In oBESRApp.Volumes(False)
If (oVolume.Valid) Then
Console.WriteLine(vbTab & "Mount Point: " & vbTab & oVolume.MountPoint)
Console.WriteLine(vbTab & "Mounted: " & vbTab & oVolume.Mounted)
Console.WriteLine(vbTab & "Type: " & vbTab & vbTab & oVolume.Type)
Console.WriteLine(vbTab & "File System: " & vbTab & oVolume.FileSystem)
Console.WriteLine(vbTab & "Display Name: " & vbTab & oVolume.DisplayName)
Console.WriteLine(vbTab & "Boot Volume: " & vbTab & oVolume.Active)
Console.WriteLine(vbTab & "System Volume: " & vbTab & oVolume.System)
Console.WriteLine(vbTab & "Machine: " & vbTab & oVolume.Machine)
Console.WriteLine(vbTab & "Label: " & vbTab & vbTab & oVolume.Label)
Console.WriteLine(vbTab & "Hidden: " & vbTab & oVolume.Hidden)
sVolumeLastImage = "10/10/10 10:10:10 AM"
On Error Resume Next
sVolumeLastImage = oVolume.LastImage.TimeStamp
Console.WriteLine(vbTab & "Last Image: " & vbTab & sVolumeLastImage)
My preference would be to find a way to make example #1 work... Hoping this makes sense to someone?