From 141b90f2af8c2726e5d907a583d46c978152a7a6 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Fri, 12 Sep 2014 14:16:37 +0200 Subject: [PATCH] Fix postgres mode 'backend' threshold --- database/postgres/mode/backends.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/postgres/mode/backends.pm b/database/postgres/mode/backends.pm index abcfe071f..fb2ece598 100644 --- a/database/postgres/mode/backends.pm +++ b/database/postgres/mode/backends.pm @@ -126,8 +126,8 @@ ORDER BY d.datname"; $self->{output}->perfdata_add(label => 'connections_' . $database_name, value => $used, - warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), - critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), + warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $max_connections, cast_int => 1), + critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $max_connections, cast_int => 1), min => 0, max => $max_connections); } if ($database_check == 0) {