[nagiosplug] check_pgsql: Fixed query perfdata output for ...
"Nagios Plugin Development" <[email protected]> Sat, 17 Aug 2013 20:50:37 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: 58ef38e2bb9503f4fbcca5fb8b17ccaf47f9ed67 Author: Sebastian Harl <[email protected]> Date: Wed Apr 6 16:59:19 2011 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=58ef38e check_pgsql: Fixed query perfdata output for empty warn/crit ranges. Previously, "(null)" was printed (when using GNU's libc). This has been changed to print the empty string instead. --- plugins/check_pgsql.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index edad116..2acddc4 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -578,7 +578,9 @@ do_query (PGconn *conn, char *query) ? _("CRITICAL") : _("UNKNOWN")); printf (_("'%s' returned %f"), query, value); - printf ("|query=%f;%s;%s;0\n", value, query_warning, query_critical); + printf ("|query=%f;%s;%s;0\n", value, + query_warning ? query_warning : "", + query_critical ? query_critical : ""); return my_status; } ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk