HMScript problems

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
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

HMScript problems

Post by argis »

I'm trying to change some test parameters using HMScript but I'm having trouble with some of them.
Is it possible to change SNMP profiles and status processing parameters using test groups? I'm trying to use the following but I'm having no success.
I don't get any error messages and the userlog shows it executed without errors.

Code: Select all

SetCurrentFolder Root\Servers\Server1
ReplaceTestParam _AllFreeSpace Profile "public v2" Custom_v2

SetCurrentFolder Root\Servers
IncludeSubFolders yes
SetTestParam _AllPerfCounter UnknownIsBad no
SetTestParam _AllPerfCounter WarningIsBad no
SetTestParam _AllPerfCounter UseWarning yes
SetTestParam _AllPerfCounter WarningExpr "'%SuggestedReply_Integer%' < 86400"
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think there are no such parameters.
Where did you find parameters like UnknownIsBad, UseWarning, WarningExpr?
May be there is mistake somewhere in the manual?

As I see manual lists the following parameters
- timeout
- retries
- username
- password
- comment
- commentlineNN
- testinterval
- AlertProfile
- AlertProfile2
- Schedule
- TestBy
- Threshold
- ThresholdUp
- Threshold2
- ThresholdDown
- usecommonlog
- reversealert
- unknownasbad
- warningasbad
- syncmastercounters
- syncmasterstatus

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

I exported a device that was working the way I wanted it, and assumed everything was a valid parameter name. Looks like I assumed a bit too much. :)
What's the quickest way to edit a large number of devices in a case like this?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May be just change SNMP profile settings without changing test settings?

Also you may export test settings into text file (menu File->Export..), open this file in any text editor, Find&Replace parameter you need, add ImportMode = Modify line on top, then import test settings (menu File->Import..)

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

Post by KS-Soft »

Regarding UnknownAsBad, WarningAsBad options and expressions - you may use HMScript or GUI (select set of tests, click Edit button, modify settings, click Ok)

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

Also you may export test settings into text file (menu File->Export..), open this file in any text editor, Find&Replace parameter you need, add ImportMode = Modify line on top, then import test settings (menu File->Import..)
Thanks Alex, I'd missed that option but it looks like exactly what I need.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are welcome

Regards
Alex
Post Reply