ONEbelievable tricks: Veeam ONE and Automation Services

Monitoring and reporting for Veeam Backup & Replication, VMware vSphere and Microsoft Hyper-V

ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Fri Nov 14, 2014 5:46 pm 16 people like this post

Guys,

As promised during our VeeamON session, here is the description of every trick that was demoed (including the PowerShell script examples for every scenario). Please note that you have to be using Veeam Availability Suite v8 to make it work.

And kudos to Vladimir for creating these PowerShell scripts! Without his deep knowledge of PowerShell and scripting this would not be possible.

VM with no backup

1. Create VM backup alarm in Veeam ONE via Alarms Management tab
2. Define the required RPO and assign the alarm
3. In the post alarm actions specify a batch file to trigger a backup PowerShell script
4. When alarm is triggered the corresponding PowerShell script will create a quick backup of the VM

If you don't have VMs added to the backup jobs, then you can write a PowerShell script that will create a job for the VM and then run it.

Terminate job after X hours

1. Create backup alarm and select jobs you want to monitor
2. Define jobs maximum duration
3. In the post alarm actions specify a batch file to trigger a backup PowerShell script
4. The PowerShell script can be configured to do one of the following actions:
• Stop the required backup job
• Run a script to check for orphaned VM snapshots and then try to consolidate them

Delete orphaned VM snapshots

1. Use one of the predefined VM snapshot alarms (snapshot size or snapshot age)
2. In the post alarm actions specify a batch file to trigger a backup PowerCLI script which will try to consolidate all VM snapshots

You can even specify the name of the snapshots you want to consolidate in the PowerCLI script.

Automated VM failover

1. Detect failed VMs/hosts/datastores via one of the predefined alarms in Veeam ONE (for example, VM power state, VM Tools state etc.)
2. In the post alarm actions specify a batch file to trigger a backup PowerShell script
3. To make sure it is not a network glitch run additional verifications within the PowerCLI/PowerShell script
4. Once all verifications are performed create a failover plan in Veeam backup console and then run it
4a. As an alternative you can create a PowerShell script to initiate VM failover operation without using failover plans.
4b. Additionally, you can start VM replicas manually via PowerCLI script

VM tags in Veeam ONE and Veeam B&R

1. Navigate to Veeam ONE Business View and create the required categories/groups for automatic categorization rules
2. Create categorization rule or dynamic group via Business View. See online help center web page for more info > Configuring Categorization Rules
3. Configure Veeam ONE to write VM Tags to the vCenter Server > Configuring Options
4. Verify Veeam ONE Reporter collection job schedule (this job is responsible for writing VM tags) > Scheduling Data Collection
5. Open Veeam backup console and start using VM tags as a source for your backup and replication jobs!

Receive alarms via text message

1. Navigate to any alarm you want to configure this action for
2. Set "send email notifications" as post alarm action
3. Specify your cell phone number in the format described below. 10-digit number should be your cell phone number.

Code: Select all
Alltel   [10-digit phone number]@message.alltel.com
Example: 1234567890@message.alltel.com

AT&T (formerly Cingular)   [10-digit phone number]@txt.att.net
[10-digit phone number]@mms.att.net (MMS)
[10-digit phone number]@cingularme.com
Example: 1234567890@txt.att.net

Boost Mobile   [10-digit phone number]@myboostmobile.com
Example: 1234567890@myboostmobile.com

Nextel (now Sprint Nextel)   [10-digit telephone number]@messaging.nextel.com
Example: 1234567890@messaging.nextel.com

Sprint PCS (now Sprint Nextel)   [10-digit phone number]@messaging.sprintpcs.com
[10-digit phone number]@pm.sprint.com (MMS)
Example: 1234567890@messaging.sprintpcs.com

T-Mobile   [10-digit phone number]@tmomail.net
Example: 1234567890@tmomail.net

US Cellular   [10-digit phone number]email.uscc.net (SMS)
[10-digit phone number]@mms.uscc.net (MMS)
Example: 1234567890@email.uscc.net

Verizon   [10-digit phone number]@vtext.com
[10-digit phone number]@vzwpix.com (MMS)
Example: 1234567890@vtext.com

Virgin Mobile USA   [10-digit phone number]@vmobl.com
Example: 1234567890@vmobl.com


Audible alarms

1. Set a batch script as an action item for the alarm
2. Use “psexec” to execute another *.bat file to play an audio file on any server

Disclaimer: Use these these script examples in your test environment first, and make sure you adapt them to your needs before using them in the production environment.

Thank you!
Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby cpfleger » Fri Nov 14, 2014 11:58 pm

Nice!

Regards!
cpfleger
Veeam ProPartner
 
Posts: 231
Liked: 23 times
Joined: Fri Aug 31, 2012 7:30 am
Full Name: Claus Pfleger

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby joergr » Tue Nov 18, 2014 2:22 pm

Very nice examples - excellent code - very nice work, Vitaliy!!!!

Joerg
joergr
Expert
 
Posts: 377
Liked: 39 times
Joined: Tue Jun 08, 2010 2:01 pm
Full Name: Joerg Riether

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Tue Nov 18, 2014 2:28 pm

