check_smb_share not showing up pull down

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nottheadmin
Posts: 53
Joined: Thu Dec 19, 2013 9:51 am
Location: Amsterdam, NL

check_smb_share not showing up pull down

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_smb_share not showing up pull down

Post 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.
Former Nagios employee
nottheadmin
Posts: 53
Joined: Thu Dec 19, 2013 9:51 am
Location: Amsterdam, NL

Re: check_smb_share not showing up pull down

Post by nottheadmin »

Yes, i want to create a service that uses check_smb_share.

I looked and searched in commands, it's not there?
nottheadmin
Posts: 53
Joined: Thu Dec 19, 2013 9:51 am
Location: Amsterdam, NL

Re: check_smb_share not showing up pull down

Post by nottheadmin »

oh ok, i think i found it in the "available plugins" pull down
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_smb_share not showing up pull down

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
nottheadmin
Posts: 53
Joined: Thu Dec 19, 2013 9:51 am
Location: Amsterdam, NL

Re: check_smb_share not showing up pull down

Post by nottheadmin »

This is fixed now, you can close it if you want.
Locked