Possible issue with check_http

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
DigNetwerk
Posts: 40
Joined: Fri Oct 25, 2013 7:29 am

Possible issue with check_http

Post by DigNetwerk »

Hello,

We are trying to track down a constantly, wrongly, failing HTTP content check (~ 1 out of 4 checks fails). check_http fails to find the search string in the HTML body, even though the website is never down and perfectly visible in a browser.

Command line output of a looped check_http call to demonstrate (abundant spaces are due to Putty):

Code: Select all

# while true; do /usr/local/nagios/libexec/check_http -H citycard.gent.be --onredirect=follow -s "Gelieve uw gebruikers"; sleep 0.1; done
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.011770s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.012 second response time |time=0.012453s;;;0.000000 size=4017B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009682s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.011 second response time |time=0.011414s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.011886s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.013 second response time |time=0.012871s;;;0.000000 size=4017B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.013 second response time |time=0.012743s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.010452s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009769s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.014 second response time |time=0.013729s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.012432s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.035 second response time |time=0.035191s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009626s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009047s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4024 by                                                             tes in 0.010 second response time |time=0.010092s;;;0.000000 size=4024B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.011787s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.013 second response time |time=0.012674s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.010080s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009692s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.010 second response time |time=0.009694s;;;0.000000 size=4017B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.012 second response time |time=0.011920s;;;0.000000 size=4017B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.019 second response time |time=0.018932s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.012123s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.009 second response time |time=0.009104s;;;0.000000 size=4017B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009046s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.011 second response time |time=0.011385s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.011932s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009577s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009566s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009360s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.013 second response time |time=0.012608s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.013 second response time |time=0.012559s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009494s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.008857s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.011 second response time |time=0.011351s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4024 by                                                             tes in 0.013 second response time |time=0.012801s;;;0.000000 size=4024B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.011 second response time |time=0.011330s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009041s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009864s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.011925s;;;0.000000 size=4010B;;;0
HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4017 by                                                             tes in 0.012 second response time |time=0.012074s;;;0.000000 size=4017B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.012 second response time |time=0.012378s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.013 second response time |time=0.012991s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.009 second response time |time=0.009251s;;;0.000000 size=4010B;;;0
HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.010319s;;;0.000000 size=4010B;;;0
^C
I get the same behaviour on our QA server.

However, I can't reproduce this with wget (or my desktop browser). Command line output of looped wget:

Code: Select all

# while true; do echo -n "Check: "; wget -O - http://citycard.gent.be 2>/dev/null | grep -i "Gelieve uw gebruikers"; sleep 0.1; done
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
Check:             Gelieve uw gebruikersnaam en wachtwoord in te geven.
^C
Going deeper using verbose output on check_http I see some weird stuff. Output of a positive check (string found):

Code: Select all

# /usr/local/nagios/libexec/check_http -v -H citycard.gent.be --onredirect=follow -s "Gelieve uw gebruikers"
option f:4
GET / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: citycard.gent.be
Accept: */*


http://citycard.gent.be:80/ is 4010 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Cache-Control: private
Content-Type: text/html; charset=utf-8
Set-Cookie: ASP.NET_SessionId=fvzaz313shjetax1quir1zcb; path=/; HttpOnly
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 02 Dec 2014 13:28:58 GMT
Connection: close
Set-Cookie: BIGipServerGENIIS02_82_pool=739784202.20992.0000; path=/
Set-Cookie: TS01f1aa4e=015730da4e24ad3b754254603149f805c89164b8ab298fb9764ee710fbfe03b5b6a11c311f9222d197ffc922f85b51d35bb423ab8d3920a7d0e7e5a68f4c7ca6397fe006b5; Path=/
Transfer-Encoding: chunked
**** CONTENT ****
d6e
<!DOCTYPE html>
<html>
<head>
    <title>Aanmelden</title>
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="header-title">
    <h1>ReCreateX</h1>
</div>

<div id="logindisplay">
    <!DOCTYPE html>

</div>
        </div>
        <div id="main">
            <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#UserName').focus();
    });
</script>
<form action="/LogOn/LogOn" method="post">    <fieldset>
        <legend>Aanmelden</legend>
        <p>
            <div class="validation-summary-valid" data-valmsg-summary="true"><span>Aanmelden mislukt. Gelieve de fouten te corrigeren en opnieuw te proberen.</span>
<ul><li style="display:none"></li>
</ul></div>
        </p>
        <p class="description">
            Gelieve uw gebruikersnaam en wachtwoord in te geven.
        </p>
        <table class="tableFullWidth">
            <tr>
                <td valign="top">
                    <img src="/Content/Images/login.png" alt="Login" />
                </td>
                <td>
                    <table class="tableFullWidth">
                        <tr>
                            <td class="tdlabel">
                                Gebruikersnaam
                            </td>
                            <td class="tdfield">
                                <input data-val="true" data-val-required="Het veld &#39;Gebruikersnaam&#39; is vereist." id="UserName" name="UserName" type="text" value="" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tdlabel">
                                Wachtwoord
                            </td>
                            <td class="tdfield">
                                <input data-val="true" data-val-required="Het veld &#39;Wachtwoord&#39; is vereist." id="Password" name="Password" type="password" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td class="tdlabel">
                                <input data-val="true" data-val-required="The RememberMe field is required." id="RememberMe" name="RememberMe" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" />
                                <label for="RememberMe">Onthoud mij?</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="submit" value="Aanmelden" />
                            </td>
                            <td class="tdlabel">
                                <a href="/ForgotPassword">Wachtwoord vergeten?</a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
</form>
        </div>

    </div>
</body>
</html>

0


HTTP OK: HTTP/1.1 200 OK - 4010 bytes in 0.010 second response time |time=0.009949s;;;0.000000 size=4010B;;;0
Output of a false negative check (string not found):
(seach for "58e" and you will see the weirdness)

Code: Select all

# /usr/local/nagios/libexec/check_http -v -H citycard.gent.be --onredirect=follow -s "Gelieve uw gebruikers"
option f:4
GET / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: citycard.gent.be
Accept: */*


