showmount: Program not registered

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Post by npolovenko »

@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.
shamrozkadiwal
Posts: 74
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Post by shamrozkadiwal »

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 ~]$
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Post by npolovenko »

@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.
shamrozkadiwal
Posts: 74
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Post by shamrozkadiwal »

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 $
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: showmount: Program not registered

Post by npolovenko »

@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.
shamrozkadiwal
Posts: 74
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Post by shamrozkadiwal »

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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: showmount: Program not registered

Post by scottwilkerson »

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?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shamrozkadiwal
Posts: 74
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Post by shamrozkadiwal »

@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/*
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: showmount: Program not registered

Post by scottwilkerson »

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$
}
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shamrozkadiwal
Posts: 74
Joined: Thu Jan 25, 2018 1:13 am

Re: showmount: Program not registered

Post by shamrozkadiwal »

I put sudo in front of $USER1$/check_nfs.pl -H $HOSTADDRESS$ and restart the nagios. nothing happened :(
Locked