Code

Bulk EOL cleanup
[nagiosplug.git] / plugins / check_pgsql.c
index c721b07c84e3d162707f5811fdaba1a081337c50..869ef673401574c582a105959b77e96bbf7fe49f 100644 (file)
@@ -150,6 +150,9 @@ main (int argc, char **argv)
        bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
 
+       /* Parse extra opts if any */
+       argv=np_extra_opts (&argc, argv, progname);
+
        if (process_arguments (argc, argv) == ERROR)
                usage4 (_("Could not parse arguments"));
 
@@ -183,7 +186,7 @@ main (int argc, char **argv)
                status = STATE_OK;
        }
        PQfinish (conn);
-       printf (_(" %s - database %s (%d sec.)|%s\n"), 
+       printf (_(" %s - database %s (%d sec.)|%s\n"),
                state_text(status), dbName, elapsed_time,
                fperfdata("time", elapsed_time, "s",
                         (int)twarn, twarn, (int)tcrit, tcrit, TRUE, 0, FALSE,0));
@@ -352,7 +355,7 @@ is_pg_dbname (char *dbname)
 
 /**
 
-the tango program should eventually create an entity here based on the 
+the tango program should eventually create an entity here based on the
 function prototype
 
 @@-
@@ -386,7 +389,7 @@ is_pg_logname (char *username)
 
 /******************************************************************************
 @@-
-</sect2> 
+</sect2>
 </sect1>
 </article>
 -@@
@@ -412,6 +415,7 @@ print_help (void)
        print_usage ();
 
        printf (_(UT_HELP_VRSN));
+       printf (_(UT_EXTRA_OPTS));
 
        printf (_(UT_HOST_PORT), 'P', myport);
 
@@ -447,6 +451,12 @@ print_help (void)
   printf (" %s\n", _("able to connect to the database without a password. The plugin can also send"));
   printf (" %s\n", _("a password, but no effort is made to obsure or encrypt the password."));
 
+#ifdef NP_EXTRA_OPTS
+  printf ("\n");
+  printf ("%s\n", _("Notes:"));
+  printf (_(UT_EXTRA_OPTS_NOTES));
+#endif
+
        printf (_(UT_SUPPORT));
 }