KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

URL (HTTP) use expression
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 1:35 am    Post subject: URL (HTTP) use expression Reply with quote

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
View user's profile Send private message
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 1:54 am    Post subject: Reply with quote

Responce from server by use IP-TOOLs(Tools - HTTP) below.
Requesting ya.ru .. Ok
Reply received (reply time: 112 ms)
-----------------------------------
HTTP/1.1 200 Ok
Server: nginx
Date: Wed, 13 May 2015 06:44:43 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 10011
Connection: close
Cache-Control: no-cache,no-store,max-age=0,must-revalidate
Expires: Wed, 13 May 2015 06:44:43 GMT
Last-Modified: Wed, 13 May 2015 06:44:43 GMT
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' https://yastatic.net *.yandex.ru yandex.ru *.yandex.net https://*.yandex.ru https://yandex.ru https://*.yandex.net yandex.st yastatic.net *.yastatic.net ws://portal-xiva.yandex.net wss://portal-xiva.yandex.net wss://push.yandex.ru; img-src data: 'self' https://yastatic.net *.yandex.ru yandex.ru *.tns-counter.ru *.gemius.pl https://*.yandex.ru https://yandex.ru https://*.tns-counter.ru https://*.gemius.pl yandex.st *.yandex.net yastatic.net *.yastatic.net; report-uri http://www.yandex.ru/log/csp?from=yaru.ru&showid=22904.16264.1431499483.21587&h=u57&yu=2537527181431499483;
P3P: policyref="/w3c/p3p.xml", CP="NON DSP ADM DEV PSD IVDo OUR IND STP PHY PRE NAV UNI"
Set-Cookie: yandexuid=2537527181431499483; Expires=Sat, 10-May-2025 06:44:43 GMT; Domain=.ya.ru; Path=/
X-Frame-Options: DENY
X-XRDS-Location: http://openid.yandex.ru/server_xrds/
Back to top
View user's profile Send private message
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed May 13, 2015 2:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 2:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 2:54 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed May 13, 2015 3:04 am    Post subject: Reply with quote

If it's new ,just created test, use quotes in expression:
'%HTTPCode%'<>200
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 3:07 am    Post subject: Reply with quote

Thank's. in quoites it work!

And what I must do with HTTP test?
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed May 13, 2015 3:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 3:31 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed May 13, 2015 3:45 am    Post subject: Reply with quote

Sorry, HTTP test is not supported by RMA.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 6:03 am    Post subject: Reply with quote

it is planned to make?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Wed May 13, 2015 6:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Mikevirtu



Joined: 01 Mar 2014
Posts: 41

PostPosted: Wed May 13, 2015 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Wed May 13, 2015 6:37 am    Post subject: Reply with quote

What HTTP code returned by server?
What status do you see with disabled "use warning status" option?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index