Discussions specific to the Nutanix AHV hypervisor
Post Reply
veremin
Product Manager
Posts: 16778
Liked: 1404 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Veeam Availability for Nutanix AHV 1.0. Email notifications

Post by veremin » Jun 27, 2019 2:10 pm 2 people like this post

Challenge:

Currently, Veeam Availability for Nutanix AHV 1.0 does not support Job Email Notifications. To resolve this until the feature is implemented, a script has been developed to provide Daily Email Reporting Functionality.

Solution:

Refer to this KB article.

Lapa
Novice
Posts: 4
Liked: never
Joined: Sep 11, 2019 11:40 am
Contact:

Re: Veeam Availability for Nutanix AHV 1.0. Email notifications

Post by Lapa » Sep 11, 2019 12:44 pm

Script is a good crutch, but it works strange.

There is an SQLite quiery in it (line 117):

Code: Select all

policy_stopped_events = (van_db_cursor.execute('''select task.Name, task.ProgressAsJson from DtoEvent as event inner join DtoTask as task on json_extract(event.ParametersAsJson, '$[0].Value') = task.Uid where event.DateUtc >= date('now', '-1 days','start of day', 'utc') and event.DateUtc <= date('now', 'start of day', 'utc') and (event.LogEventType in (?, ?) ) order by event.DateUtc desc;''', (EventType.BackupStopped.value, EventType.BackupError.value) )).fetchall()
I have modified it to add jobs for today, adding a date option DateUtc <= date('now','+1 days', 'start of day', 'utc')

So my quiery looks as:

Code: Select all

policy_stopped_events = (van_db_cursor.execute('''select task.Name, task.ProgressAsJson from DtoEvent as event inner join DtoTask as task on json_extract(event.ParametersAsJson, '$[0].Value') = task.Uid where event.DateUtc >= date('now', '-1 days','start of day', 'utc') and event.DateUtc <= date('now', '+1 days', 'start of day', 'utc') and (event.LogEventType in (?, ?) ) order by event.DateUtc desc;''', (EventType.BackupStopped.value, EventType.BackupError.value) )).fetchall()
Today is 11.09.2019 13:00

The script report send me following output:

Code: Select all

Job	                                        Start time	                Result
NTNX_Apps2 - No Tape	        9/11/19 1:00:00 AM	Success
NTNX Terminals1 - No Tape	9/10/19 8:00:48 PM	Success
NTNX_Terminals2 - No Tape	9/9/19 9:00:00 PM	Success
NTNX_Apps2 - No Tape	        9/10/19 1:00:01 AM	Success
NTNX Terminals1 - No Tape	9/9/19 8:00:49 PM	Success
NTNX_Apps2 - No Tape	        9/9/19 1:00:00 AM	Success
NTNX_Exchanges4	                9/8/19 11:00:00 PM	Success
NTNX_Filers6	                        9/8/19 11:00:00 PM	Success
NTNX_Terminals2 - No Tape	9/8/19 9:00:00 PM	Success
Why it includes record for Job task "NTNX_Terminals2 - No Tape" started at 9/8/19 9:00PM and ended up 9/9/19 2:45AM?
and Job Task "NTNX_Filers6" (see log below)

Code: Select all

9/8/19 11:00:00 PM	Job starting
9/9/19 4:15:00 AM	Backup finished
But NOT includes record for FAILED Job task "NTNX Terminals1 - No Tape" which i started manually at 9/11/19 11:39AM and then cancel to get a Failed job for test. Log below:

Code: Select all

9/11/19 11:39:04 AM	Job starting
9/11/19 11:44:40 AM	i907svts88 : Backup was unsuccessful. Preparing VM for backup failed, 1.
9/11/19 11:44:41 AM	Job canceled
What can be wrong?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests