Xymon Mailing List Archive search

http test don't care about the authentication

5 messages in this thread

list Paul Root · Wed, 2 May 2018 18:57:48 +0000 ·
I'm helping some guys bringing up a new xymon server and have a few issues.    4.3.28

One that I don't get is an http test.

The server in question requires a login on the first page (ldap).

All they care is that the web page is up, they are not looking to login.

The old server, a prehistoric  4.x.1x something still hobbit, doesn't care, it just sends all good.


Is there a way to have 4.3.28 just say the server is up but not try to login?

Thanks,
Paul.

Paul Root
Lead Engineer
XXX Commerce Dr
Woodbury, Mn 55125
XXX-XXX-XXXX
user-76fdb6883669@xymon.invalid

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list John Thurston · Wed, 2 May 2018 11:05:12 -0800 ·
Change to the httpstatus test.

httpstatus[=COLUMN];URL;okstatusexpr;notokstatusexpr

"This is used to explicitly test for certain HTTP statuscodes returned when the URL is requested. The okstatusexpr and nokokstatusexpr expressions are Perl-compatible regular expressions, e.g. "2..|302" will match all OK codes and the redirect (302) status code. If the URL cannot be retrieved, the status is "999"."

List '401' as an accepted return code.
If you want to make sure it won't return any data without authentication, list all others as unacceptable.

    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska
quoted from Paul Root

On 5/2/2018 10:57 AM, Root, Paul T wrote:
All they care is that the web page is up, they are not looking to login.
list Kris Springer · Wed, 2 May 2018 12:29:35 -0700 ·
Anyone know why I can run a curl test from the Xymon server command line and get a '200 OK' status, but when I add the same httpstatus test into the hosts.cfg it returns a '404'?


Thank you.

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

Kris Springer

quoted from John Thurston


On 05/02/2018 12:05 PM, John Thurston wrote:
Change to the httpstatus test.

httpstatus[=COLUMN];URL;okstatusexpr;notokstatusexpr

"This is used to explicitly test for certain HTTP statuscodes returned when the URL is requested. The okstatusexpr and nokokstatusexpr expressions are Perl-compatible regular expressions, e.g. "2..|302" will match all OK codes and the redirect (302) status code. If the URL cannot be retrieved, the status is "999"."

List '401' as an accepted return code.
If you want to make sure it won't return any data without authentication, list all others as unacceptable.

Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

On 5/2/2018 10:57 AM, Root, Paul T wrote:
All they care is that the web page is up, they are not looking to login.

Xymon@xymon.com
list Paul Root · Wed, 2 May 2018 19:42:31 +0000 ·
Thanks.

-----Original Message-----
From: Xymon <xymon-bounces at xymon.com> On Behalf Of John Thurston
Sent: Wednesday, May 02, 2018 2:05 PM
To: xymon at xymon.com
Subject: Re: [Xymon] http test don't care about the authentication

Change to the httpstatus test.

httpstatus[=COLUMN];URL;okstatusexpr;notokstatusexpr

"This is used to explicitly test for certain HTTP statuscodes returned
when the URL is requested. The okstatusexpr and nokokstatusexpr
expressions are Perl-compatible regular expressions, e.g. "2..|302" will
match all OK codes and the redirect (302) status code. If the URL cannot
be retrieved, the status is "999"."

List '401' as an accepted return code.
If you want to make sure it won't return any data without
authentication, list all others as unacceptable.

    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

On 5/2/2018 10:57 AM, Root, Paul T wrote:
All they care is that the web page is up, they are not looking to login.
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Shawn Heisey · Fri, 4 May 2018 16:28:44 -0600 ·
quoted from Kris Springer
On 5/2/2018 1:29 PM, Kris Springer wrote:
Anyone know why I can run a curl test from the Xymon server command line
and get a '200 OK' status, but when I add the same httpstatus test into
the hosts.cfg it returns a '404'?
There must be some difference in the request received by the webserver.
Maybe curl does something with the request that Xymon isn't doing,
perhaps adding a / character at the end of the URL.

Check the webserver log to see how the requests are different.  Adjust
your xymon config accordingly.

In the future, please ask new questions by starting a new email, not by
replying to an email that you receive from the list.

http://people.apache.org/~hossman/#threadhijack

Thanks,
Shawn