http://citycard.gent.be:80/ is 4024 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Cache-Control: private
Content-Type: text/html; charset=utf-8
Set-Cookie: ASP.NET_SessionId=4wrjxfgllmwqddqwrrzrlter; path=/; HttpOnly
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 02 Dec 2014 13:28:59 GMT
Connection: close
Set-Cookie: BIGipServerGENIIS02_82_pool=739784202.20992.0000; path=/
Set-Cookie: TS01f1aa4e=015730da4e2e552fc67d16f8b19bedefa6e54672526a5b26e75ff5961ded5ecb5199dc522cf86a48273a535c3d50845251d966106352e61cf7b7e208d7be245a1a309a1a14; Path=/
Transfer-Encoding: chunked
**** CONTENT ****
467
<!DOCTYPE html>
<html>
<head>
    <title>Aanmelden</title>
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="header-title">
    <h1>ReCreateX</h1>
</div>

<div id="logindisplay">
    <!DOCTYPE html>

</div>
        </div>
        <div id="main">
            <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#UserName').focus();
    });
</script>
<form action="/LogOn/LogOn" method="post">    <fieldset>
        <legend>Aanmelden</legend>
        <p>
            <div class="validation-summary-valid" data-valmsg-summary="true"><span>Aanmelden mislukt. Gelieve de fouten te corrigeren en opnieuw te proberen.</span>
<ul><li style="display:none"></li>
</ul></div>
        </p>
        <p class="description">
            Gel
58e
ieve uw gebruikersnaam en wachtwoord in te geven.
        </p>
        <table class="tableFullWidth">
            <tr>
                <td valign="top">
                    <img src="/Content/Images/login.png" alt="Login" />
                </td>
                <td>
                    <table class="tableFullWidth">
                        <tr>
                            <td class="tdlabel">
                                Gebruikersnaam
                            </td>
                            <td class="tdfield">
                                <input data-val="true" data-val-required="Het veld &#39;Gebruikersnaam&#39; is vereist." id="UserName" name="UserName" type="text" value="" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tdlabel">
                                Wachtwoord
                            </td>
                            <td class="tdfield">
                                <input data-val="true" data-val-required="Het veld &#39;Wachtwoord&#39; is vereist." id="Password" name="Password" type="password" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td class="tdlabel">

379
<input data-val="true" data-val-required="The RememberMe field is required." id="RememberMe" name="RememberMe" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" />
                                <label for="RememberMe">Onthoud mij?</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="submit" value="Aanmelden" />
                            </td>
                            <td class="tdlabel">
                                <a href="/ForgotPassword">Wachtwoord vergeten?</a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
</form>
        </div>

    </div>
</body>
</html>

0


HTTP CRITICAL: HTTP/1.1 200 OK - string 'Gelieve uw gebruikers' not found on 'http://citycard.gent.be:80/' - 4024 bytes in 0.013 second response time |time=0.012724s;;;0.000000 size=4024B;;;0
Any ideas? :o

Feel free to run your own tests against citycard.gent.be, it's a public website. But give us a yell and the IP address where you are doing/have done the checks from, so we can discern you from actual DOS attempts :)
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Possible issue with check_http

Post by vAJ »

How often does this happen? If frequently, you may want to get a packet capture and see if the web server is returning those extra characters or if this is happening in the script execution.

The fact that your page size varies when you have a failure tells me that your web server is doing something odd. This leads me to believe that you'll see the same special characters will be seen in the packet cap.

