From 4e318b9277ba5209fab447da5afa3c0a22a681d9 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Sun, 14 Mar 2004 04:09:19 +0000 Subject: use fperfdata git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@849 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_ldap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/check_ldap.c') diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index b21351b7..207b98ed 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -51,8 +51,8 @@ int ld_port = DEFAULT_PORT; #ifdef HAVE_LDAP_SET_OPTION int ld_protocol = DEFAULT_PROTOCOL; #endif -int warn_time = UNDEFINED; -int crit_time = UNDEFINED; +double warn_time = UNDEFINED; +double crit_time = UNDEFINED; struct timeval tv; int @@ -135,9 +135,9 @@ main (int argc, char *argv[]) printf (_("LDAP %s - %.3f seconds response time|%s\n"), state_text (status), elapsed_time, - perfdata ("time", microsec, "us", - warn_time, warn_time, - crit_time, crit_time, + fperfdata ("time", elapsed_time, "s", + (int)warn_time, warn_time, + (int)crit_time, crit_time, TRUE, 0, FALSE, 0)); return status; @@ -218,10 +218,10 @@ process_arguments (int argc, char **argv) ld_passwd = optarg; break; case 'w': - warn_time = atoi (optarg); + warn_time = strtod (optarg, NULL); break; case 'c': - crit_time = atoi (optarg); + crit_time = strtod (optarg, NULL); break; #ifdef HAVE_LDAP_SET_OPTION case '2': -- cgit v1.2.3-74-g34f1