showmount: Program not registered

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: showmount: Program not registered

Postby npolovenko » Tue Oct 02, 2018 3:39 pm

@shamrozkadiwal , Please run the following commands on the awhu013a server and show us the output:
showmount
service nfs status
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2084
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Postby shamrozkadiwal » Thu Oct 04, 2018 11:04 am

output
Code: Select all
[shkadi@awhu013a ~]$ sudo /sbin/service nfs status
[sudo] password for shkadi:
rpc.mountd (pid 6350) is running...
nfsd (pid 6347 6346 6345 6344 6343 6342 6341 6340) is running...
rpc.rquotad (pid 6334) is running...
[shkadi@awhu013a ~]$
[shkadi@awhu013a ~]$ sudo /usr/sbin/showmount
Hosts on awhu013a:
10.X.X.X
10.X.X.X
[shkadi@awhu013a ~]$
shamrozkadiwal
 
Posts: 34
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Postby npolovenko » Thu Oct 04, 2018 1:03 pm

@shamrozkadiwal, Here's what I've found.
Depending on your NFS server, you might need to install these two plugins
suid root (chown root check_nfs*; chmod 4750 check_nfs*). This is because
NFS servers often disallow mount requests from non-privileged ports, and
the plugins need root rights to bind to a privileged port when mounting.

Please run these two chmod commands and let me know if it fixes the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2084
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Postby shamrozkadiwal » Thu Oct 04, 2018 2:22 pm

So, you want me to change the ownership of check_nfs.pl on the nagios server NOT on the client side, correct?

Right now on Nagios server
shkadi@camel /usr/lib/nagios/plugins $ pwd
/usr/lib/nagios/plugins
shkadi@camel /usr/lib/nagios/plugins $
shkadi@camel /usr/lib/nagios/plugins $ ls -al check_nfs.pl
-rwxr-xr-x 1 nagios nagios 2926 Mar 30 2010 check_nfs.pl
shkadi@camel /usr/lib/nagios/plugins $
shamrozkadiwal
 
Posts: 34
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Postby npolovenko » Thu Oct 04, 2018 3:52 pm

@shamrozkadiwal, If I understood correctly this plugin is not installed on the client side, only on the server side. Please run the following commands on the nagios server:
chmod 777 /usr/lib/nagios/plugins/check_nfs.pl
chmod u+s /usr/lib/nagios/plugins/check_nfs.pl
chown apache.nagios /usr/lib/nagios/plugins/check_nfs.pl
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2084
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Postby shamrozkadiwal » Fri Oct 05, 2018 8:47 am

Old
shkadi@camel /usr/lib/nagios/plugins $ ls -la check_nfs.pl
-rwxr-xr-x 1 nagios nagios 2926 Mar 30 2010 check_nfs.pl

New
shkadi@camel /usr/lib/nagios/plugins $ ls -la check_nfs.pl
-rwsrwxrwx 1 apache nagios 2926 Mar 30 2010 check_nfs.pl

Still seeing the issue
Attachments
awhu013a-1.jpg
shamrozkadiwal
 
Posts: 34
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Postby scottwilkerson » Fri Oct 05, 2018 10:11 am

I noticed when you have run several of the commands throughout the post you use sudo
Code: Select all
sudo /usr/lib/nagios/plugins/check_rpc -H X.X.X.X -C nfs -c2,3


Have you added a sudoers entry for the plugin that you are actually using so the nagios user has sudo access?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: showmount: Program not registered

Postby shamrozkadiwal » Fri Oct 05, 2018 10:30 am

@Scottwilkerson, yes, I have added those two entries in the sudoers for nagios

nagios localhost=/usr/nagios/libexec/check_smb.sh
nagios ALL = NOPASSWD:/usr/local/nagios/libexec/*
shamrozkadiwal
 
Posts: 34
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Postby scottwilkerson » Fri Oct 05, 2018 10:46 am

Earlier you also shared this
Code: Select all
define command{
        command_name check_nfs
        command_line $USER1$/check_nfs.pl -H $HOSTADDRESS$
}


But you are not putting sudo in front of the command

Change to this and restart nagios

Code: Select all
define command{
        command_name check_nfs
        command_line sudo $USER1$/check_nfs.pl -H $HOSTADDRESS$
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: showmount: Program not registered

Postby shamrozkadiwal » Fri Oct 05, 2018 2:20 pm

I put sudo in front of $USER1$/check_nfs.pl -H $HOSTADDRESS$ and restart the nagios. nothing happened :(
shamrozkadiwal
 
Posts: 34
Joined: Thu Jan 25, 2018 1:13 am

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 15 guests