Real-time performance monitoring and troubleshooting
barbarbar
Novice
Posts: 3
Liked: never
Joined: Jul 18, 2009 9:01 am
Full Name: bar
Contact:

How to make run script work

Post by barbarbar »

Hello

I enables in one of the actuin to alarm email and run script .
email is working but "run acript" is not working .
in the box next to the run acript i put the path to the script c:\scripts\sensms.vbs .

is there "way" syntax to write the location of the script ?

Regards
Gostev
Chief Product Officer
Posts: 31805
Liked: 7298 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: How to make run script work

Post by Gostev »

Hello,

I believe, VBS files should be started with the following line:
cscript c:\scripts\sensms.vbs

Thanks!
barbarbar
Novice
Posts: 3
Liked: never
Joined: Jul 18, 2009 9:01 am
Full Name: bar
Contact:

Re: How to make run script work

Post by barbarbar »

Hi

Thank you for your answer .
when i run it for the windows run command its working but when put it the run script the script is not working .

any idea why ?
arseny
Influencer
Posts: 21
Liked: never
Joined: Jan 01, 2006 1:01 am
Full Name: Arseny Chernov
Contact:

Re: How to make run script work

Post by arseny »

Hi,

Please check what is the user that VeeamDCS (Data Collection Service) is running on your server?

Thanks,
Arseny
barbarbar
Novice
Posts: 3
Liked: never
Joined: Jul 18, 2009 9:01 am
Full Name: bar
Contact:

Re: How to make run script work

Post by barbarbar »

still doesn't work . i change the user , for tests , for admin and then script is not workink0sending sms.
Gostev
Chief Product Officer
Posts: 31805
Liked: 7298 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: How to make run script work

Post by Gostev »

Bar, if you are using licensed Veeam Monitor version, feel free to send all Veeam Monitor service logs along with your custom VBS script to support@veeam.com. Our developers will be able to investigate from logs why the script is not running as expected, and advise on correcting the script and/or the way you run it to make it work.
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Gostev, can I send my powershell script that isn't working? just like the OP, email is working but script does not work.
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Hi Becki,

Yes, please just open a support case.
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

wishr, thanks, I got it working. I was also told support does not work on user scripts, at all.
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Hi Becki,

While our technical support does not offer advice on how to create scripts they can definitely investigate why Veeam ONE is not able to execute the script (and possibly provide a solution) or confirm there is an issue with the script itself. Could you please share your support case ID? I'll take a look.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

