Recently I decided to post my replies in HP Support Forum here in my blog to enrich the internet with the direct answer to the question I may also attach some screenshots..
The question was about changing Hearbeat settings for OMW Nodes..
The settings are actually located under system tab in the node properties page
I will use WMI to handle this case
This WMI class is located under WMI namespace “rootHewlettPackardOpenViewdata”
dealing with WMI in VB scripting is quite straightforward, although the scripts may look different
The code below is simple to connect to WMI on the local machine and direct the code to the namespace mentioned above
The next section is to find the node where we want to modify in list of Instance of the ov_managedNode class so as long as we may use the full node name there is attribute contain this data called primarynodename so we will use a WQL to locate node(s) matches our select criteria and we will execute the query by objNode.ExecQuery() function
but in the query about you may notice nodeName which is a variable where you my add it as argument while executing the script where we defined the nodeName as the 1st argument identified as Item(0)
And finally to change the value of any attribute you need to locate the attribute name and its possible values and use .put to write your changes.
So in the example below the attribute is HeartBeatMode and the values are from 0 to 4 where each number mean certain item in the drop list in the heartbeat settings like the below.
|“0 = HeartBeatDisabled “
“1 = AgentPollingOnly “
“2 = ICMPPollingOnly “
“3 = HeartBeatEnabled “
“4 = UseSystemDefault ”
Also I decided to give the user the ability to tyoe the number in the command line as a second argument that’s why I defined --- heartbeat = WScript.Arguments.Item(1) ---
|wmiNode.HeartBeatMode = heartbeat
----the full script----
After saving the script in .vbs file you may name it disableheartbeat.vbs
Type the following command on your OMW server where you saved the .vbs file
cscript.exe disableheartbeat.vbs <nodename> <heartbeatnumber>
heartbeatnumber as below
0 = HeartBeatDisabled
1 = AgentPollingOnly
2 = ICMPPollingOnly
3 = HeartBeatEnabled
4 = UseSystemDefault
This was a quick overview on the script details, so please accept any typos, grammar mistakes , or unclear information and feel free to use the facebook comments plugin to have a better communication…
Waiting for your feedback.