aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ldap.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2004-03-14 04:09:19 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2004-03-14 04:09:19 +0000
commit4e318b9277ba5209fab447da5afa3c0a22a681d9 (patch)
tree65e99d3a8181584d75726390c5968270c21afa63 /plugins/check_ldap.c
parentb86b521b38a993b49e03f827859aea672fdfa806 (diff)
downloadmonitoring-plugins-4e318b9277ba5209fab447da5afa3c0a22a681d9.tar.gz
use fperfdata
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@849 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r--plugins/check_ldap.c14
1 files changed, 7 insertions, 7 deletions
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':