summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d16f3fb)
raw | patch | inline | side by side (parent: d16f3fb)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 26 Mar 2011 19:44:38 +0000 (15:44 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 26 Mar 2011 19:44:38 +0000 (15:44 -0400) |
NEWS | patch | blob | history | |
THANKS.in | patch | blob | history | |
plugins/check_ssh.c | patch | blob | history |
index d7fea2735b029a844d4f128f219762c6de0cecfc..fcaa9c1b45d6c4834ae0a1dbd7dc0747af0a7196 100644 (file)
--- a/NEWS
+++ b/NEWS
check_disk_smb now allows spaces in share names (#990948, #1370031, Debian #601699)
check_http now uses standard threshold functions (enables floating point and ranges)
check_http now checks for and prints the certificate cn (hostname) in SSL certificate checks (Stéphane Urbanovski)
+ Add perfdata to check_ssh (#3244097 - Marco Beck)
FIXES
Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603)
diff --git a/THANKS.in b/THANKS.in
index 387a3794a4882c87eefda2b33b3ae2fc384d7d68..cb8d26cf6419c3e9a183ce5c10e6174202b6a2d1 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Brian Landers
Ryan Kelly
Stéphane Urbanovski
+Marco Beck
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 2509b860bd96c9e089020321ee7424360b9db545..3bbf44dc10813c94cf5371d9270085b4d840a811 100644 (file)
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
char *ssh_proto = NULL;
char *ssh_server = NULL;
static char *rev_no = VERSION;
+ struct timeval tv;
+ double elapsed_time;
+
+ gettimeofday(&tv, NULL);
result = my_tcp_connect (haddr, hport, &sd);
exit (STATE_WARNING);
}
+ elapsed_time = (double)deltime(tv) / 1.0e6;
+
printf
- (_("SSH OK - %s (protocol %s)\n"),
- ssh_server, ssh_proto);
+ (_("SSH OK - %s (protocol %s) | %s\n"),
+ ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
+ FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
close(sd);
exit (STATE_OK);
}