Monitoring Veeam Backup & Replication V12.1

Hello together

I want to bring our veeam backups into solarwinds. My Idea is to have the informations on a modern dashboard. I see the total jobs, running jobs, failed jobs, jobs with warning. All these informations I should get from snmp and OID. I turned on SNMP Notification in Veeam. Installed SNMP Service and configured everything successfully for solarwinds. If I create a UnDP I don't get any informations. 

Did someone else some similar configuration with Veeam B&R V12.1?

Thank you for the help!

Maceo

  •  Veeam Backup and Replication Server <- here's an old post relating to VBR 6 and 7. Doesn't look like theres an updated version of it. I poked around Reddit and seen some of the same requests, however no comments. Do you pay for the VBR Suite with VeeamOne? IMO VeeamOne would probably be the best fit for monitoring the jobs.

  • Hi Mark,
    I saw them too and wondered why no one is monitoring it anymore over solarwinds. Currently we haven't Veeam ONE but we will have it in the future. Because we use Solarwinds for everything it would be nice to monitor the backup jobs also in this.

  • I feel like they peak Veeam era might have passed, it used to be everywhere but I haven't seen it at any of my big enterprise customers in while.

    Have you done an SNMP walk against the veeam appliance to confirm that the OID's you are looking for actually show up.  I can tell you from painful years of experience that just because you see something in a MIB that is not a strong indicator that the devices will actually present the data.  The MIB's seems to be more of an aspirational document than reality for some vendors.

  • Yeah VeeamOne is pretty powerful for monitoring backup jobs and VMware infrastructure, it has loads of other reports that can be useful for instance capacity planning reports for your data stores. It will tell you which VM's are over provisioned or under provisioned. etc etc

  • I'm interested to hear what companies are using instead of Veeam? I  have only ever worked for companies that use Veeam, I do know Rubrick is a strong competitor, Altaro, Commvault, Druva being some honourable mentions.

  • Thats a good hint. I checked them and don't get any informations.. I used the MIB-File from the Veeam Server (C:\Program Files\Veeam\Backup and Replication\Backup\VeeamBackup.mib)

  • Veeam can write back to a vCenter custom attribute.  I grab it and alot of other data using PowerCLI and then writing the data up to a separate db/table on the Orion SQL server, write a stored procedure and launch it from a custom table. Haven't done this with a modern dashboard, but am likely to attempt it this week...

  • Hi Maceo,

    I've recently done something for our backup support team. SolarWinds has a couple of Veeam 6 & 7 backup templates but not 12. You need to grant the SolarWinds monitoring account read only access to the Veeam One/Management server to execute the PowerShell plug-in. Execute the Powershell as this account in the Application Monitor template with the PowerShell module,

    PS Module 1. Check for Backup Failures.

    $WarningPreference='silentlycontinue'
    $local:ErrorActionPreference="Stop"
    $Error.Clear()
    # set the default exit code to UP
    $iExitCode = "0"
    try
    { 
       $jobs=Get-VBRJob | Where-Object {$_.GetLastResult() -eq "Failed"} | ForEach-Object {$_ | Select-Object @{Name="Job";Expression={$_.Name}}, @{Name="Status";Expression={$_.GetLastResult()}}}
       $jobs_number=($jobs | measure-object).Count
     
       Switch($jobs_number)
       {
          {$_ -ge 10}
          {
             # set exit code to Critical
             $iExitCode = "3"
             $jobs_names = ($jobs.Job) -join ";  "
    
             $strMessage = "{0}" -f $jobs_names
             $iStatistic = "{0}" -f $jobs_number
          }
          {$_ -ge 1}
          {
             # set exit code to Warning
             $iExitCode = "2"
             $jobs_names = ($jobs.Job) -join ";  "
    
             $strMessage = "{0}" -f $jobs_names
             $iStatistic = "{0}" -f $jobs_number
          }
          default
          {
             $strMessage = "No failed backup or replication jobs found."
             $iStatistic = "0"
             # set exit code to UP
             $iExitCode = "0"
          }
       }
    }
    catch
    {
       #$strMessage =  "ERROR executing {0} - {1}" -f $(Get-VBRJob), $($Error[0])
       $strMessage = "Error executing command"
       $iStatistic = "0"
       $iExitCode = "1"
    }
    
    Write-Host ("Message: {0}" -f  $strMessage)
    Write-Host ("Statistic: {0}" -f $iStatistic)
    Exit $iExitCode

    This should give you the Backup Failure count and a list of failed Jobs.

    Not finished yet, but the following Code will count how many jobs are: "Successful", "Warnings", "Failed", "None".
    Update:  code edited, Results now has message and statistical info

    $WarningPreference='silentlycontinue'
    $Error.Clear()
    $VeeamJobs = (Get-VBRJob).GetLastResult()
    
    $BackupJobsState = $VeeamJobs | Group-Object -AsHashTable
    
    ForEach ($jobstate in $BackupJobsState.Keys)
    {
        Write-Host ("Message.Jobs_{0}_Result: Job State: {0}" -f $jobstate)
        Write-Host ("Statistic.Jobs_{0}_Result: {1}" -f $jobstate, $BackupJobsState[$jobstate].Count)
    }
    
    Write-Host "Message.Jobs_Total_Result: Total Job Count"
    Write-Host ("Statistic.Jobs_Total_Result: {0}" -f $VeeamJobs.Count)
    

    If you want details on a particular job then use this code.  Don't forget to replace " ENTER JOB NAME HERE " with the job name you wish to monitor

       $WarningPreference='silentlycontinue'
       $Error.Clear()
       # $job_name=$args[0]
       $job_name = " ENTER JOB NAME HERE "
    
       if ( $job_name -eq $null )
       {
          Write-Host "Message: Can't find ""job_name"" argument. Check documentation."
       }
       try
       { 
          $job_result=(Get-VBRJob -name $job_name).GetLastResult()
          $job_state=(Get-VBRJob -name $job_name).GetLastState()
          $job_session=(Get-VBRJob -name $job_name).FindLastSession().BackupStats
          $job_progress=(Get-VBRJob -name $job_name).FindLastSession().info
       }
       catch
       {
          Write-Host "Message: ERROR executing ""Get-VBRJob"". Possibly wrong job name argument. <br/> $($Error[0])"
       }
       switch ($job_result) 
       { 
          "Success" { $stat1=0 } 
          "None" { $stat1=1 } 
          "Failed" { $stat1=2 } 
          default { $stat1=3 }
       }
       switch ($job_state) 
       { 
          "Stopped" { $stat2=0 } 
          "Starting" { $stat2=1 } 
          "Working" { $stat2=2 } 
          "Stopping" { $stat2=3 } 
          "Resuming" { $stat2=4 } 
          "Pausing" { $stat2=5 } 
          default { $stat2=6 }
       }
       if ( $job_session -eq $null )
       { 
          $stat3=$stat4=$stat5=$stat6=$stat7=0
       }
       else
       {
          $stat3=$job_session.BackupSize
          $stat4=$job_session.CompressRatio
          $stat5=$job_session.DataSize
          $stat6=$job_session.DedupRatio
          $stat7=$job_progress.Progress.Percents
          $stat8=$job_progress.Progress.avgspeed
       }
       Write-Host "Message.Last_Job_Result: Last job result: $job_result"
       Write-Host "Statistic.Last_Job_Result: $stat1"
       Write-Host "Message.Job_State: Job state: $job_state"
       Write-Host "Statistic.Job_State: $stat2"
       Write-Host "Message.Last_Session_Backup_Size: Backup size in last session: $stat3"
       Write-Host "Statistic.Last_Session_Backup_Size: $stat3"
       Write-Host "Message.Last_Session_Compression_Ratio: Compression ratio in last session: $stat4"
       Write-Host "Statistic.Last_Session_Compression_Ratio: $stat4"
       Write-Host "Message.Last_Session_Data_Size: Data size in last session: $stat5"
       Write-Host "Statistic.Last_Session_Data_Size: $stat5"
       Write-Host "Message.Last_Session_Deduplication_Ratio: Deduplication ratio in last session: $stat6"
       Write-Host "Statistic.Last_Session_Deduplication_Ratio: $stat6"
       Write-Host "Message.Progress: Progress: $stat7 %"
       Write-Host "Statistic.Progress: $stat7"
       Write-Host "Message.AvgSpeed: Average Speed: $stat8"
       Write-Host "Statistic.AvgSpeed: $stat8"

    Last but no means least, to gather the Veeam License information so you can set and alert when it's about to expire.
    Note I've set the date format / region to UK (en-gb), you can change this for your preferred time region

    $WarningPreference='silentlycontinue'
    $Error.Clear()
    $iExitCode = "0"
    # Obtain the UK Culture\Language Setting
    [System.Object]$objCulture = New-Object system.globalization.cultureinfo('en-GB')
    # get the current UK Date time stamp
    [System.Object]$dtFullUKDateTimeStamp = Get-Date -format ($objCulture.DateTimeFormat.FullDateTimePattern)
    
    $objVeeamLicDetails = Get-VBRInstalledLicense | Select-Object Status, ExpirationDate, InstanceLicenseSummary
    
    switch ($objVeeamLicDetails.Status) 
    { 
       "valid" { 
          $iVeeamLicStatus=0 
       } 
       "None" {
          $iVeeamLicStatus=3
          # Set the exit code to Crtiical
          $iExitCode = "3"
       }
       default {
          $iVeeamLicStatus=2
          # Set the exit code to Warning
          $iExitCode = "2"
       }
    }
    
    $dtVeeamLicExpirationDate = (Get-Date $objVeeamLicDetails.ExpirationDate -Format ($objCulture.DateTimeFormat.LongDatePattern))
    $iVeeamLicDaystoExpire = (New-TimeSpan -End $dtVeeamLicExpirationDate ).Days
    
    $iVeeamLicensedInstances = $objVeeamLicDetails.InstanceLicenseSummary.LicensedInstancesNumber
    $iVeeamUsedInstances = $objVeeamLicDetails.InstanceLicenseSummary.UsedInstancesNumber
    $iVeeamInstanceObjectCount = $objVeeamLicDetails.InstanceLicenseSummary.Object.Count
    $strVeeamInstanceObjects = ((($objVeeamLicDetails.InstanceLicenseSummary.Object).Type | sort) -join ", ").Tostring()
    
    Write-Output ("Message.Veeam_Lic_Status: {0}" -f $objVeeamLicDetails.Status)
    Write-Output ("Statistic.Veeam_Lic_Status: {0}" -f $iVeeamLicStatus)
    
    Write-Output ("Message.Veeam_Lic_Expiration_Date: {0}" -f $dtVeeamLicExpirationDate)
    Write-Output "Statistic.Veeam_Lic_Expiration_Date: 0"
    
    Write-Output ("Message.Veeam_Lic_ExpiresInDays: {0}" -f $iVeeamLicDaystoExpire)
    Write-Output ("Statistic.Veeam_Lic_ExpiresInDays: {0}" -f $iVeeamLicDaystoExpire)
    
    Write-Output ("Message.Veeam_Licensed_Instances: {0}" -f $iVeeamLicensedInstances)
    Write-Output ("Statistic.Veeam_Licensed_Instances: {0}" -f $iVeeamLicensedInstances)
    
    Write-Output ("Message.Veeam_Used_Instances: {0}" -f $iVeeamUsedInstances)
    Write-Output ("Statistic.Veeam_Used_Instances: {0}" -f $iVeeamUsedInstances)
    
    Write-Output ("Message.Veeam_Instance_Objects: {0}" -f $strVeeamInstanceObjects)
    Write-Output ("Statistic.Veeam_Instance_Objects: {0}" -f $iVeeamInstanceObjectCount)
    exit $iExitCode
    

    Just a few little scripts to help anyone

  • Yes, Veeam B&R V12.1 does support SNMP, but the built-in SNMP traps are limited and don’t expose detailed job metrics via standard OIDs. That’s likely why your UnDP in SolarWinds isn’t returning data. Most users, especially those looking for streamlined solutions like cheap autocheck options, get around this by using PowerShell scripts to extract job stats via the Veeam PowerShell snap-in, then send those to SolarWinds using the Orion SDK or via custom SNMP traps or syslog. Alternatively, consider using the Veeam Enterprise Manager REST API to feed job status into SolarWinds with more flexibility.