Comprehensive data protection for all workloads
Post Reply
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Querying the Veeam EDB for a periodic Jobinfo import to CMDB

Post by FBraendle »

Hi Guys

At the moment im imlpementing an import function to import the job setup / latest backup infos etc.. into our CMDB.
The "problem" i had/have is, that i have to suck the DB logic/relations out of my fingers since its all solved outside the DBMS...

There is one thing I would want to include in this view:
The Drive inclusion/exclusion by VM.

Here is the query i got so far(im quite bad in SQL...):

Code: Select all

SELECT DISTINCT 
                      dbo.BObjects.object_name AS ServerName, dbo.BJobs.name AS JobName, dbo.[Repl.Topology.BackupServers].display_name AS BackupServer, 
                      JobStatus.lastdate AS LastSucBackup, JobStatus.statusLow AS LastBackupState
FROM         dbo.ObjectsInJobs INNER JOIN
                      dbo.BObjects ON dbo.ObjectsInJobs.object_id = dbo.BObjects.id INNER JOIN
                      dbo.BJobs ON dbo.ObjectsInJobs.job_id = dbo.BJobs.id INNER JOIN
                      dbo.[Repl.Topology.BackupServers] ON dbo.BJobs.db_instance_id = dbo.[Repl.Topology.BackupServers].current_db_id INNER JOIN
                          (SELECT     object_id, MIN(status) AS statusLow, MAX(end_time) AS lastdate
                            FROM          dbo.[Backup.Model.BackupTaskSessions]
                            WHERE      (status = 0) OR (status = 2)
                            GROUP BY object_id) AS JobStatus ON JobStatus.object_id = dbo.BObjects.id

Could you tell me, in what table the Jobconfig is stored?
Is it actually stored in the Enterprise Manager DB?

Generally it would be very nice if you guys could provide some standard views, i think there are many users who would love to query the DB :)

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

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by Gostev »

Hi Felix,

Unfortunately, we do not have such information available/documented. Development does not publish internal database structure, as we do not support direct configuration access.

Why not use our PowerShell SDK instead to get the same information instead? This approach is fully supported. The above is pretty complex, and will have to be re-done with every major version due to updated database structure.

Thanks.
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi Gostev

There are two reasons:
This way i only would have to pull the info once, and its one query that i can directly import into our CMDB.
Since we update Veeam maybe once a year/6months i could live with the fact, that i have to adjust the query with every upgrade...

The poweshell would be perfect, BUT
the powershell "self documentation" is IMHO not enough.
Maybe there's a "in depth" documentation for the cmdlets that i missed. If so, please guide me to it... :)

at the moment its just a pain to crawl through the infos via get-help...
I mean i took me way less time to put this query together than to "get-help" through all the cmdlets to see which ones to use and then implement it that way...

Greets
Felix
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi again

I got one question regarding the powershell cmdlets:

Is it possible to export the Backup config with following information:
VMs that get backed up,
in what job on what server they reside,
status of last backup,
Drive Ex/Inclusions...(i could use that info together with WMI to display the actual drive letter that gets backed up...)

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

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by Gostev »

Absolutely. Above are mostly job settings, since they can be set with PowerShell, they can be easily queried as well. And as for last job run status, this is even used in some existing scripts already published on this forum.
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

perfect :)
Well, i have to crawl through the forum more then...

Thanx for the info!

Regards
Felix
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi again

I looked into the powershell cmdlets. Not bad, if there would be sufficiant documentation...

There is one (imho) big thing i would want to acomplish:
i want to export the disk exclusions, parse them and map them to the right VM to have an up2date view of our backup state and implementation in our CMDB.
the only thing at the moment where i break my skull is how to parse/map the diskfilter info to the VMs...
What is the logic behind the diskfilter numbers?

Could you provide me either the knowledge so i can create a function or even better provide some way/function to do it?
you pointed out powershell, now i got some questions ;)

i mean its easy to write a wmi/fstab query to get the drive info from inside the VM
its easy to get the disk info via powerCLI but it seems to be impossible(without further information) to get the actual Veeam/Vsphere diskmapping...

Kind Regards
Felix

PS:I really hope this question gets answered ;)
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi Guys, its me again...

(i know, i know... :))

But I would actually appreciate an answer to this question. :/
I've seen that some people asked the same question but couldn't find an answer...

so again(the short version)
Is it somehow possible to match the diskfilter to the vm/scsi id?
Is there a cmdlet(option) for this that I maybe missed?
If not possible now, is it planed to include this info in an export of a future version?(if yes, when is it planed to be released)

the following question is not really important(if there is a positive answer to the questions above...)
is there a plan to implement the possibility to write reports that can be accessed either via http or mail notification?(implemented in B&R EM)
(i know its possible via powershell, to some degree...)

I really like the product. The only thing missing(once again, IMHO) is this and it would be awesome if you could help me to overcome this issue...

Kind Regards
Felix
Vitaliy S.
VP, Product Management
Posts: 27368
Liked: 2799 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by Vitaliy S. »

FBraendle wrote:the only thing at the moment where i break my skull is how to parse/map the diskfilter info to the VMs...
What is the logic behind the diskfilter numbers?
Disk filter settings are stored for each VM individually and can be returned by GetVBRJobObject cmdlet. I will double check your other questions with our PowerShell guru and will let you know.
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi Vitaly

Thnx for the answer.
Hmm i thought i checked this cmdlet....
Might have used it in a wrong way.
Ill give it a try again, lets see....

If I encounter anything positive/negative, i'll let you know :)

Kind Regards
Felix
FBraendle
Enthusiast
Posts: 39
Liked: 1 time
Joined: Jul 05, 2010 3:36 pm
Full Name: Felix Brändle
Contact:

Re: Querying the Veeam EDB for a periodic Jobinfo import to

Post by FBraendle »

Hi Guys

Just a quick update:
i really tried with the cmdlets but could not tickle out the functionality i needed...

We'll keep the SQL script to get the info and im looking forward to new reporting functionality in future versions ;)

Thanks for being so patient with me! ;)

Kind Regards
Felix
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 167 guests