You may want to see about passing a User Agent with the -A option. Use the same agent string as your browser. Sometimes, web apps can be funky about user agents. I'm not sure if this is something that eliminates a variable or adds one. ;) YMMV
Andrew J. - Do you even grok?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Possible issue with check_http

Post by sreinhardt »

While I would absolutely love to see a full packet capture of this(core dump would be even more fantastic), I have a feeling I know what the issue is. It looks like your server replies with chunked encoding, which is not fully supported. From my very limited look into it so far, I believe allows for sending of initially unknown sized messages and uses a different size header in the actual response. My guess would be that check_http only allocates so much for a per packet\request transfer and the 4k size might be getting close to our default size limit. Since it reacts quite differently than content-length headers, check_http may not be able to pull in the whole transfer and\or certainly can mangle data without understanding the size of data it should be overwriting into. This is something we have an existing branch for, but have yet to get time to complete it. I am also looking at completely avoiding the whole issue with a rewrite of the plugin using proper library support, but that might be a little ways off yet.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
DigNetwerk
Posts: 40
Joined: Fri Oct 25, 2013 7:29 am

Re: Possible issue with check_http

Post by DigNetwerk »

Hi,

We looked into it with 3 persons from the network and server team.

It's definitely the chunking. The server does not always chunk at the same position in the response body. Sometimes it does one big chunk, but sometimes it chunks right in the middle of our search string... splitting it up into two lines, with a chunk marker in between... (as you can see in my demo output above).

The way we look at it, the final issue lies with check_http: it pretends to be an HTTP 1.1 compatible client, but when it gets a chunked response (mandatory feature in HTTP 1.1), it can't handle it.

So we are now looking for an alternative check_http that does handle chunking (preferably with compatible command line arguments to check_http). But in the long-term we would like to see a fully working check_http in the base Nagios (XI) release...
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Possible issue with check_http

Post by sreinhardt »

The way we look at it, the final issue lies with check_http
You are 100% correct, and this is something I am working very hard to correct, albeit a little slower than I'd like. The current incarnation may get better chunked support for 2.1, it really depends how much is left on the branch and if the monitoring plugins team worked on it as well. If there is little left in the existing implementation, or M-P has implemented it in a way that we can pull in, I can assure you this will be at least technically solved with 2.1. Otherwise if it requires a lot of work, and\or M-P have not finished the current implementation, I will continue forward with the complete rewrite and dependency on a real http lib that supports proper protocol implementations. Which means we are looking at a 2.2 release most likely. I would be happy to send you and Willem a patch either way when I have one ready, if you'd like.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Possible issue with check_http

Post by WillemDH »

Spenser,

Please let us know once you have a patch. We would be happy to test it, as this is quite an annoying issue and we spent quite some time to troubleshoot it. Can you leave this thread open untill this is solved please? Thanks.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Possible issue with check_http

Post by sreinhardt »

Will do on the patch, and not a problem to leave this open. I don't suppose that site of yours is open to the public and would mind if I used it as a test case? I would estimate no more than 5-10 connections at most when actually testing. If not, not a big deal, apache and IIS configs don't look too hard for it.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
DigNetwerk
Posts: 40
Joined: Fri Oct 25, 2013 7:29 am

Re: Possible issue with check_http

Post by DigNetwerk »

Hello Spenser,

You can use citycard.gent.be and vzwregent.be.

For city citycard: search for "Gelieve uw gebruikers", you will see that the line sometimes gets split in two by the (random) chunking.

Thanks for looking into this.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Possible issue with check_http

Post by sreinhardt »

Thanks! I started some changes last night, they will definitely not be changes made for 2.1 as they are relatively sweeping changes to the core of most plugins. However I started with check_http and can either provide a binary for your system, or proper patches to allow you to build. It will be a few days at least, since it's in my free time, but I will let you know when its all set for external testing!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Possible issue with check_http

Post by sreinhardt »

Thanks for letting me test your sites. There is a working implimentation of chunked encoding for check_http in the 2.1 beta branch of plugins. If you want to test it out here are some instructions.

Code: Select all

git clone -b 2.1.0-beta-RC1 https://github.com/nagios-plugins/nagios-plugins.git nagios-plugins-beta
cd nagios-plugins-beta
./tools/setup
./configure --with-nagios-user=nagios --with-nagios-group=nagcmd --libexecdir=/usr/local/nagios/libexec
make
make install <- Only do this if you intend to run the with core or XI, and not just test them.
Either way you go with make install, you will have working executables in ./plugins, ./plugins-root, and ./plugins-scripts. You can change to any of those directories and execute just like from libexec normally. Feel free to check out the last 6 months or so of changes! We'll have an official RC1 out soon enough.

If you'd like a few more details on what changes have been made, look here: http://support.nagios.com/forum/viewtop ... 85#p120285
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked