Forum Discussion

Brian_Saunders1's avatar
Brian_Saunders1
Icon for Altostratus rankAltostratus
Oct 10, 2013

HTTP Web Login Health Monitor

Hello all,

 

I'm pretty new with cURL and using that syntax with creating health monitors to validate whether nodes are available or not. The type of health monitor I am looking to create is one that validates that a user account is able to log into a website. Based off of research I created the following cURL statement and was able to validate it works in my environment:

 

Code curl -v http://10.10.10.10/Home/Logon?ReturnUrl=%2F -d "UserName=DummyUser&Password=Test1234&RememberMe=false"

When I enter that command within bash it returns a "302 Found". If I enter a bad password it returns a "200 OK" message. So how do I go about making this a health monitor? Also is the only way to send this data as encrypted to enable 443 on the server? At the moment that port is not open.

 

Cheers,

 

Brian

 

4 Replies

  • I believe it'll look like this;

    POST /Home/Logon?ReturnUrl=%2F HTTP/1.1\r\nHost: 10.10.10.10\r\nConnection: Close\r\n\r\nUserName=DummyUser&Password=Test1234&RememberMe=false

    Yes, for it to be encrypted you'll need to use server-side SSL and switch to a HTTPS monitor.

  • So I tried the following:

     

    Code POST /Home/Logon?ReturnUrl=%2F HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\nUserName=VIPTest&Password=Tech1234&RememberMe=false
    

     

    But it's giving me an HTTP Error 400:

  • The format I've provided may not work with telnet but it should when configured as a health monitor. Also, note you are either using an uppercase O or a zero in 'Logon' which may also be an issue.