Page 3 of 4

Re: showmount: Program not registered

Posted: Fri Oct 05, 2018 2:45 pm
by scottwilkerson
shamrozkadiwal wrote:I put sudo in front of $USER1$/check_nfs.pl -H $HOSTADDRESS$ and restart the nagios. nothing happened :(
I really think you need the following line in your sudoers file

Code: Select all

nagios ALL = NOPASSWD:/usr/local/nagios/libexec/check_nfs.pl
Also, are you sure this is the command this service is using?

Re: showmount: Program not registered

Posted: Fri Oct 05, 2018 3:06 pm
by shamrozkadiwal
no luck again and still seeing unknown error.
I checked service command "check_nfs" and it is pointing to check_nfs.pl

Re: showmount: Program not registered

Posted: Fri Oct 05, 2018 3:20 pm
by scottwilkerson
Can you share this plugin? check_nfs.pl

Re: showmount: Program not registered

Posted: Fri Oct 05, 2018 3:56 pm
by shamrozkadiwal
I have attached the script.
FYI ++ this script is working fine with other servers. I have a few servers where I am getting this NFS alert

Re: showmount: Program not registered

Posted: Fri Oct 05, 2018 4:15 pm
by scottwilkerson
what do you get when you run this from the command line on the nagios server where X.X.X.X is the remote server

Code: Select all

sudo /usr/sbin/showmount -e X.X.X.X
On the remote server (X.X.X.X) what is the output of the following?

Code: Select all

sudo /sbin/service nfs status
Is there a firewall on the remote machine that could be blocking the connection?

Re: showmount: Program not registered

Posted: Tue Oct 09, 2018 11:23 am
by shamrozkadiwal
@Scottwilkerson, I need to get in touch with network team to find about the firewall.

Code: Select all

shkadi@camel ~ $ sudo /usr/sbin/showmount -e X.X.X.X
showmount: RPC: Program not registered

Code: Select all

[shkadi@awhu013a ~]$ sudo /sbin/service nfs status
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 ~]$

Re: showmount: Program not registered

Posted: Tue Oct 09, 2018 11:58 am
by scottwilkerson
shamrozkadiwal wrote:@Scottwilkerson, I need to get in touch with network team to find about the firewall.

Code: Select all

shkadi@camel ~ $ sudo /usr/sbin/showmount -e X.X.X.X
showmount: RPC: Program not registered
I have a feeling this is your problem, the command above is what the plugin calls underneath the hood.

Re: showmount: Program not registered

Posted: Wed Oct 10, 2018 10:57 am
by shamrozkadiwal
You mean plugin "check_nfs.pl" has a issue, correct?

Re: showmount: Program not registered

Posted: Wed Oct 10, 2018 12:01 pm
by scottwilkerson
shamrozkadiwal wrote:You mean plugin "check_nfs.pl" has a issue, correct?
No, I mean check_nfs.pl calls /usr/sbin/showmount -e X.X.X.X and you cannot connect across the network.

Re: showmount: Program not registered

Posted: Thu Oct 11, 2018 10:18 am
by shamrozkadiwal
I think awhu013a is not allowing to communicate nagios server

Code: Select all

[shkadi@awhu013a ~]$ ping 10.180.190.50
PING 10.180.190.50 (10.180.190.50) 56(84) bytes of data.
64 bytes from 10.180.190.50: icmp_seq=1 ttl=64 time=0.516 ms
64 bytes from 10.180.190.50: icmp_seq=2 ttl=64 time=0.688 ms
64 bytes from 10.180.190.50: icmp_seq=3 ttl=64 time=0.517 ms
64 bytes from 10.180.190.50: icmp_seq=4 ttl=64 time=1.13 ms

--- 10.180.190.50 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.516/0.715/1.139/0.254 ms

Code: Select all

[shkadi@awhu013a ~]$ telnet 10.180.190.50 5666
Trying 10.180.190.50...
telnet: connect to address 10.180.190.50: Connection timed out

Code: Select all

[shkadi@awhu013a ~]$ traceroute 10.180.190.50
traceroute to 10.180.190.50 (10.180.190.50), 30 hops max, 40 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
[shkadi@awhu013a ~]$