View previous topic :: View next topic |
Author |
Message |
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 1:35 am Post subject: URL (HTTP) use expression |
|
|
Hi, Alex!
I use HostMonitor v.9.90.
I have 3 situation.
1. If I try use URL test from Active RMA agent
URL = http://ya.ru:80
I have Status- Host Alive
2. If I try use URL test from Active RMA agent
URL = http://ya.ru:80
with advanced flag "Check contents" and "use expression" with value
'HTTP' and '200' and 'Ok'
I have Status- Host Alive
3. If I try use URL test from Active RMA agent
URL = http://ya.ru:80
with advanced flag "Check contents" and "use expression" with value
'HTTP/1.1' and '200' and 'Ok'
I have Status - Bad contents
Please help resolve this problem with expression.
Mike. |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 2:04 am Post subject: |
|
|
4. situation
if 'HTTP' and '201' and 'Ok' - I have Status Host is Alive.
5. situation
if 'HTTP' and '2015' and 'Ok' - I have Status Bad contents - Why? |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed May 13, 2015 2:11 am Post subject: |
|
|
URL request does not check HTTP header contents.
It can check only HTTP page content.
Your page contains "class="i-flashcookie ", "/2000/svg" and "<head xmlns:og="http://" strings, but it does not contains "HTTP/1.1" word.
If you need to use URL request test, you may use "Use Warning Status if" option (located on "Test properties" dialog) with expression like the following:
%HTTPCode%<>200
Or, you may use HTTP test. It can check HTTP headers.
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mframe.htm#tests.htm#http |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 2:23 am Post subject: |
|
|
If you need to use URL request test, you may use "Use Warning Status if" option (located on "Test properties" dialog) with expression like the following:
%HTTPCode%<>200
Thank's! It's working!
I have any question.
I try test HTTP on Active RMA (Windows). I set on RMA agent on field Enable the following actions - flag HTTP request.
URL=http://www.ya.ru
Request=HEADER
In Hostmonitor I have Status Unknown and Reply not implemented.
I not check while in HTTP test properties flag Check header.
I tried button Test - and recieve -
Test status:Host is alive
Error code:0.
But in Hostmon status Unknown and Reply not implemented? |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 2:54 am Post subject: |
|
|
I did not undestand what happend. I created another URL request and set Use Warning status if = %HTTPCode%<>200
I have Warning Message - missed operand in expression: <>200
Why? What I did bad? |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed May 13, 2015 3:04 am Post subject: |
|
|
If it's new ,just created test, use quotes in expression:
'%HTTPCode%'<>200 |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 3:07 am Post subject: |
|
|
Thank's. in quoites it work!
And what I must do with HTTP test? |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed May 13, 2015 3:24 am Post subject: |
|
|
HTTP test may check HTTP header directly using your expression:
'HTTP/1.1' and '200' and 'Ok'
Just open "Adbanced..." settings of Test properties dialog (HTTP test), mark "Check header", select "use expression" and provide your expression. e.g.:
'HTTP/1.1' and '200' and 'Ok' |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 3:31 am Post subject: |
|
|
I try test HTTP on Active RMA (Windows). I set on RMA agent on field Enable the following actions - flag HTTP request.
URL=http://www.ya.ru
Request=HEADER
In Hostmonitor I have Status Unknown and Reply not implemented. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed May 13, 2015 3:45 am Post subject: |
|
|
Sorry, HTTP test is not supported by RMA. |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 6:03 am Post subject: |
|
|
it is planned to make? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed May 13, 2015 6:06 am Post subject: |
|
|
low priority task (there is URL test supported by RMA and usually you don't need agents for HTTP checks - this protocol opened on most firewalls)
Regards
Alex |
|
Back to top |
|
|
Mikevirtu
Joined: 01 Mar 2014 Posts: 41
|
Posted: Wed May 13, 2015 6:11 am Post subject: |
|
|
I have problem with certificate. I use URL test and test host by IP
https://192.168.0.1
I use "Use Warning status if = '%HTTPCode%'<>200"
and recieve Warning.
Test working from active RMA.
I checked in Advanced
HTTP/HTTPS:Code 302 (redirect) is Ok
HTTPS:Ignore unknown certificate authority problems
HTTPS:Accept certificates with invalid host name
HTTPS:Accept certificates with invalid dates
despite this I get - Warning.
Please help me.
Thank's.
Mike |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed May 13, 2015 6:37 am Post subject: |
|
|
What HTTP code returned by server?
What status do you see with disabled "use warning status" option?
Regards
Alex |
|
Back to top |
|
|
|