Script not being executed when alarm is triggered

Real-time performance monitoring and troubleshooting

Script not being executed when alarm is triggered

Veeam Logoby jtweath » Wed Jul 22, 2015 7:17 pm

I recently deployed Veeam Availability Suite One ver. 8 in our environment, but I’m having trouble getting a simple test script to run when a VM is powered off. I’m using the ‘VM power status’ alarm to monitor a test vm which should kick off a simple script.

My automate goal is to automate the failover of a highly-critical vm to a replica.

- c:/Scripts/Test.cmd

dir c:/ > c:/Scripts/test.txt

Pause

Alarm Settings
    Action = Run Script
    Value=c:/Scripts/Test.cmd
    Condition=Any State
jtweath
Novice
 
Posts: 7
Liked: 1 time
Joined: Tue Jul 21, 2015 7:03 pm
Full Name: Jay W

Re: Script not being executed when alarm is triggered

Veeam Logoby Vitaliy S. » Wed Jul 22, 2015 8:19 pm

Hello Jay,

Can you confirm that you value is specified like this "c:/Scripts/Test.cmd" and not using "\" instead? Is it a typo in the post?

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

Re: Script not being executed when alarm is triggered

Veeam Logoby jtweath » Wed Jul 22, 2015 8:42 pm

Yes. Sorry. It is a typo. It is "C:\Scripts\Test.bat".

Alarm Settings
    Action = Run Script
    Value="C:\Scripts\Test.bat"
    Condition=Any State
jtweath
Novice
 
Posts: 7
Liked: 1 time
Joined: Tue Jul 21, 2015 7:03 pm
Full Name: Jay W

Re: Script not being executed when alarm is triggered

Veeam Logoby Vitaliy S. » Wed Jul 22, 2015 9:02 pm

Does Veeam ONE service account have access to the location of the script? Can you trigger that script manually using our service account?
Vitaliy S.
Veeam Software
 
Posts: 19570
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Script not being executed when alarm is triggered

Veeam Logoby jtweath » Wed Jul 22, 2015 9:16 pm

Vitaliy S. wrote:Does Veeam ONE service account have access to the location of the script? Can you trigger that script manually using our service account?


The service account has local admin rights and can manually run the script. This is a simple tasks that should run with no problems. The alarm is monitoring the vm because the 'Repeat Count' is increasing every time it’s powered on/off. I just don't know why the 'Action' is not being performed.
jtweath
Novice
 
Posts: 7
Liked: 1 time
Joined: Tue Jul 21, 2015 7:03 pm
Full Name: Jay W

Re: Script not being executed when alarm is triggered

Veeam Logoby jtweath » Wed Jul 22, 2015 10:44 pm

Does the script have to be a certain type of script/file type? .cmd, .bat, .ps1, etc
jtweath
Novice
 
Posts: 7
Liked: 1 time
Joined: Tue Jul 21, 2015 7:03 pm
Full Name: Jay W

Re: Script not being executed when alarm is triggered

Veeam Logoby Vitaliy S. » Thu Jul 23, 2015 9:55 am

Batch script should be ok, see this topic with script examples we have used at VeeamON 2014 > ONEbelievable tricks: Veeam ONE and Automation Services

jtweath wrote:The service account has local admin rights and can manually run the script.

Try to explicitly add read write access to the folder with scripts, so that account used for Veeam ONE service can execute them. If it doesn't help, then please open a support case with our team and let me know your case ID.
Vitaliy S.
Veeam Software
 
Posts: 19570
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Script not being executed when alarm is triggered

Veeam Logoby jtweath » Fri Jul 24, 2015 2:38 pm 1 person likes this post

I explicitly added the veeam service account, but it still didn't work. Also, one of our consultants was unsuccessful in getting it to work in their lab as well.

My veeam support case # 00975173.
jtweath
Novice
 
Posts: 7
Liked: 1 time
Joined: Tue Jul 21, 2015 7:03 pm
Full Name: Jay W

Re: Script not being executed when alarm is triggered

Veeam Logoby toningzkiz » Fri Nov 13, 2015 6:31 am

Hi,

Has this issue been resolved?
I'm experiencing same problem with my script - it's not running when an alarm is triggered.

Please advise.


Thanks,

toningzkiz
toningzkiz
Novice
 
Posts: 9
Liked: 1 time
Joined: Fri Oct 25, 2013 8:45 am
Full Name: Antonio Rodriguez

Re: Script not being executed when alarm is triggered

Veeam Logoby Shestakov » Fri Nov 13, 2015 10:53 am

Hi Antonio,
Yes, the case mentioned above has been resolved via support by installing the private patch and the last update.
What product version are you at?
Thanks!
Shestakov
Veeam Software
 
Posts: 4863
Liked: 396 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script not being executed when alarm is triggered

Veeam Logoby toningzkiz » Mon Nov 16, 2015 2:10 am

Hi Nikita,

I'm using Veeam v7.0
Version 7.0.0.919

Where can I download the private patch/last update?

Thanks and regards,

Tony
toningzkiz
Novice
 
Posts: 9
Liked: 1 time
Joined: Fri Oct 25, 2013 8:45 am
Full Name: Antonio Rodriguez

Re: Script not being executed when alarm is triggered

Veeam Logoby Shestakov » Mon Nov 16, 2015 10:28 am

You can get it via Veeam technical support.
toningzkiz wrote:
Version 7.0.0.919

The OP`s issue has been solved by installing the latest build of v8. So you need to update to v8 first and apply the latest patch.
Thanks!
Shestakov
Veeam Software
 
Posts: 4863
Liked: 396 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script not being executed when alarm is triggered

Veeam Logoby toningzkiz » Mon Nov 16, 2015 11:09 am

No solution for this version (V7) on this issue?

Thanks,

Tony
toningzkiz
Novice
 
Posts: 9
Liked: 1 time
Joined: Fri Oct 25, 2013 8:45 am
Full Name: Antonio Rodriguez

Re: Script not being executed when alarm is triggered

Veeam Logoby Shestakov » Mon Nov 16, 2015 12:29 pm

The best way to check is to contact our support team.
Once you do, please post your support case # here.
Thanks!
Shestakov
Veeam Software
 
Posts: 4863
Liked: 396 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Script not being executed when alarm is triggered

Veeam Logoby toningzkiz » Tue Nov 17, 2015 3:12 am

Here's my Case # 01111593

Latest recommendations:

1. Update to patch No. 2 (KB1927) - already done
2. check Set-Execution Policy if on Unrestricted level - already done. Powershell scripts are running and generating results. I'm using a simple batch file in my testing. It runs as standalone, but not as post script in Veeam.
3. Add Veeam One account to the Windows Administrators group - already done adding the service account for Veeam on the local administrators group of the Veeam server.

Script is still not working after doing the steps above.

I also installed one Veeam server with V8 and latest update (Version 8.0.0.1669), and still postscript is not working on this version.

Seems I'm not doing it right.
Can you tell me how to make this work on V8?

Thank you very much for your support.

Regards,

Tony
toningzkiz
Novice
 
Posts: 9
Liked: 1 time
Joined: Fri Oct 25, 2013 8:45 am
Full Name: Antonio Rodriguez

Next

Return to Monitoring



Who is online

Users browsing this forum: No registered users and 3 guests