Comprehensive data protection for all workloads
Post Reply
Khilendel
Novice
Posts: 4
Liked: never
Joined: Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh
Contact:

SQL Queries for custom monitoring

Post by Khilendel »

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!
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: SQL Queries for custom monitoring

Post by tdewin »

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
Khilendel
Novice
Posts: 4
Liked: never
Joined: Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh
Contact:

Re: SQL Queries for custom monitoring

Post by Khilendel »

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)?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SQL Queries for custom monitoring

Post by veremin »

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.
Khilendel
Novice
Posts: 4
Liked: never
Joined: Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh
Contact:

Re: SQL Queries for custom monitoring

Post by Khilendel »

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: Mar 01, 2017 5:28 pm
Full Name: Matthew Garretson-Pugh
Contact:

Re: SQL Queries for custom monitoring

Post by Khilendel »

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?
Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot], K-SOLdier, kyle.shuberg, robert.vonmehren, ybarrap2003 and 206 guests