[Nagiosplug-devel] [ nagiosplug-Patches-1894496 ] check_http: more than one status code

SourceForge.net noreply at sourceforge.net
Mon Aug 25 13:43:24 CEST 2008


Patches item #1894496, was opened at 2008-02-15 16:06
Message generated for change (Comment added) made by hweiss
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1894496&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Enhancement
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: sni (svennierlein)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_http: more than one status code

Initial Comment:
This patch enhances the check_http plugin to accecpt more
than one status code.

Example.: check_http -e 200,300,301,302,304,401,403,404

If the webserver returns any of these codes, the check
is ok, otherwise critical.

This patch further changes the output if a not expected
status code occurs, ex.:
Invalid HTTP response received from host on port 9452 "HTTP/1.1 500 Internal Server Error"

Patch has been tested on Linux.

----------------------------------------------------------------------

>Comment By: Holger Weiss (hweiss)
Date: 2008-08-25 13:43

Message:
Logged In: YES 
user_id=759506
Originator: NO

Committed to SVN, thanks a lot for the patch.

----------------------------------------------------------------------

Comment By: sni (svennierlein)
Date: 2008-08-25 00:00

Message:
Logged In: YES 
user_id=1936413
Originator: YES

Sry, I'm unable to upload the patch:
File Upload: ArtifactFile: Could not open file for writing

The patch can be downloaded here:
http://www.nierlein.com/check_http.extented_status_codes.diff.4

----------------------------------------------------------------------

Comment By: sni (svennierlein)
Date: 2008-08-24 23:56

Message:
Logged In: YES 
user_id=1936413
Originator: YES

Attached new patch file.

----------------------------------------------------------------------

Comment By: sni (svennierlein)
Date: 2008-08-24 23:53

Message:
Logged In: YES 
user_id=1936413
Originator: YES

Added 2 tests to plugins/tests/check_http.t

----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2008-08-22 19:04

Message:
Logged In: YES 
user_id=759506
Originator: NO

And here's another version which fixes the memory leak I introduced with
my previous version :-)
File Added: check_http.extented_status_codes.diff.3

----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2008-08-22 17:48

Message:
Logged In: YES 
user_id=759506
Originator: NO

This feature sounds useful to me.

I attached a modified version of the patch which allows for specifying
strings which are longer or shorter than 3 characters via "-e" (this is
required for backward compatibility), updates the "--help" output as well
as the NEWS file, and uses check_http.c's coding/indentation style.

Thanks a lot!
File Added: check_http.extented_status_codes.diff.2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1894496&group_id=29880




More information about the Devel mailing list