Comprehensive data protection for all workloads
Post Reply
jfintervision
Novice
Posts: 3
Liked: never
Joined: Apr 05, 2024 12:52 pm
Full Name: Jacob Farrar
Contact:

Feature Request: Disable warnings on no-object jobs

Post by jfintervision »

Good Morning,

We have a bit of a dynamic job setup that is all based around VM tagging, so VM's can be assigned different tags for different retentions. This has lead to some jobs not having any associated VM's but we need to keep the jobs active in case a tag is assigned. That causes the job to go into a warning state each time its scheduled to run. Its easy enough to ignore, but it also sends out a warning notification, and triggers a warning with our Veeam One Monitor.

The job warning could be disabled, but generally we prefer to keep it enabled if there's an issue on the jobs. Adding a VM to one of the jobs and having the warning disabled could lead to issues down the road.

The Veeam One alert "Backup Job State" also alerts due to the warning, which generates tickets for us. There's not a way to filter what type of warning triggers the "Backup Job State" alarm, so again we'd have to disable all warning notices and not get tickets.

It would be nice if we could modify a registry setting to convert the "Nothing to process: all machines were excluded from task list" to a normal success.
david.domask
Veeam Software
Posts: 1315
Liked: 344 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Feature Request: Disable warnings on no-object jobs

Post by david.domask »

Hi Jacob,

Welcome to the forums!

The request is understood though regrettably checking internally, I cannot see a registry value that would assist on this specific situation. I think the "add a dummy VM" option is probably the only way I can think of, just some 1 GB thin provisioned dummy VM would do the trick but I understand management-wise this is annoying to have such a dead-weight machine.

Alternatively, I suppose with scripting you could handle it by disabling/enabling the jobs based on whether Find-VBRViEntity with the -Tags parameter returns any VMs or not, but I understand scripting is not always a desired route.

Probably there is some sense in an enhancement request here regarding tags and VeeamOne in particular for handling this situation, so will consider this and register it internally.
David Domask | Product Management: Principal Analyst
jfintervision
Novice
Posts: 3
Liked: never
Joined: Apr 05, 2024 12:52 pm
Full Name: Jacob Farrar
Contact:

Re: Feature Request: Disable warnings on no-object jobs

Post by jfintervision »

I think I've come up with a powershell script that would check VMware jobs to see if there is a VM target, and if not then disable and record the job. After running the next time it would check the recorded list of jobs that were previously disabled and re-enable them if a new VM has been assigned to it. I would like for it to adjust the job's description though, and am having trouble with the Set-VBRJobOptions. Any tips would be appreciated.

Here's the script that I have so far.

Code: Select all

#Filepath to record jobs with no VMs
$FilePath = "C:\Powershell Scripts\NoVMJobs.txt"

#Checks Filepath to see if jobs need to be re-enabled
$NoVMJobs = Get-Content -Path $FilePath
Foreach ($job in $NoVMJobs){
    if($Jobsize -gt 1){
        enable-vbrjob -job $job
        ######This is where I would change the description######
    }
}

#Deletes file so script can check jobs again and record them. 
Remove-Item -path $FilePath

#Checks SPECIFICALLY VMware/Hyper-V jobs to see if there are any objects assigned to them.  If not it gets disabled and recorded in FilePath variable
$jobs = Get-VBRJob | Where-Object {$_.JobType -ne 'EpAgentBackup' -and $_.JobType -ne 'EpAgentPolicy'}
Foreach ($job in $jobs)
{
    $Jobsize = [math]::round($job.Info.IncludedSize)
    if($Jobsize -lt 1){
        $job.name
        disable-vbrjob -job $job
        add-Content -path $FilePath $job.name
        ######This is where I would change the description######
    }
}
I originally tried changing the description with this, but the value is read-only

Code: Select all

$job.info.description = "This Job has been disabled because there are no Virtual Machines assigned to it"

I then tried this options based off of https://helpcenter.veeam.com/docs/backu ... ml?ver=120, but I couldn't find an option for the job description.

Code: Select all

$description = New-VBRJobOptions -ForBackupJob
$description.BackupStorageOptions.description = "test"
Set-VBRJobOptions -Job $job -Options $description
Any tips would be appreciated!
david.domask
Veeam Software
Posts: 1315
Liked: 344 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Feature Request: Disable warnings on no-object jobs

Post by david.domask »

Hi Jacob,

Thank you for sharing your script and your idea -- the plan is reasonable. Regrettably, regarding the Job Description and Powershell, at this time it is not possible, but it's a noted improvement request.

If it were me, I would just write the changes to a log file somewhere so you can track these changes.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 73 guests