romainsi / zabbix-VB-R-SQL

Monitore VB&R with SQL query
33 stars 15 forks source link

Problem with job-types #27

Open ahumain opened 1 year ago

ahumain commented 1 year ago

Hi

Script version: 2.8 Veeam version: 11.0.1.1261 Zabbix version: 6.0 TLS

When I created an account at my VEEAM server database but when I query with zabbixveeam account or admin account the following output is empty.

 SELECT job_id,job_type,job_name FROM [VeeamBackup].[dbo].[Backup.Model.JobSessions] 
        INNER JOIN [VeeamBackup].[dbo].[Backup.Model.BackupJobSessions] 
        ON [VeeamBackup].[dbo].[Backup.Model.JobSessions].[id] = [VeeamBackup].[dbo].[Backup.Model.BackupJobSessions].[id]
        WHERE job_type IN (0, 1, 2, 28, 51, 63, 12002, 12003) 
        ORDER BY creation_time DESC, job_type, job_name

But when I remove the WHERE job_type IN (0, 1, 2, 28, 51, 63, 12002, 12003) I have the list of jobs.

CF screenshot attached.

image

image

Is it possible to monitor jobs out of the list above?

Thank you in advance for your help.

Mathias

aholiveira commented 1 year ago

Hello, The supported job types by the current version are the ones defined in the script, variable $typeNames on line 88. If you know what job types those are you can add new entries to that variable on the script using <job_type> = "<description>";. However, please note that some of those job types might not return all the information the other ones do, so you might not get what you're expecting on Zabbix. If everything works fine, then it would be great if you could share that, with the correspondence between job_type codes and their description, and it could even be added to the script on a future version. There's no documentation that I could find from Veeam that contained this information, so we're basically "reverse engineering" the database and figuring it out based on what we have on our infrastructure.

Regards, Antonio