Specify "Use 'Normal' status if" in an import file

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
kevinkenny
Posts: 16
Joined: Tue Jan 12, 2010 2:44 pm

Specify "Use 'Normal' status if" in an import file

Post by kevinkenny »

Following up from my previous question Configure HTTP test to go bad only on 503 status.

We're generating and importing tests automatically using an "Execute HMS script" action and executing the ImportFromFile command, for example:

Code: Select all

; We use a Http test to poll a web page that returns a single value uniquely identifying the site
; value is stored in %HttpPage% 
;
; Generate import file 
ExecuteProgram 10000 c:\testgen\TestGenerator.exe -domainid:%HttpPage% -action:add

; Now import the test
ImportFromFile c:\testgen\Import.txt SkipDuplicates  WriteLog

; Save and done
SaveTestList 
In the import file I need to be able to configure the "Use 'Normal' status if" option and set it to "%HttpCode%<>503". I don't see a way of doing this.

I also don't see a way of setting this in HMS either. Is this possible?

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

Post by KS-Soft »

Add 2 lines into test description
UseNormal = Yes
NormalExpr = %HttpCode%<>503

Regards
Alex
kevinkenny
Posts: 16
Joined: Tue Jan 12, 2010 2:44 pm

Post by kevinkenny »

Thanks Alex.

Is there a full list of the parameters you can use, I couldn't find that documented.

There's the sample import file but those two parameters aren't listed.

Kevin

KS-Soft wrote:Add 2 lines into test description
UseNormal = Yes
NormalExpr = %HttpCode%<>503

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

Post by KS-Soft »

We change list of parameters all the time...
If you want to find some parameters, you may export such test into text and check the file.

Regards
Alex
kevinkenny
Posts: 16
Joined: Tue Jan 12, 2010 2:44 pm

Post by kevinkenny »

Yes I just realised I could export in text format and see how they are constructed :)

Thanks again
Kev

KS-Soft wrote:We change list of parameters all the time...
If you want to find some parameters, you may export such test into text and check the file.

Regards
Alex
Post Reply