[Bug 859355] New: Perl errors while SIP is not answer for check_sip Nagios plugin
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c0 Summary: Perl errors while SIP is not answer for check_sip Nagios plugin Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: avn@avnsite.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:26.0) Gecko/20100101 Firefox/26.0 Perl script errors if SIP not answer for check_sip Nagios plugin: asterisk:/usr/lib/nagios/plugins # ./check_sip -u sip:2999 -H asterisk Reproducible: Always Steps to Reproduce: 1. Stop Asterisk PBX 2. Run /usr/lib/nagios/plugins/check_sip for example as asterisk:/usr/lib/nagios/plugins # ./check_sip -u sip:2999 -H asterisk 3. See errors Actual Results: Use of uninitialized value $tstring in concatenation (.) or string at /check_sip line 277. Use of uninitialized value $rcode in concatenation (.) or string at ./check_sip line 277. Unknown error: , 0.000686 seconds response time, cnt=12|rtt=0.000686s;cnt=12;0.5s;1s;0:10; code= Expected Results: Needs to report something like this: Unknown error: UNKNOWN ERROR, 0.00086 seconds response time, cnt=12|rtt=0.00086s;cnt=12;0.5s;1s;0:10; code=NO RESPONSE Proposed check_sip.patch: --- check_sip<->2014-01-18 15:15:52.757895836 +0400 +++ check_sip<->2013-10-04 18:03:00.000000000 +0400 @@ -256,7 +256,13 @@ my ($response, $rtime, $sp_behavior) = @_; my @header=split(/\r/,$response); my $tstring=$header[0]; + if( !defined $tstring ) { + $tstring = "UNKNOWN ERROR"; + } my $rcode=getResponseCode($response); + if( !defined $rcode ) { + $rcode = "NO RESPONSE"; + } if (!$sp_behavior){ #in this case, we want to see if the SIP-server is respoding positively to our request # Some SUT respond with 100 Trying - assume everything is OK if we get this -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwiedemann@suse.com AssignedTo|bnc-team-screening@forge.pr |lrupp@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c1 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |lrupp@suse.com InfoProvider| |avn@avnsite.com AssignedTo|lrupp@suse.com |mcaj@suse.com --- Comment #1 from Lars Vogdt <lrupp@suse.com> 2014-02-04 12:52:29 CET --- I'm sorry, but I can not reproduce the problem here: ~> ./check_sip -u sip:2999 -H asterisk SIP timeout: No response from SIP server after 8.00109 seconds. (12/11) Is there a firewall involved on your asterisk server? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c2 Vladimir Anufriev <avn@avnsite.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|avn@avnsite.com | --- Comment #2 from Vladimir Anufriev <avn@avnsite.com> 2014-02-04 15:45:15 MSK --- No firewall. It's a LAN. And it's more Perl's style error not functional OpenSuse 12.3 on Asterisk server (asterisk 1.8.24.0) OpenSuse 11.3 on Nagios server (nagios-plugins-sip-1.3-3.1, perl 5.12.1-2.7.1) May be it caused by outdated Perl on Nagios's side... No other ideas... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c3 --- Comment #3 from Vladimir Anufriev <avn@avnsite.com> 2014-02-04 16:10:10 MSK --- Just tried on OpenSuse 12.3. The result depends on the target server3:/usr/lib/nagios/plugins # ./check_sip -u sip:2999 -H asterisk SIP/2.0 200 OK, 0.00044 seconds response time, cnt=1|rtt=0.00044s;cnt=1;0.5s;1s;0:10; code=200 server3:/usr/lib/nagios/plugins # ./check_sip -u sip:2999 -H server2 SIP timeout: No response from SIP server after 8.00189 seconds. (12/11) server3:/usr/lib/nagios/plugins # ./check_sip -u sip:2999 -H server1 Use of uninitialized value $tstring in concatenation (.) or string at /check_sip line 270. Use of uninitialized value $rcode in concatenation (.) or string at ./check_sip line 270. Unknown error: , 0.001952 seconds response time, cnt=12|rtt=0.001952s;cnt=12;0.5s;1s;0:10; code= -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c4 --- Comment #4 from Vladimir Anufriev <avn@avnsite.com> 2014-02-04 16:37:52 MSK --- Even if server1 in the above test in somewhat manner rejected SIP packages the diagnostics is not correct. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=859355 https://bugzilla.novell.com/show_bug.cgi?id=859355#c5 Lars Vogdt <lrupp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Lars Vogdt <lrupp@suse.com> 2014-02-04 15:02:02 CET --- (In reply to comment #4)
Even if server1 in the above test in somewhat manner rejected SIP packages the diagnostics is not correct.
Agreed - and added the patch to the package in server:monitoring now. Just for the reference: I'm not that happy with the patch as it just fixes a symptom - but this should IMHO be fixed in the 'receive part' of the plugin. Nevertheless: mail to upstream is on the way. Closing here as fixed as your problem should be solved with the next built of the package. Thanks for your testing and especially for your patch! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com