You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
3 years ago
|
From f5599aafb3cac9b25b1739b31827596581f92c2c Mon Sep 17 00:00:00 2001
|
||
|
From: Joachim Jaeckel <bugzilla-2004@jj-it.de>
|
||
|
Date: Sun, 16 Sep 2012 09:53:48 +0400
|
||
|
Subject: [PATCH 1/1] Fix for Nagios 3.x
|
||
|
|
||
|
https://bugzilla.redhat.com/823859
|
||
|
---
|
||
|
check_sip | 14 ++++++++------
|
||
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/check_sip b/check_sip
|
||
|
index d2b0ecd..71438df 100644
|
||
|
--- a/check_sip
|
||
|
+++ b/check_sip
|
||
|
@@ -124,12 +124,14 @@ $socket->send($req);
|
||
|
$response='';
|
||
|
$resend_times++;
|
||
|
# sip retransmission, totally 35.5 seconds.
|
||
|
-switch($resend_times){
|
||
|
- case 1 { ualarm(500000); }
|
||
|
- case 2 { $TIMEOUT=1; alarm($TIMEOUT); }
|
||
|
- case 3 { $TIMEOUT=2; alarm($TIMEOUT); }
|
||
|
- else { $TIMEOUT=4; alarm($TIMEOUT); }
|
||
|
-}
|
||
|
+if($resend_times==1)
|
||
|
+ { ualarm(500000); }
|
||
|
+elsif($resend_times==2)
|
||
|
+ { $TIMEOUT=1; alarm($TIMEOUT); }
|
||
|
+elsif ($resend_times==3)
|
||
|
+ { $TIMEOUT=2; alarm($TIMEOUT); }
|
||
|
+else
|
||
|
+ { $TIMEOUT=4; alarm($TIMEOUT); }
|
||
|
#print $resend_times."->".$Total_timeout." $TIMEOUT\n";
|
||
|
$socket->recv($response, 1024) or $state = 'CRITICAL'; # TODO: CHECK and show '503 Service Unavailable' when receiving unreachable ICMP packet.
|
||
|
#get rid of the 100 Trying - provisional response ...
|
||
|
--
|
||
|
1.7.12
|
||
|
|