Difference between revisions of "Subagent:PortCheck"

1,776 bytes added ,  10:27, 16 January 2016
no edit summary
m (Initial version)
Line 14: Line 14:
|-
|-
| ServiceCheck.HTTP(''target'',[''port''],''URI'',''hostHeader''[,''regex''[,''timeout'']]) || Check that HTTP service is running on ''target''.  Optional argument ''port'' specifies the port to connect with, otherwise 80 will be used.  The ''URI'' is NOT a URL it is the host header request URI.  As an example to test URL http://www.netxms.org/index.html enter www.netxms.org:/index.html. ''hostHeader'' is currently not used, but may be the Host option at some point in the request made.  Optional argument ''regex'' is the regular expression to check returned from the request, otherwise "^HTTP/1.[01] 200 .*" will be used.  Optional argument ''timeout'' specifies timeout in milliseconds.
| ServiceCheck.HTTP(''target'',[''port''],''URI'',''hostHeader''[,''regex''[,''timeout'']]) || Check that HTTP service is running on ''target''.  Optional argument ''port'' specifies the port to connect with, otherwise 80 will be used.  The ''URI'' is NOT a URL it is the host header request URI.  As an example to test URL http://www.netxms.org/index.html enter www.netxms.org:/index.html. ''hostHeader'' is currently not used, but may be the Host option at some point in the request made.  Optional argument ''regex'' is the regular expression to check returned from the request, otherwise "^HTTP/1.[01] 200 .*" will be used.  Optional argument ''timeout'' specifies timeout in milliseconds.
|-
| ServiceCheck.HTTPS(''target'',[''port''],''URI'',''hostHeader''[,''regex''[,''timeout'']]) || Check that HTTPS service is running on ''target''.  Arguments are the same as for ServiceCheck.HTTP(*)
|-
|-
| ServiceCheck.POP3(''target'',''username'',''password''[,''timeout'') || Check that POP3 service is running on ''target'' and that we are able to login using the supplied ''username'' and ''password''.  Optional argument ''timeout'' specifies timeout in milliseconds.
| ServiceCheck.POP3(''target'',''username'',''password''[,''timeout'') || Check that POP3 service is running on ''target'' and that we are able to login using the supplied ''username'' and ''password''.  Optional argument ''timeout'' specifies timeout in milliseconds.
Line 22: Line 24:
|-
|-
| ServiceCheck.Telnet(''target''[,''port''[,''timeout]]) || Check that Telnet service is running on ''target''.  Optional argument ''port'' specifies the port to connect with, otherwise 23 will be used.  Optional argument ''timeout'' specifies timeout in milliseconds.
| ServiceCheck.Telnet(''target''[,''port''[,''timeout]]) || Check that Telnet service is running on ''target''.  Optional argument ''port'' specifies the port to connect with, otherwise 23 will be used.  Optional argument ''timeout'' specifies timeout in milliseconds.
|-
| ServiceResponseTime.Custom(''target'',''port''[,''timeout'']) || Same as ServiceCheck.Custom(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.HTTP(''target'',[''port''],''URI'',''hostHeader''[,''regex''[,''timeout'']]) || Same as ServiceCheck.HTTP(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.HTTPS(''target'',[''port''],''URI'',''hostHeader''[,''regex''[,''timeout'']]) || Same as ServiceCheck.HTTPS(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.POP3(''target'',''username'',''password''[,''timeout'') || Same as ServiceCheck.POP3(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.SMTP(''target'',''toAddress''[,''timeout'']) || Same as ServiceCheck.SMTP(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.SSH(''target''[,''port''[,''timeout]]) || Same as ServiceCheck.SSH(*), but returned value is the response time of the service. See Response Codes table below.
|-
| ServiceResponseTime.Telnet(''target''[,''port''[,''timeout]]) || Same as ServiceCheck.Telnet(*), but returned value is the response time of the service. See Response Codes table below.
|}
|}


Line 39: Line 55:
| 3 || Invalid / Unexpected response from ''target''.
| 3 || Invalid / Unexpected response from ''target''.
|}
|}
All of the ServiceResponseTime.* parameters return the actual response time, up to uptime.<br>
If return value = timeout value, this means the service was unreachable.


= Configuration file =
= Configuration file =
184

edits