You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-c, --critical= Response time to result in critical status (seconds)
59
59
-E, --escape Can use \n, \r, \t or \ in send or quit string. Must come before send or quit option. By default, nothing added to send, \r\n added to end of quit
60
60
-W, --error-warning Set the error level to warning when exiting with unexpected error (default: critical). In the case of request succeeded, evaluation result of -c option eval takes priority.
61
+
-C, --expect-closed Verify that the port/unixsock is closed. If the port/unixsock is closed, OK; if open, follow the ErrWarning flag. This option only verifies the connection.
Copy file name to clipboardExpand all lines: check-tcp/lib/check-tcp.go
+30-7Lines changed: 30 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,14 @@ type tcpOpts struct {
18
18
Servicestring`long:"service" description:"Service name. e.g. ftp, smtp, pop, imap and so on"`
19
19
Hostnamestring`short:"H" long:"hostname" description:"Host name or IP Address"`
20
20
exchange
21
-
Timeoutfloat64`short:"t" long:"timeout" default:"10" description:"Seconds before connection times out"`
22
-
MaxBytesint`short:"m" long:"maxbytes" description:"Close connection once more than this number of bytes are received"`
23
-
Delayfloat64`short:"d" long:"delay" description:"Seconds to wait between sending string and polling for response"`
24
-
Warningfloat64`short:"w" long:"warning" description:"Response time to result in warning status (seconds)"`
25
-
Criticalfloat64`short:"c" long:"critical" description:"Response time to result in critical status (seconds)"`
26
-
Escapebool`short:"E" long:"escape" description:"Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or quit option. By default, nothing added to send, \\r\\n added to end of quit"`
27
-
ErrWarningbool`short:"W" long:"error-warning" description:"Set the error level to warning when exiting with unexpected error (default: critical). In the case of request succeeded, evaluation result of -c option eval takes priority."`
21
+
Timeoutfloat64`short:"t" long:"timeout" default:"10" description:"Seconds before connection times out"`
22
+
MaxBytesint`short:"m" long:"maxbytes" description:"Close connection once more than this number of bytes are received"`
23
+
Delayfloat64`short:"d" long:"delay" description:"Seconds to wait between sending string and polling for response"`
24
+
Warningfloat64`short:"w" long:"warning" description:"Response time to result in warning status (seconds)"`
25
+
Criticalfloat64`short:"c" long:"critical" description:"Response time to result in critical status (seconds)"`
26
+
Escapebool`short:"E" long:"escape" description:"Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or quit option. By default, nothing added to send, \\r\\n added to end of quit"`
27
+
ErrWarningbool`short:"W" long:"error-warning" description:"Set the error level to warning when exiting with unexpected error (default: critical). In the case of request succeeded, evaluation result of -c option eval takes priority."`
28
+
ExpectClosedbool`short:"C" long:"expect-closed" description:"Verify that the port/unixsock is closed. If the port/unixsock is closed, OK; if open, follow the ErrWarning flag. This option only verifies the connection."`
0 commit comments