SQL Queries for custom monitoring

Availability for the Always-On Enterprise

SQL Queries for custom monitoring

Veeam Logoby Khilendel » Wed Mar 01, 2017 5:32 pm

Hi all!

I'm looking to set up some custom monitoring via an external application, which will query certain fields in VEEAM's database to generate event data/performance metrics. I was hoping to find someone here who's familiar with VEEAM's SQL DB structure and can help me out...

Specifically I'm after:
Failed jobs (last 1 or 24hr)
Whether or not any repositories are detacted

Any assistance would be appreciated!
Khilendel
Novice
 
Posts: 4
Liked: never
Joined: Wed Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh

Re: SQL Queries for custom monitoring

Veeam Logoby tdewin » Wed Mar 01, 2017 8:19 pm

Maybe you want to look into powershell as that might be more stable and supported way of quering info. Especially take a look at:
get-vbrjob : https://helpcenter.veeam.com/docs/backu ... tml?ver=95
get-vbrbackuprepository : https://helpcenter.veeam.com/docs/backu ... tml?ver=95
tdewin
Veeam Software
 
Posts: 1001
Liked: 345 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Re: SQL Queries for custom monitoring

Veeam Logoby Khilendel » Wed Mar 01, 2017 11:38 pm

This definitely looks like a way to pull the information I need.

My concern is: Wouldn't powershell cmdlets be more overhead than just a direct SQL query to the small handful of fields I need? I imagine SQL is being queried regardless by these cmdlets, but with the additional overhead of doing so in a powershell host, which is doubly inconvenient, as the monitoring server is a linux box, and I'd have to run these commands on a loop on the B/R server and scrape logs rather than running the queries directly from the monitoring server.

Are these OK (load wise/reliability/etc) to use with a poller, running as frequently at between 90 and 300 second intervals (depending what level of precision we decide we want)?
Khilendel
Novice
 
Posts: 4
Liked: never
Joined: Wed Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh

Re: SQL Queries for custom monitoring

Veeam Logoby v.Eremin » Thu Mar 02, 2017 10:11 am

You can stick to any of these variants. If you feel comfortable with working with SQL db directly, feel free to leverage this approach (it should work faster than PowerShell one). Thanks.
v.Eremin
Veeam Software
 
Posts: 12703
Liked: 920 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: SQL Queries for custom monitoring

Veeam Logoby Khilendel » Thu Mar 02, 2017 5:36 pm

Thank you for the reply.

I did attempt to play with the powershell cmdlets remotely last night and have been unable to connect to my B/R server as of yet.

Does this require typical WinRM or firewall exceptions? Or does Connect-VBRServer use different ports/etc to connect to remote hosts?

Also - any help on identifying the information I need directly from the DB? Anyone that can point me to the right tables, some documentation or an example of someone else who's working directly with the DB?
Khilendel
Novice
 
Posts: 4
Liked: never
Joined: Wed Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh

Re: SQL Queries for custom monitoring

Veeam Logoby Khilendel » Thu Mar 02, 2017 8:46 pm

Update: I opened TCP/9392 and no longer get an error trying to connect with Connect-VBRServer but I am instead getting a perpetual hang when trying this against the main B/R server (nothing is ever returned and I have to forcibly exit the cmdlet) or if I try it against the SQL server I get "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP/Port redacted>".

Any direction on this?
Khilendel
Novice
 
Posts: 4
Liked: never
Joined: Wed Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Google [Bot] and 21 guests