summaryrefslogtreecommitdiffstats
path: root/plugins/check_ldap.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2004-03-14 04:09:19 +0000
committerKarl 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;
51#ifdef HAVE_LDAP_SET_OPTION 51#ifdef HAVE_LDAP_SET_OPTION
52int ld_protocol = DEFAULT_PROTOCOL; 52int ld_protocol = DEFAULT_PROTOCOL;
53#endif 53#endif
54int warn_time = UNDEFINED; 54double warn_time = UNDEFINED;
55int crit_time = UNDEFINED; 55double crit_time = UNDEFINED;
56struct timeval tv; 56struct timeval tv;
57 57
58int 58int
@@ -135,9 +135,9 @@ main (int argc, char *argv[])
135 printf (_("LDAP %s - %.3f seconds response time|%s\n"), 135 printf (_("LDAP %s - %.3f seconds response time|%s\n"),
136 state_text (status), 136 state_text (status),
137 elapsed_time, 137 elapsed_time,
138 perfdata ("time", microsec, "us", 138 fperfdata ("time", elapsed_time, "s",
139 warn_time, warn_time, 139 (int)warn_time, warn_time,
140 crit_time, crit_time, 140 (int)crit_time, crit_time,
141 TRUE, 0, FALSE, 0)); 141 TRUE, 0, FALSE, 0));
142 142
143 return status; 143 return status;
@@ -218,10 +218,10 @@ process_arguments (int argc, char **argv)
218 ld_passwd = optarg; 218 ld_passwd = optarg;
219 break; 219 break;
220 case 'w': 220 case 'w':
221 warn_time = atoi (optarg); 221 warn_time = strtod (optarg, NULL);
222 break; 222 break;
223 case 'c': 223 case 'c':
224 crit_time = atoi (optarg); 224 crit_time = strtod (optarg, NULL);
225 break; 225 break;
226#ifdef HAVE_LDAP_SET_OPTION 226#ifdef HAVE_LDAP_SET_OPTION
227 case '2': 227 case '2':