I'm not finding it, by searching in my closed cases. It was something that was said, repeatedly to me.
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Well, there is a thin line between troubleshooting the script and troubleshooting why the product does not execute the script (if it doesn't, of course). I'll ask our technical support management to reach you back and take another look at the issue.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 » 1 person likes this post

Wishr, thank you
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Wishr, I will have to open a ticket with support after all. My script works for other alerts, but I have an orphaned recovery, that keeps happening (and I have no idea why) and I am getting email, for any state of recovery issues but the script isn't triggering. The email is. weird.
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Hi Becki,

Yes, please, go ahead and open a ticket.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

I did. Case #04705559. thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

support said since i wrote it, they won't support it. the script is working on errors, to write out, but on informational, it is not triggering on "any" state, yet emails are working, on "any" state of the same alarm (in this case, orphaned recovery)
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Hi Becki,

Could you please provide a bit more in-depth info and tell us the whole story behind the issue?

Also, a few particular questions:
1. What is the alarm that is "not working" you are referring to? There is no alarm called "orphaned recovery".
2. What do you call "any state"?
3. What did you mean by saying "to write out"?
4. What means "informational"? A screenshot of this is appreciated. You may use any image-hosting resource to upload the image and provide a link to it.
5. What emails you are referring to?
6. At the end of the day, what you are trying to achieve?

Please, be as precise and detailed as possible so that we could get the full picture.

Also, I've sent a note to the support management so they might get back to you with some additional questions as well.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

the alarm email looks like this, to me:

Code: Select all

Object:	object
Object Type:	Backup Server
Location:	location
Host:	host
Status:	Information
Previous Status:	Information
Alarm:	Restore activity
Time:	3/17/2021 9:40:10 AM
Details:	Fired by event: 290 Veeam MP
Event description: The restore session has finished with Failed state. Job details: Session became orphaned. Restore job is failed: Restore session closed unexpectedly.
Initiated by: n/a
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

i copied the script into the Veeam ticket, can you see that? and that script is called for all alarms, and works fine, for things like failed backup.
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Enclosed is the email I receive, which is working fine. At the end of the day, I'm trying to use the script, which is written in the Veeam ticket, to write a flat file, with the 7 variables in it, from V1, to a NAS drive which will then take that file and ship it to an existing ticketing system. The emails, sent to me, are just so I can confirm alerts are being written out, as expected, and it seems, they are not. It's the same shared script on all alarms, in V1
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

I've removed some sensitive data from the text you posted above - please be careful posting such info publicly.

Yes, I see the script, but it does not really matter, especially if it works for other alarms for you.

Do you see the alarm itself in the Veeam ONE UI? Could you please provide a screenshot of this alarm? Again, please don't forget to remove all sensitive info from the image.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Yes, this is the alarm, triggered 34 times:

Info

3/17/2021 9:39:52 AM

Fired by event: 290 Veeam MP
Event description: The restore session has finished with Failed state.Job details: Session became orphaned.Restore job is failed: Restore session closed unexpectedly.
Initiated by: n/a

that is the alarm in the V1 gui
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Never mind. Seems my powersheller changed the name of the script, swapping "-" for "_" and because you can't dump the notifications in version 10, I didn't realize that some of the alarms pointed to the old name and some pointed to the new name. bah. I hope with version 11, we really can upload one script to all alarms, for consistency. thanks
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Hi Becki,

I'm glad to see it's resolved now.

Unfortunately, v11 does not change anything to the script assignment process. You still have to add it manually to the desired alarms, but you can select several alarms by holding CTRL, as usual, and then assign a script to all of the selected alarms.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

wishr, i thought we could dump alarms to text and upload that text to many alarms. Is that not the case (and I'll see when I can get to my V11 V1 testing) and if it's not, I think I already asked for that as an enhancement. It's painful to have to open every alarm, like I did yesterday, to make certain the "Notification" actions were correct, and move to the next one.

Is the Notifications (emails, run a script, etc...) being trigger logged somewhere that I/support, can see, in a log, on the V1 box?
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

Becki,

Dumping alerts to text is a completely different request from what you posted above and we discussed it there. It's not a part of v11 for sure because v11 was released near at the same time you posted that request. Depending on the priorities, it might get implemented in any future version. If you would like to continue the conversation on that request - please create your posts in that topic so future forum readers could benefit from the structured information.

To make sure the notification settings are correct for many/all alarms and to bulk-change them you may select any number of the desired alarms and go to their notification settings just once, with the help of a few mouse clicks and the CTRL button.

Regarding the logging, alert notification events are stored in the VeeamDCS.log file located in the Disk:\ProgramData\Veeam\Veeam ONE Monitor\Logs folder on the Veeam ONE server. If you need any help with the log analysis, please reach out to our support team directly.

Thanks
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

Wishr, that hightlight to select seems to append though, actions, not change what is already defined. I got 5 emails about the same event, before I realized that. Thanks on the log location. (I really need the time to crack the manuals, not put out fires :-) )
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: How to make run script work

Post by wishr »

No, you can change the settings that are applicable to all selected alarms, including notification settings.
bkain1
Expert
Posts: 137
Liked: 8 times
Joined: Dec 23, 2020 4:43 pm
Full Name: Becki Kain
Contact:

Re: How to make run script work

Post by bkain1 »

thanks on the log, wishr. I can see the powershell being triggered with all the correct parameters.
Post Reply

Who is online

Users browsing this forum: masouddorostkar and 4 guests