Plugin SMB Error on Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Plugin SMB Error on Nagios XI

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Plugin SMB Error on Nagios XI

Post by lmiltchev »

Have you tried wrapping the $ARG2$ value in single quotes?
Be sure to check out our Knowledgebase for helpful articles and solutions!
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Plugin SMB Error on Nagios XI

Post by paulol »

yeap! same error...
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Plugin SMB Error on Nagios XI

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Plugin SMB Error on Nagios XI

Post by paulol »

No, Im not.

Follows the image.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Plugin SMB Error on Nagios XI

Post by tgriep »

Try changing $ARG2$ to

Code: Select all

'nagios\\$$\\Compartilhamento.txt'
Be sure to check out our Knowledgebase for helpful articles and solutions!
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Plugin SMB Error on Nagios XI

Post by paulol »

tgriep,

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

'nagios$\Compartilhamento.txt'

Change to:

'nagios$$\Compartilhamento.txt'

thks.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Plugin SMB Error on Nagios XI

Post by tgriep »

Glad it worked for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked