I have received a request from Johan in the chat area about NNMi support of Collectors architecture, this is a Whiteboarding session (45 mins) on NNMi Global Network Management architecture and best practices by Pete Zwetkof (NNMi Product Manager)
I have received a request from Johan in the chat area about NNMi support of Collectors architecture, this is a Whiteboarding session (45 mins) on NNMi Global Network Management architecture and best practices by Pete Zwetkof (NNMi Product Manager)
http://www.hp.com/go/nnmi -- Jeff Conrad, NNMi developer, demonstrates the new NNMi user interface.
A very nice analysis for upgrade plan and deploy decision for Exchange 2010 on HP E 5000
Many administrators looking to automate the time consuming process, I had seen requests in HP support forums on how to change agent in bulk
I have created the below script which utilizes Policy Management and Deployment (PMAD) API which mainly starts by
set pmad = CreateObject("PMAD.OvPmdPolicyManager")
pmad.ConnectDB
We can compare the above lines by opening the Node Editor
Set node = PMAD.CreateNode(nodeGuid)The line above is locating or creating a node typically like Selecting the node you will modify the agent attributes.
createnode = node.ChangeAgent(liAgentCommType,wminode.AgentBinaryFormatId,256, "", "")
The lines above is like right click the node and select Change Agent which is executed by ChangeAgent() function which should be formatted like ChangeAgent(lAgtType,lBinaryFormat,ulOptions,sUser,sPwd)
lAgtType
- Defines the communication type of the HP Operations agent (DCE or HTTPS) that should run on the node.
lBinaryFormat
- Defines the binary format of the HP Operations agent that should run on the node.
ulOptions
- Defines the type of authentication that will be used for the operation
Which I chose PMAD_DEPL_IMPERSONATE_OPT which uses the current user this options has a hex value 0x100 and the ulOptions means unsigned long which means a non negative decimal value which means here 256
sUser
- Name of the account used to access the remote node. You can specify the account either as a user principal name (UPN such as UserName@DomainName) or in the down-level log-on name format (DomainName\UserName).
sPwd
- Password of the account used to access the remote node.
The Full script
Dim nodeName
Dim agent
Dim argsObj
Set argsObj=WScript.Arguments
If argsObj.Count=2 Then
nodeName = argsObj(0)
newAgentType = argsObj(1)
Else
WScript.echo "usage: cscript.exe ovchgagent.vbs <nodeName> <agenttype>"
WScript.Quit (1)
End If
Dim objLocator
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Dim objNode
Set objNode = objLocator.ConnectServer("", "root\HewlettPackard\OpenView\data", "", "")
objNode.Security_.impersonationlevel = 3
Dim msgquery
msgquery = "Select * from ov_managednode where primarynodename = """ & nodeName & """"
Dim objNodeList
Set objNodeList = objNode.ExecQuery(msgquery)
Dim nodeGuid
Dim wminode
For Each wminode In objNodeList
nodeGuid = wminode.Name
wscript.echo nodeguid
Next
Set wminode = Nothing
Set objNodeList = Nothing
Set objNode = Nothing
Set objLocator = Nothing
Dim pmad
set pmad = CreateObject("PMAD.OvPmdPolicyManager")
pmad.ConnectDB
If pmad.DBConnected And nodeGuid <> "" Then
Select Case newAgentType
Case "n/a":
liAgentCommType = 0
Case "DCE":
liAgentCommType = 1
Case "HTTPS":
liAgentCommType = 2
End Select
Dim node
Set node = PMAD.CreateNode(nodeGuid)
createnode = node.ChangeAgent(liAgentCommType,wminode.AgentBinaryFormatId,256, "", "")
Set node = Nothing
Else
wscript.echo "node not found or invalid, or cannot connect to database!"
End If
Set pmad = Nothing