-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Apr 01, 2022 6:46 am
- Full Name: Pankaj Patil
- Contact:
Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
Hi Team,
Can we enable the feature specifically for the free tape pool? We should get an alarm when a media pool free tape left number is less than 10 or 20 or below the defined threshold.
Case # 06246536
Can we enable the feature specifically for the free tape pool? We should get an alarm when a media pool free tape left number is less than 10 or 20 or below the defined threshold.
Case # 06246536
-
- Product Manager
- Posts: 10300
- Liked: 2749 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
Hello Pankaj
Thanks for your request. May I know the use case for the request? Even if there are no free tapes available, the backup server will also use online tapes which are already expired. They won't show up in the free media pool.
May I suggest a workaround over PowerShell?
1) Get all tapes of the free media pool:
2) If the value is less than 10, send out a mail.
The complete script:
Best,
Fabian
Thanks for your request. May I know the use case for the request? Even if there are no free tapes available, the backup server will also use online tapes which are already expired. They won't show up in the free media pool.
May I suggest a workaround over PowerShell?
1) Get all tapes of the free media pool:
Code: Select all
$pool = Get-VBRTapeMediaPool -Name Free
$Tapes = Get-VBRTapeMedium | Where-Object {$_.MediaPoolId -eq $pool.ID} | measure
$Tapes.Count
Code: Select all
If ($Tapes.Count –lt 10) { Send-MailMessage -To 'helpdesk@domain.tld' -From 'backupserver@domain.tld' -Subject 'Not enough tapes available' -Body 'Please add new tapes to media pool' -SmtpServer 'smtp.domain.tld' -Port 587 }
Code: Select all
$pool = Get-VBRTapeMediaPool -Name Free
$Tapes = Get-VBRTapeMedium | Where-Object {$_.MediaPoolId -eq $pool.ID} | measure
$Tapes.Count
If ($Tapes.Count –lt 10) { Send-MailMessage -To 'helpdesk@domain.tkd' -From 'backupserver@domain.tld' -Subject 'Not enough tape available' -Body 'Please add new tapes to media pool' -SmtpServer 'smtp.domain.tld' -Port 587 }
Fabian
Product Management Analyst @ Veeam Software
-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Apr 01, 2022 6:46 am
- Full Name: Pankaj Patil
- Contact:
Re: Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
Thanks Fabian, I will test the script and let you know.
And below is the Veeam Case ID
Case # 06246536
And below is the Veeam Case ID
Case # 06246536
-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Apr 01, 2022 6:46 am
- Full Name: Pankaj Patil
- Contact:
Re: Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
Many thanks, script is working. 
Also, could you please help me to display the tape count in the email body

Also, could you please help me to display the tape count in the email body
-
- Product Manager
- Posts: 10300
- Liked: 2749 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
You're welcome 
i changed the order of the script and now I generate the body with the amount of tapes before executing the Send-MailMessage command. Please let me know if it works.
Best,
Fabian

i changed the order of the script and now I generate the body with the amount of tapes before executing the Send-MailMessage command. Please let me know if it works.
Code: Select all
$pool = Get-VBRTapeMediaPool -Name Free
$Tapes = Get-VBRTapeMedium | Where-Object {$_.MediaPoolId -eq $pool.ID} | measure
$Tapes.Count
$Recipient = 'helpdesk@domain.tkd'
$Sender = 'backupserver@domain.tld'
$SMTPServer = 'smtp.domain.tld'
$Subject = 'Not enough tape available'
$Body = 'Please add new tapes to media pool. Only ' + $Tapes.Count + ' tapes are available.'
$Port = 587
If ($Tapes.Count –lt 10) { Send-MailMessage -To $Recipient -From $Sender -Subject $Subject -Body $Body -SmtpServer $SMTPServer -Port $Port }
Fabian
Product Management Analyst @ Veeam Software
-
- Influencer
- Posts: 14
- Liked: 1 time
- Joined: Apr 01, 2022 6:46 am
- Full Name: Pankaj Patil
- Contact:
Re: Feature request: - Alarm when a media pool free tapes left number is less than 10 or 20
Many thanks, all set new script is also working. 

Who is online
Users browsing this forum: No registered users and 93 guests