diff options
author | Sven Nierlein <sven@nierlein.de> | 2017-03-10 21:23:40 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2017-03-12 21:55:52 (GMT) |
commit | 0cff5f2d93b1359ab10949aa119527a1e4e6eb35 (patch) | |
tree | 82e804ad6e7b64ab03365ab4433d829bf911b21f /plugins/t/check_tcp.t | |
parent | d721efc10b35071b85ca98a9338e3981ce36a9ab (diff) | |
download | monitoring-plugins-0cff5f2d93b1359ab10949aa119527a1e4e6eb35.tar.gz |
remove hardcoded verisign.com tests
and make it configurable
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins/t/check_tcp.t')
-rw-r--r-- | plugins/t/check_tcp.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index f996685..121b0cb 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t | |||
@@ -18,6 +18,9 @@ BEGIN { | |||
18 | my $host_tcp_http = getTestParameter( "host_tcp_http", "NP_HOST_TCP_HTTP", "localhost", | 18 | my $host_tcp_http = getTestParameter( "host_tcp_http", "NP_HOST_TCP_HTTP", "localhost", |
19 | "A host providing the HTTP Service (a web server)" ); | 19 | "A host providing the HTTP Service (a web server)" ); |
20 | 20 | ||
21 | my $host_tls_http = getTestParameter( "host_tls_http", "NP_HOST_TLS_HTTP", "localhost", | ||
22 | "A host providing the HTTPS Service (a tls web server)" ); | ||
23 | |||
21 | my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", | 24 | my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", |
22 | "The hostname of system not responsive to network requests" ); | 25 | "The hostname of system not responsive to network requests" ); |
23 | 26 | ||
@@ -42,10 +45,10 @@ $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 | |||
42 | $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); | 45 | $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); |
43 | $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); | 46 | $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); |
44 | if($internet_access ne "no") { | 47 | if($internet_access ne "no") { |
45 | $t += checkCmd( "./check_tcp -S -D 1 -H www.verisign.com -p 443", 0 ); | 48 | $t += checkCmd( "./check_tcp -S -D 1 -H $host_tls_http -p 443", 0 ); |
46 | $t += checkCmd( "./check_tcp -S -D 9000,1 -H www.verisign.com -p 443", 1 ); | 49 | $t += checkCmd( "./check_tcp -S -D 9000,1 -H $host_tls_http -p 443", 1 ); |
47 | $t += checkCmd( "./check_tcp -S -D 9000 -H www.verisign.com -p 443", 1 ); | 50 | $t += checkCmd( "./check_tcp -S -D 9000 -H $host_tls_http -p 443", 1 ); |
48 | $t += checkCmd( "./check_tcp -S -D 9000,8999 -H www.verisign.com -p 443", 2 ); | 51 | $t += checkCmd( "./check_tcp -S -D 9000,8999 -H $host_tls_http -p 443", 2 ); |
49 | } | 52 | } |
50 | 53 | ||
51 | # Need the \r\n to make it more standards compliant with web servers. Need the various quotes | 54 | # Need the \r\n to make it more standards compliant with web servers. Need the various quotes |