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.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Oct 05, 2018 2:45 pm
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?
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Fri Oct 05, 2018 3:06 pm
no luck again and still seeing unknown error.
I checked service command "check_nfs" and it is pointing to check_nfs.pl
Attachments
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Oct 05, 2018 3:20 pm
Can you share this plugin? check_nfs.pl
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Fri Oct 05, 2018 3:56 pm
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
Attachments
check_nfs.pl
(2.86 KiB) Downloaded 257 times
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Oct 05, 2018 4:15 pm
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?
Is there a firewall on the remote machine that could be blocking the connection?
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Tue Oct 09, 2018 11:23 am
@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 ~]$
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Oct 09, 2018 11:58 am
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.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Wed Oct 10, 2018 12:01 pm
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.
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Thu Oct 11, 2018 10:18 am
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 ~]$