diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 0563322858a5a7d77e421f4a3c9a1efe0b5cd01c..abe721bf696a5802d60e4922c7e7fd6896733f4c 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
* License: GPL
* Copyright (c) 1999-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains the check_pgsql plugin
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_pgsql";
-const char *revision = "$Revision$";
const char *copyright = "1999-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
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"));
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));
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 't': /* timeout period */
if (!is_integer (optarg))
/**
-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
@@-
/******************************************************************************
@@-
-</sect2>
+</sect2>
</sect1>
</article>
-@@
asprintf (&myport, "%d", DEFAULT_PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf (COPYRIGHT, copyright, email);
print_usage ();
printf (_(UT_HELP_VRSN));
+ printf (_(UT_EXTRA_OPTS));
printf (_(UT_HOST_PORT), 'P', myport);
printf (" %s\n", _("specified database, and then disconnects. If no database is specified, it"));
printf (" %s\n", _("connects to the template1 database, which is present in every functioning"));
printf (" %s\n\n", _("PostgreSQL DBMS."));
+
printf (" %s\n", _("The plugin will connect to a local postmaster if no host is specified. To"));
printf (" %s\n", _("connect to a remote host, be sure that the remote postmaster accepts TCP/IP"));
printf (" %s\n\n", _("connections (start the postmaster with the -i option)."));
+
printf (" %s\n", _("Typically, the nagios user (unless the --logname option is used) should be"));
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));
}