ansible-roles/nagios-nrpe/files/plugins/check_nfsserver
Mathieu Trossevin d3eef71127
Some checks failed
continuous-integration/drone/pr Build is failing
nagios-nrpe: Fix check_nfsserver for buster and bullseye
From buster onward the nfs server doesn't run NFSv4 over UDP (it is out
of spec, see RFC 7530). As such the check broke as it attempt to check
the availability of NFSv4 over UDP.

Right now the check doesn't check for NFSv2 over UDP as it would need to
check if it exist first, as on bullseye it isn't supported by default
anymore.
2021-11-24 11:11:39 +01:00

15 lines
212 B
Bash
Executable file

#!/bin/sh
# Check if nfs server is running using rpcinfo
rpcinfo -T udp localhost nfs 3
if [ $? -ne 0 ]; then
exit 2
fi
rpcinfo -T tcp localhost nfs
if [ $? -ne 0 ]; then
exit 2
fi
# vim: set ft=shell