Explorar el Código

Added examples

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@514 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon hace 23 años
padre
commit
3a69b001b4
Se han modificado 1 ficheros con 8 adiciones y 2 borrados
  1. 8 2
      plugins/negate.c

+ 8 - 2
plugins/negate.c

@@ -38,6 +38,12 @@ const char *progname = "negate";
     Terminate test if timeout limit is exceeded (default: %d)\n\
      [keep this less than the plugin timeout to retain CRITICAL status]\n"
 
+#define EXAMPLES "\
+  negate \"/usr/local/nagios/libexec/check_ping -H host\"\n\
+    Run check_ping and invert result. Must use full path to plugin\n\
+  negate \"/usr/local/nagios/libexec/check_procs -a 'vi negate.c'\"\n\
+    Use single quotes if you need to retain spaces\n"
+
 #define DESCRIPTION "\
 This plugin is a wrapper to take the output of another plugin and invert it.\n\
 If the wrapped plugin returns STATE_OK, the wrapper will return STATE_CRITICAL.\n\
@@ -180,8 +186,8 @@ print_help (void)
 		 COPYRIGHT, AUTHOR, EMAIL, SUMMARY);
 	print_usage ();
 	printf
-		("\nOptions:\n" LONGOPTIONS "\n" DESCRIPTION "\n", 
-		 DEFAULT_TIMEOUT);
+		("\nOptions:\n" LONGOPTIONS "\n" "Examples:\n" EXAMPLES "\n"
+		 DESCRIPTION "\n", DEFAULT_TIMEOUT);
 	support ();
 }