Page 1 of 1

Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 1:39 pm
by paulol
Hi guys ,

This my situation:

I have the following plugin check_smb_file.pl that i downloaded from nagios exchange to check if the file exist in windows file server.

But when i execute on nagios xi i get this error " CRITICAL: No such file or directory (smb://X.X.X.X/nagios$/Compartilhamento.txt$) "
And when i execute on linux terminal i get this error " OK: File/Directory found. (nagios$/Compartilhamento.txt)|'lastModified'=3.16;;;; "

Nagios xi puts " $ " ( i dont know why ) in the final of the line and he does not found the file.

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 3:18 pm
by lmiltchev
Have you tried wrapping the $ARG2$ value in single quotes?

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 3:43 pm
by paulol
yeap! same error...

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 4:20 pm
by tgriep
Are you clicking the button "Test Check Command"?
Don't do that, it has problems escaping characters.

Save the check settings, go back to Home, services and schedule an immediate check and see if that works.

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 4:31 pm
by paulol
No, Im not.

Follows the image.

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 5:09 pm
by tgriep
Try changing $ARG2$ to

Code: Select all

'nagios\\$$\\Compartilhamento.txt'

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 5:23 pm
by paulol
tgriep,

now it works! the tip of double $$ was good.

'nagios$\Compartilhamento.txt'

Change to:

'nagios$$\Compartilhamento.txt'

thks.

Re: Plugin SMB Error on Nagios XI

Posted: Mon Feb 23, 2015 5:26 pm
by tgriep
Glad it worked for you.