Add README file and improve usage message
Benjamin Renard

Benjamin Renard commited on 2014-12-08 13:03:37
Showing 2 changed files, with 46 additions and 0 deletions.

... ...
@@ -0,0 +1,43 @@
1
+Nagios plugin to check lock file state
2
+======================================
3
+
4
+This plugin check lock file statue.
5
+
6
+Usage
7
+-----
8
+
9
+  Usage : ./check_lock_file -l /path/to/lock.file [-o uid] [-w W] [-c C] [-d] [-h]
10
+  
11
+  Check lock file status
12
+  
13
+  Parameters :
14
+    -l /path/to/lock.file   Path to lock file
15
+    -o uid                  Valid lock file owner (optional)
16
+    -w W                    Exit with WARNING status if lock file
17
+                            has been created for more than W hours
18
+    -c C                    Exit with CRITICAL status if lock file
19
+                            has been created for more than C hours
20
+    -d                      Enable debug mode
21
+    -h                      Show this message
22
+
23
+Copyright
24
+---------
25
+
26
+Copyright (c) 2014 Benjamin Renard 
27
+
28
+License
29
+-------
30
+
31
+This program is free software; you can redistribute it and/or
32
+modify it under the terms of the GNU General Public License version 2
33
+as published by the Free Software Foundation.
34
+
35
+This program is distributed in the hope that it will be useful,
36
+but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
+GNU General Public License for more details.
39
+
40
+You should have received a copy of the GNU General Public License
41
+along with this program; if not, write to the Free Software
42
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
43
+
... ...
@@ -11,8 +11,11 @@ CRIT=24
11 11
 DEBUG=0
12 12
 
13 13
 function usage() {
14
+	echo "Usage : $0 -l /path/to/lock.file [-o uid] [-w W] [-c C] [-d] [-h]"
15
+	echo
14 16
 	echo "Check lock file status"
15 17
 	echo
18
+	echo "Parameters :"
16 19
 	echo "  -l /path/to/lock.file   Path to lock file"
17 20
 	echo "  -o uid                  Valid lock file owner (optional)"
18 21
 	echo "  -w W                    Exit with WARNING status if lock file"
19 22