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);
}