URL Test problem

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
Guest

Post by Guest »

Hello Alex,


I'm trying to do an URL test based on the content of the page. The page shouldn't contain the words "ERROR" or "ALERT". The problem is it isn't working the way it should, even when the page has the words hostmon does not change the status to bad.
Any ideas ?

Regards,

Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Could you provide parameters of the test (URL, options)?

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

I just sent you the URL by e-mail. The options are:

- Shouldn't contain : "Erro" or "Alert"

Regards,

Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You use wrong option: Shouldn't contain: "Erro" or "Alert". If you want to check more than one string constant, set "Use expression: not ("Erro" or "Alert")" option.

BTW: I have checked URL and I see your page contains static script with words "Alerta", "Sucesso", "Erro". So, HostMonitor will set status to "Bad context".
HostMonitor does not look on page like people, it checks source code of the page.

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

Tanks for your help. I'll try to test using SQL querie instead.


Regards.

Jromariz.
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

How can I test a page for the presence of this string (var strOverallStatus = "Sucesso")? Notice that the string already contains double quotas on it. I have tried but always get bad result.

Thanks,

Regards.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Use "should contain" or "shouldn't contain" option. HostMonitor process quotation mark only when you set "use expression" option. And even in case of expression there is solution: '(var strOverallStatus = "Sucesso")'

Regards
Alex
Locked