mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-13 18:50:01 -04:00
Add perfdata to check_ssh (#3244097 - Marco Beck)
This commit is contained in:
parent
d16f3fb0a9
commit
1bc7a4a198
3 changed files with 11 additions and 2 deletions
1
NEWS
1
NEWS
|
|
@ -6,6 +6,7 @@ This file documents the major additions and syntax changes between releases.
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -267,3 +267,4 @@ Craig Leres
|
|||
Brian Landers
|
||||
Ryan Kelly
|
||||
Stéphane Urbanovski
|
||||
Marco Beck
|
||||
|
|
|
|||
|
|
@ -215,6 +215,10 @@ ssh_connect (char *haddr, int hport, char *remote_version)
|
|||
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);
|
||||
|
||||
|
|
@ -250,9 +254,12 @@ ssh_connect (char *haddr, int hport, char *remote_version)
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue