Page 1 of 1

check_smb_share not showing up pull down

Posted: Mon Mar 10, 2014 11:30 am
by nottheadmin
Hi, Some info before we begin :)

Linux localhost.localdomain 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Nagios XI 2012R2.8c

I have downloaded this

http://exchange.nagios.org/directory/Pl ... re/details

I have copied check_smb_share to /usr/local/nagios/libexec and made it executable.

It runs from the command line with an error but still completes ok

Code: Select all

[root@localhost libexec]# ./check_smb_share -H <ipaddress> -s <sharename> -u <user> -p <pass>
./check_smb_share: line 8: /usr/bin/basename: No such file or directory
OK SMB Sharename:       <sharename>             Disk
It is not available from the pull down menu in CCM > Services > Add new > Service Management.

That is the only way I know how to go about setting this up as a regular check.

How to I make it appear in the pull down menu or is there another way to do this?

The second question I have is why is it complaining about line 8, /usr/bin/basename.

smbclient is in /usr/bin.

Thanks for your help
M

Re: check_smb_share not showing up pull down

Posted: Mon Mar 10, 2014 11:42 am
by tmcdonald
You mean for creating a service that will use this as the check command? You will need to make a command that utilizes the check first. Go to Commands on the left, then create a new one. You should see all of your installed plugins in the dropdown list, just pick check_smb_share and set up the argument list. You might want to take a look at the existing commands so get an idea of the format you will need.

Re: check_smb_share not showing up pull down

Posted: Mon Mar 10, 2014 11:48 am
by nottheadmin
Yes, i want to create a service that uses check_smb_share.

I looked and searched in commands, it's not there?

Re: check_smb_share not showing up pull down

Posted: Mon Mar 10, 2014 11:50 am
by nottheadmin
oh ok, i think i found it in the "available plugins" pull down

Re: check_smb_share not showing up pull down

Posted: Mon Mar 10, 2014 2:45 pm
by sreinhardt
It is complaining about basename, because you are missing a binary called basename. You should try running "yum provides */basename" to find what package you need to install. Also the available plugins dropdown purely is for help documentation for that command.

You need to start by creating a command definition for that plugin, so that the services can reference it in the check command box. Then you can setup your service definition that actually gets applied to the host and checked.

Re: check_smb_share not showing up pull down

Posted: Tue Apr 15, 2014 4:30 am
by nottheadmin
This is fixed now, you can close it if you want.