Skip to content

Commit c86bb12

Browse files
committed
Fix TCP plugin, use Convert-IcingaPluginThresholds
1 parent 9ab2a01 commit c86bb12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/Invoke-IcingaCheckTCP.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ function Invoke-IcingaCheckTCP()
7878
$Verbosity = 0
7979
);
8080

81-
$Warning = ConvertTo-SecondsFromIcingaThresholds $Warning;
82-
$Critical = ConvertTo-SecondsFromIcingaThresholds $Critical;
81+
$Warning = Convert-IcingaPluginThresholds $Warning;
82+
$Critical = Convert-IcingaPluginThresholds $Critical;
8383
$ConnectionData = Measure-IcingaTCPConnection -Address $Address -Ports $Ports;
8484
$CheckPackage = New-IcingaCheckPackage -Name 'TCP Connections' -OperatorAnd -Verbose $Verbosity;
8585

@@ -106,7 +106,7 @@ function Invoke-IcingaCheckTCP()
106106
-Unit 's' `
107107
-LabelName ([string]::Format('port_{0}_time', $port));
108108

109-
$ConnectionTimeCheck.WarnOutOfRange($Warning).CritOutOfRange($Critical) | Out-Null;
109+
$ConnectionTimeCheck.WarnOutOfRange($Warning.Value).CritOutOfRange($Critical.Value) | Out-Null;
110110

111111
$ConnectionPackage.AddCheck($ConnectionCheck);
112112
$ConnectionPackage.AddCheck($ConnectionTimeCheck);

0 commit comments

Comments
 (0)