Hi,
We are currently using a VBS script to check if Veeam is working at our customer’s sites, but now they have moved to PostgreSQL this script doesn’t work anymore.
The script we use is this one:
'
' Nagios Plugn for reading BackupExec's error log
' It is intended to use with NSClient++
'
' To reset the alerts, accnolage the alerts in BackupExec
'
' Author: Nils Cronstedt
' Email: nils.cronstedttat]gmailmdot]com
' Created on: 2010-05-15
Dim rad,txt,dag,alert,status
Set cnn = CreateObject("ADODB.Connection")
Set Rs = CreateObject("ADODB.Recordset")
cnn.ConnectionString = "driver={SQL Server};server=VEEAM\VEEAMSQL2016;Trusted_Connection=Yes;database=VeeamBackup"
cnn.Open
rs.ActiveConnection = cnn
exitcode = 0
txt=""
allert()
rs.close
If txt > "" Then
txt = "Error in Backup or Replication Job " & txt & " | "
else
txt = "OK"
exitcode=0
End If
wscript.echo(txt)
wscript.quit exitcode
Function allert()
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
strsql = "SELECT name FROM dbo].LBjobs] where latest_result=1"
rs.Open strsql , cnn,3,3
Do While Not rs.EOF
rad = rs("name") & ", "
Set fso = CreateObject("Scripting.FileSystemObject")
txt = txt + rad
rs.MoveNext
Loop
exitcode = 2
Exit Function
End Function
Can anyone help with getting this to work again?
Regards,
Anthony