...and Vladimir :)
Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby joergr » Tue Nov 18, 2014 2:42 pm 1 person likes this post

VERY nice work Vitaliy and Vladimir!!!! ;-)
joergr
Expert
 
Posts: 377
Liked: 39 times
Joined: Tue Jun 08, 2010 2:01 pm
Full Name: Joerg Riether

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby alewas » Tue Nov 18, 2014 11:32 pm

You guys rock!
alewas
Veeam Software
 
Posts: 60
Liked: 8 times
Joined: Thu Oct 17, 2013 12:44 pm
Full Name: Alejandro Wasserlauf

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Fri Dec 05, 2014 2:08 pm

Another trick that you guys might find helpful is the ability to create your own alerts based on the Windows Event log of the backup server. For example, if you want to be notified when the restore task happens (for auditing purposes), you can use Event 210 from the Windows Event log as a trigger for this alarm.

Create your OWN alarms for Veeam B&R

1. Navigate to Alarm Management tab
2. Select Veeam B&R node as the alarm type
3. Click to create new alarm and select "event" as an alarm trigger
4. Choose any alarm from the list below triggered by Veeam B&R v8

Code: Select all
Event ID   Event Name

23010   Job created
23050   Job modified
23090   Job deleted
23110   Job objects added
32120   Job objects deleted
23130   Job objects modified
23210   SureBackup job created
23220   SureBackup job modified
23230   SureBackup job deleted
23310   SureBackup objects added
23320   SureBackup objects deleted
23330   SureBackup objects modified
110   Backup job started
190   Backup job finished
150   Backup task finished
114   Tape backup job started
194   Tape backup job finished
210   Restore session started
250   Restore vSphere task finished
251   Restore Hyper-V task finished
290   Restore session finished
310   SureBackup job started
350   SureBackup vSphere verification task finished
351   SureBackup vSphere  validation task finished
360   SureBackup Hyper-V verification task finished
361   SureBackup Hyper-V validation task finished
390   SureBackup job finished
410   Backup copy job started
450   Backup copy task finished
490   Backup copy job finished
510   File copy job started
590   File copy job finished
512   VM copy job started
592   VM copy job finished
10010   Restore point created
10050   Restore point removed
10090   Restore point updated
10014   Tape restore point created
20114   Tape updated
21210   Proxy server established connection
21214   Proxy server lost connection
21220   Repository server established connection
21224   Repository server lost connection
21230   WAN accelerator established connection
21234   WAN accelerator lost connection
24010   License installed
24020   License expiring
24022   License evaluation expiring
24030   License expired
24040   License support expiring
24050   License support expired
23410   Second destination job has been assigned
23420   Second destination job has been removed
610   Quick migration job has been finished
Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby jgreenback » Thu Mar 19, 2015 4:46 pm

What info can be gathered using the "echo %#" to a txt file?

Examples? does %2 = VM name?
jgreenback
Enthusiast
 
Posts: 31
Liked: 11 times
Joined: Thu Sep 19, 2013 9:26 pm
Full Name: Jason Greenback

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Thu Mar 19, 2015 5:45 pm

Yes, please see our online help center page for more info on the parameters > http://helpcenter.veeam.com/one/80/vsph ... rs%2Balarm
Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby jgreenback » Fri Mar 20, 2015 9:24 pm

This is exactly what I needed. Thanks!
jgreenback
Enthusiast
 
Posts: 31
Liked: 11 times
Joined: Thu Sep 19, 2013 9:26 pm
Full Name: Jason Greenback

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Kirststoner12 » Thu Apr 09, 2015 5:42 pm

Cool!
Kirststoner12
Veeam Software
 
Posts: 6
Liked: 2 times
Joined: Mon Aug 18, 2014 5:44 pm
Full Name: Kirsten Stoner

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby bennytalent » Thu May 21, 2015 9:41 am

hi guys,

the script examples in first post are not avaiable anymore.
can you re-upload them?

thx alot!

benny
bennytalent
Lurker
 
Posts: 2
Liked: never
Joined: Tue Sep 17, 2013 11:34 am
Full Name: Benjamin Hornung

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Thu May 21, 2015 10:17 am

Hi Benny,

Sorry for that, was cleaning up my dropbox public folder and for some reason I have decided to delete this archive ;)

P.s. did you come here after the whiteboard episode about these scripts?

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby bennytalent » Thu May 21, 2015 10:50 am

no i've read about it in the vtec Newsletter - where can i find the Whiteboard Episode :)
bennytalent
Lurker
 
Posts: 2
Liked: never
Joined: Tue Sep 17, 2013 11:34 am
Full Name: Benjamin Hornung

Re: ONEbelievable tricks: Veeam ONE and Automation Services

Veeam Logoby Vitaliy S. » Thu May 21, 2015 11:05 am

Vitaliy S.
Veeam Software
 
Posts: 20086
Liked: 1156 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Next

Return to Veeam ONE



Who is online

Users browsing this forum: No registered users and 1 guest