showmount
service nfs status
showmount: Program not registered
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: showmount: Program not registered
@shamrozkadiwal , Please run the following commands on the awhu013a server and show us the output:
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: showmount: Program not registered
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 ~]$
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: showmount: Program not registered
@shamrozkadiwal, Here's what I've found.
Please run these two chmod commands and let me know if it fixes the issue.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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: showmount: Program not registered
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 $
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 $
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: showmount: Program not registered
@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.
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: showmount: Program not registered
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: showmount: Program not registered
I noticed when you have run several of the commands throughout the post you use sudo
Have you added a sudoers entry for the plugin that you are actually using so the nagios user has sudo access?
Code: Select all
sudo /usr/lib/nagios/plugins/check_rpc -H X.X.X.X -C nfs -c2,3
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: showmount: Program not registered
@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/*
nagios localhost=/usr/nagios/libexec/check_smb.sh
nagios ALL = NOPASSWD:/usr/local/nagios/libexec/*
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: showmount: Program not registered
Earlier you also shared this
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 $USER1$/check_nfs.pl -H $HOSTADDRESS$
}
Change to this and restart nagios
Code: Select all
define command{
command_name check_nfs
command_line sudo $USER1$/check_nfs.pl -H $HOSTADDRESS$
}
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: showmount: Program not registered
I put sudo in front of $USER1$/check_nfs.pl -H $HOSTADDRESS$ and restart the nagios. nothing happened