Search and Replace

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).
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Search and Replace

Post by V Arun »

Alex,

I would like to search for a particular sting in all comment lines of all tests and replace it with another string where found. How do I do it?

For ex. 'Arun' might be in a commentline in 50 tests. I like to replace it with 'Alex' OR even delete it.

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

Post by KS-Soft »

If you know # of the comment line, you may use HM Script and ReplaceTestParam action
www.ks-soft.net/hostmon.eng/mframe.htm# ... #actScript

Also you may export tests using menu "File" -> "Export to text file", then modify test settings using any text editor and import new settings using menu "File" -> "Import from text file"
Note: I would recommend to use "Modify" ImportMode
www.ks-soft.net/hostmon.eng/examples/import1.htm

Regards
Alex
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Alex,

This procedure appears cumbersome. My situation is like this. For ex. commentline2 of all tests contain some names like abc, def, xyz etc. 'def' may appear in 100 out of 200 total tests. I just need to replace 'def' with 'klm' wherever it appears but keeping 'abc' & 'xyz' intact.

We enter mobile numbers OR email addresses in this commentline for SMS alerts. We need to do this pretty often due to rotating staff and need a simple procedure.

Highly appreciate.

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

Post by KS-Soft »

We need to do this pretty often due to rotating staff and need a simple procedure.
Then you would recommend to use global macro variables.
http://www.ks-soft.net/hostmon.eng/mfra ... m#udvmacro

Regards
Alex
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Was already thinking on those lines :). I have a common mail action profile where i customize the recepients of that particular test in commenline2.
Is the below scenario permitted ?

"To" field in mail action profile = %commentline2%
commentline2= %udv_network%
udv_network= %alex%, %arun%
udv_alex= %12345%
udv_arun= %67890%

Is there any limitation on the number of user defined variables that can be created? Are these stored in an accessible text file? Is it possible to search and replace udv parameters?

Regards,
Arun.
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

sorry for the typo earlier..

udv_network= %udv_alex%, %udv_arun%
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Is the below scenario permitted ?
"To" field in mail action profile = %commentline2%
commentline2= %udv_network%
udv_network= %udv_alex%, %udv_arun%
udv_alex= %12345%
udv_arun= %67890%
Yes, this should work
Is there any limitation on the number of user defined variables that can be created?
Everything is limited in this word. I think you may create up to 2147483646 variables.
Are these stored in an accessible text file?
No
Is it possible to search and replace udv parameters?
Search and replace? No. But you may set variables automatically using HM Script

Regards
Alex
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Thanks Alex.

I still feel it would be a great feature to have some kind of GUI or a better way to create, mangage and arrange UDVs. It would be really helpful.

Highly appreciate.

Regards,
Arun
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

V Arun wrote:I still feel it would be a great feature to have some kind of GUI or a better way to create, mangage and arrange UDVs. It would be really helpful.
Actually, GUI has been implemented a while ago. You may manage and arrange UDV variables using menu "Profiles" -> "Global Macro Variables".

Regards,
Max
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Hi Max,

This is what we have been using so far. :)

My request is for a facility to drag and drop different objects into different groups. Before deleting any object, good to have a warning where it is currently being used. Also, these variables to be available while editing test properties. For ex. email OR sms recepients of a particular test is defined in Commentline1 of that test. When I goto Commentline1, it would be nice to call the list of UDV groups there and apply through drag and drop facility.

Something like this would be a great feature.

Regards,
Arun
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

V Arun wrote:When I goto Commentline1, it would be nice to call the list of UDV groups there and apply through drag and drop facility.
I will support this feature request as well.. Especially with global macros, since I have otherwise have to remember these.. :-)

With standard macros its different, since these can be seen through Help whereever you are..

But, drag and drop from standard macros would also be nice to have feature... :P
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Probably we can implement some "expression editor" :roll:

Regards
Alex
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Yes... An expression editor would be great to begin with. Will be eagerly waiting for one.. :)

Thanks Alex,
Arun
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

V Arun wrote:Yes... An expression editor would be great to begin with. Will be eagerly waiting for one.. :)
This feature has been already implemented in version 7.06
Quote:
http://www.ks-soft.net/hostmon.eng/news.htm
=======================================
HostMonitor and RCC: there are special buttons in Test Properties dialog that allow you to bring up special "Expression editor" window for "Warning", "Normal", and "Tune up Reply" expressions editing. Expression editor shows list of standard and user defined macro variables, also it allows each operator to create his own "favorite" list of variables. There are buttons that allow you to filter standard macro variables by category.
Several menu items help to work with variables (popup menu appears when you click right mouse button on macro variable in the list):

* Insert into expression (equivalent to double click on the variable)
* Add variable to favorites (Ctrl+C)

Favorite variables can be moved up (Ctrl+Up) and down (Ctrl+Down) or sorted alphabetically
=======================================

Version 7.06 is available to download at our site: http://www.ks-soft.net/hostmon.eng/downpage.htm

Regards,
Max
V Arun
Posts: 52
Joined: Sun Apr 11, 2004 11:17 pm

Post by V Arun »

Can the expression editor be made available at other places. For ex.

1. Inserting expressions into Commentlines
2. Inserting into 'To' or 'Sub' field of mail action profiles. etc.

Also, it would be a great feature if we could create new variables or edit/modify existing ones using the same editor.

Thanks,
Arun
Post Reply