diff options
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-04-03 02:56:42 +0000 |
---|---|---|
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2002-04-03 02:56:42 +0000 |
commit | 880e2599d2eb847db20c3cd4bcf336e6fd536828 (patch) | |
tree | df3885bb874ba3a288d9419174f5a650259c16eb /plugins-scripts | |
parent | 91753bfdd4a0feab4970cf6eaac8085959140232 (diff) | |
download | monitoring-plugins-880e2599d2eb847db20c3cd4bcf336e6fd536828.tar.gz |
check_nfs functionality exists in check_rpc
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@9 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-x | plugins-scripts/check_nfs.pl | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/plugins-scripts/check_nfs.pl b/plugins-scripts/check_nfs.pl deleted file mode 100755 index 040466d3..00000000 --- a/plugins-scripts/check_nfs.pl +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | # | ||
3 | # check_nfs plugin for nagios | ||
4 | # | ||
5 | # usage: | ||
6 | # check_nfs.pl server | ||
7 | # | ||
8 | # Check if a nfs server is registered and running | ||
9 | # using rpcinfo -T udp <arg1> 100003. | ||
10 | # 100003 is the rpc programmnumber for nfs. | ||
11 | # <arg1> is the server queried. | ||
12 | # | ||
13 | # | ||
14 | # Use these hosts.cfg entries as examples | ||
15 | # | ||
16 | #service[fs0]=NFS;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_nfs | ||
17 | #command[check_nfs]=/some/path/libexec/check_nfs.pl $HOSTADDRESS$ | ||
18 | # | ||
19 | # initial version: 9-13-99 Ernst-Dieter Martin edmt@infineon.com | ||
20 | # current status: looks like working | ||
21 | # | ||
22 | # | ||
23 | # Copyright Notice: Do as you please, credit me, but don't blame me | ||
24 | # | ||
25 | |||
26 | |||
27 | $server = shift; | ||
28 | |||
29 | |||
30 | open CMD,"/bin/rpcinfo -T udp $server 100003 |"; | ||
31 | |||
32 | $response = "nfs version "; | ||
33 | |||
34 | while ( <CMD> ) { | ||
35 | if ( /program 100003 version ([0-9]*) ready and waiting/ ) { | ||
36 | $response = $ response . "$1,"; | ||
37 | } | ||
38 | } | ||
39 | |||
40 | if ( $response eq "nfs version " ) { | ||
41 | print "rpcinfo: RPC: Program not registered\n"; | ||
42 | exit 2; | ||
43 | } | ||
44 | |||
45 | $response =~ s/,$//; | ||
46 | print "$response\n"; | ||
47 | |||
48 | exit 0; | ||