summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18a6825)
raw | patch | inline | side by side (parent: 18a6825)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 13 Mar 2003 21:14:26 +0000 (21:14 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 13 Mar 2003 21:14:26 +0000 (21:14 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@421 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dns.c | patch | blob | history | |
plugins/check_http.c | patch | blob | history | |
plugins/check_tcp.c | patch | blob | history |
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 2503293ba05bbdf9b885a2bba57ba9e5c7b0b3ad..2765f64379124148d34d6e935c199721aa8cb0ac 100644 (file)
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
else
multi_address = TRUE;
- printf ("DNS ok - %-5.3f seconds response time, address%s %s|time=%-5.3f\n",
+ printf ("DNS ok - %.3f seconds response time, address%s %s|time=%.3f\n",
elapsed_time, (multi_address==TRUE ? "es are" : " is"), address, elapsed_time);
}
else if (result == STATE_WARNING)
diff --git a/plugins/check_http.c b/plugins/check_http.c
index c9d4d04084db75d8be14acc9127ed9b56c17acce..4734d75c5c43b4fde66490986f89046399424786 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
else if (onredirect == STATE_CRITICAL)
printf ("CRITICAL");
elapsed_time = delta_time (tv);
- asprintf (&msg, " - %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, " - %s - %.3f second response time %s%s|time=%.3f\n",
status_line, elapsed_time, timestamp,
(display_html ? "</A>" : ""), elapsed_time);
terminate (onredirect, msg);
/* check elapsed time */
elapsed_time = delta_time (tv);
- asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, "HTTP problem: %s - %.3f second response time %s%s|time=%.3f\n",
status_line, elapsed_time, timestamp,
(display_html ? "</A>" : ""), elapsed_time);
if (check_critical_time == TRUE && elapsed_time > critical_time)
if (strlen (string_expect)) {
if (strstr (page, string_expect)) {
- printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n",
+ printf ("HTTP OK %s - %.3f second response time %s%s|time=%.3f\n",
status_line, elapsed_time,
timestamp, (display_html ? "</A>" : ""), elapsed_time);
exit (STATE_OK);
}
else {
- printf ("CRITICAL - string not found%s|time=%7.3f\n",
+ printf ("CRITICAL - string not found%s|time=%.3f\n",
(display_html ? "</A>" : ""), elapsed_time);
exit (STATE_CRITICAL);
}
if (strlen (regexp)) {
errcode = regexec (&preg, page, REGS, pmatch, 0);
if (errcode == 0) {
- printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n",
+ printf ("HTTP OK %s - %.3f second response time %s%s|time=%.3f\n",
status_line, elapsed_time,
timestamp, (display_html ? "</A>" : ""), elapsed_time);
exit (STATE_OK);
}
else {
if (errcode == REG_NOMATCH) {
- printf ("CRITICAL - pattern not found%s|time=%7.3f\n",
+ printf ("CRITICAL - pattern not found%s|time=%.3f\n",
(display_html ? "</A>" : ""), elapsed_time);
exit (STATE_CRITICAL);
}
exit (STATE_WARNING);
}
/* We only get here if all tests have been passed */
- asprintf (&msg, "HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, "HTTP OK %s - %.3f second response time %s%s|time=%.3f\n",
status_line, (float)elapsed_time,
timestamp, (display_html ? "</A>" : ""), elapsed_time);
terminate (STATE_OK, msg);
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index a7d8e6f215ccda27948935b4f16e9df0620000f8..7d1155136c74f95f43e81313ad6512ff54d33809 100644 (file)
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
alarm (0);
printf
- ("%s %s - %7.3f second response time on port %d",
+ ("%s %s - %.3f second response time on port %d",
SERVICE,
state_text (result), elapsed_time, server_port);
if (status && strlen(status) > 0)
printf (" [%s]", status);
- printf ("|time=%7.3f\n", elapsed_time);
+ printf ("|time=%.3f\n", elapsed_time);
return result;
}