Plugin for Veeam Backup Help needed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Plugin for Veeam Backup Help needed

Post by kwhogster »

Hello

Nagios Core 4.1

I found this plugin
https://exchange.nagios.org/directory/P ... ck/details

My nsclient.ini entry

; check veeam backups
checkveeambu = cmd /c echo scripts/powershell/check_veeam.ps1 $ARG1$; exit $LastExitCode | powershell.exe -command -

from powershell
PS C:\program files\nsclient++\scripts\powershell> ./check_veeam.ps1 "Win 10 VM Backup" 5
OK! Backup process of job 'Win 10 VM Backup' completed successfully.

from Nagios
root@SERV017://usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu "Win 10 VM Backup"
UNKNOWN! No such a job: '$'.

Any ideas?
kyang

Re: Plugin for Veeam Backup Help needed

Post by kyang »

Did you follow this kb article? You could double check how you added the script into the nsclient.ini?
https://support.nagios.com/kb/article.php?id=528

I'm not exactly sure, but when running it with NRPE, could you try putting "Win 10 VM Backup" with -a.

Code: Select all

./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a "Win 10 VM Backup"
Let us know. Thanks!
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Plugin for Veeam Backup Help needed

Post by kwhogster »

Hello

The -a helped a little

root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a "Win_10_VM_Backup"
UNKNOWN! No such a job: 'Win_10_VM_Backup'.
root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a "Win 10 VM Backup"
UNKNOWN! No such a job: 'Win'.


Again when I run the script directly on the veeam server it works it is a problem with the command

I have other powershell scripts that work fine on many other devises including this server.

Thoughts?
kyang

Re: Plugin for Veeam Backup Help needed

Post by kyang »

Anything noticeable when you don't pass the -a "Win 10 VM Backup

Or is it just the normal not enough "ARGS"
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Plugin for Veeam Backup Help needed

Post by kwhogster »

from the nsclient.ini added another ARG

; check veeam backups
checkveeambu = cmd /c echo scripts/powershell/check_veeam.ps1 $ARG1$ $ARG2$; exit $LastExitCode | powershell.exe -command -

without the -a

root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu 'Win 10 VM Backup' 1
UNKNOWN! No such a job: '$'.
with the -a
root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a 'Win 10 VM Backup' 1
UNKNOWN! No such a job: 'Win'.

Then I added underscores to the name

root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a 'Win_10_VM_Backup' 1
UNKNOWN! No such a job: 'Win_10_VM_Backup'.

Again when I run the powershell script on the server it works

It is a syntax issue with the command not sure what it wrong
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Plugin for Veeam Backup Help needed

Post by dwhitfield »

What other plugins have you tried? This one uses vbs instead of powershell, so if there is some sort of powershell version difference this will work around that: https://exchange.nagios.org/directory/P ... bs/details

Can you upload your entire nsclient.ini? What version of nsclient are you using?
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Plugin for Veeam Backup Help needed

Post by kwhogster »

NSclient version is 4.4.23

I downloaded several of the plugins for Veeam Checks all work when running from the veeam Windows 2012 R2 server but not from Nagios command line.

I tested the one you just poste and got these results

root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeam2
C:\Program Files\NSClient++\scripts\check_veeam.vbs(18, 1) Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied

You will see I have several different entries in my ini for check Veeam

I use a SQL server for the VEEAM database I do not use the veeam internal database.

Thoughts
Attachments
nsclient.txt
My NSCLIENT file
(22.75 KiB) Downloaded 487 times
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Plugin for Veeam Backup Help needed

Post by kwhogster »

Thanks for all the help I figured it our yes it was a syntax issue with the command lines

First in the nsclient.ini had to place " " around the $ARG

; check veeam backups
checkveeambu = cmd /c echo scripts/powershell/check_veeam.ps1 "$ARG1$" "$ARG2$"; exit $LastExitCode | powershell.exe -command -

The command line then needs single quotes

root@serv017:/usr/lib/nagios/plugins# ./check_nrpe -u -H SERV008 -t 120 -c checkveeambu -a 'Win 81 VM Backup' 5
OK! Backup process of job 'Win 81 VM Backup' completed successfully.

This is the plugin I got working
https://exchange.nagios.org/directory/P ... ck/details



Success

Please lock this as resolved.
Locked