check_http problem

Hello,

I’m using check_http for to check if a web site is live.
The problem is when the site is down, check_http returns OK because get the error page of tomcat as valid.

So, I thought to check also the min-max size of the web to validate between the real web page and the tomcat’s page.

This is the command I run:

[quote="0.292400s;;;0.000000 size=197B;;;0
]

As you can see, the size of the page is 197 bytes.
So, I’ve configured nagios to check between 170 and 210 bytes.

But I get a nagios warning saying “page is 723 bytes too large”.

So, I reconfigure nagios to check between (197+723=920) 890 and 960 bytes. Now Nagios returns an OK.
But togheter with the OK message returns the size of the page, and this is 723 bytes !

But when I run the commando on bash, I get this:

[quote="0.284941s;;;0.000000 size=197B;890;0;0
]

So, I don’t understand… Nagios says the size is 920 bytes and the plugin says 197 bytes…
What’s the problem here ??

Thank you for your help.
Edited ][/quote]

[/quote]

[root@sbmonitor plugins]# ./check_http -H www.vcadd.com
HTTP OK HTTP/1.1 200 OK - 3489 bytes in 0.919 seconds |time=0.919381s;;;0.000000 size=3489B;;;0
[root@sbmonitor plugins]# ./check_http -H www.vcadd.com -m 890:950
HTTP WARNING: page size 3489 too large|size=3489B;890;0;0
[root@sbmonitor plugins]# ./check_http -H www.vcadd.com -m 3480:3490
HTTP OK HTTP/1.1 200 OK - 3489 bytes in 0.293 seconds |time=0.292549s;;;0.000000 size=3489B;3480;0;0
You have new mail in /var/spool/mail/root
[root@sbmonitor plugins]# ./check_http -H www.vcadd.com -m 3480:3489
HTTP OK HTTP/1.1 200 OK - 3489 bytes in 0.308 seconds |time=0.308247s;;;0.000000 size=3489B;3480;0;0
[root@sbmonitor plugins]# ./check_http -H www.vcadd.com -m 3490:3491
HTTP WARNING: page size 3489 too small|size=3489B;3490;0;0