https://login.veeam.com/en/oauth?client_id=nXojRrypJ8&redirect_uri=https%3A%2F%2Fwww.veeam.com%2Fservices%2Fauthentication%2Fredirect_url&response_type=code&scope=profile&state=eyJmaW5hbFJlZGlyZWN0TG9jYXRpb24iOiJodHRwczovL3d3dy52ZWVhbS5jb20va2IxOTEwIiwiaGFzaCI6IjZjMTFmZjJjLTAyNTQtNDc3NC1hNTk4LTcwNTg4NWI1OTBlNiJ9
1-800-691-1991 | 9am - 8pm ET
EN

Using alert description, time generated and other data in a scripted action

Purpose

The article gives an example of how alarm data can be used in scripting actions.

Cause

You would like to use alarm data in custom scripts.

Solution

Run script — select this option if you want to run a custom script when the alarm is triggered or when the alarm status changes. By running a post-alarm script, you can automate routine tasks that are normally performed when specific alarms fire. For example, if a critical system is affected, you may need to immediately open a ticket with the in-house support or perform some corrective actions that will eliminate the problem.

In the Value field, enter the path to the executable file (please note that the executable file must be located on the Veeam ONE server). You can use the following parameters in the command line for running the script: %1 — alarm name; %2 — fired node name; %3 — triggering summary; %4 — time; %5 — alarm status; %6 — old alarm status.

User-added image


Example:

REM A script to log alarms in a text file C:\temp\alarm.txt
SET v1=%1
SET v2=%2
SET v3=%3
SET v4=%4
SET v5=%5
SET v6=%6



echo %v1%>>C:\temp\alarm.txt
echo %v2%>>C:\temp\alarm.txt
echo %v3%>>C:\temp\alarm.txt
echo %v4%>>C:\temp\alarm.txt
echo %v5%>>C:\temp\alarm.txt
echo %v6%>>C:\temp\alarm.txt

echo ================================>>C:\temp\alarm.txt
KB ID:
1910
Product:
Veeam ONE
Version:
6.x, 7.x, 8.x, 9.x
Published:
2014-07-31
Last Modified:
2020-08-13
Please rate how helpful this article was to you:
5 out of 5 based on 1 ratings
Thank you for helping us improve!
An error occurred during voting. Please try again later.

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

Knowledge base content request
By submitting, you agree that your personal data will be managed by Veeam in accordance with the Privacy Policy.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later