diff options
author | Sebastian Harl <sh@teamix.net> | 2011-04-06 16:59:19 +0200 |
---|---|---|
committer | Sebastian Harl <sh@teamix.net> | 2012-07-05 11:36:57 +0200 |
commit | 58ef38e2bb9503f4fbcca5fb8b17ccaf47f9ed67 (patch) | |
tree | aec7e6834fbae58a05ba5ef8258a623c9ed5b393 /plugins/check_pgsql.c | |
parent | 912df3ef9b188c82893dace1e9b56c42a558fdba (diff) | |
download | monitoring-plugins-58ef38e2bb9503f4fbcca5fb8b17ccaf47f9ed67.tar.gz |
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.
Diffstat (limited to 'plugins/check_pgsql.c')
-rw-r--r-- | 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 edad116a..2acddc4f 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; } |