Tag: Scripting
OMW: Script to Change Agent from DCE to HTTPs Part2
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… Read More »
OMW:Read Multi-lined log files
I had seen so many questions about joining multiline log as in OMW the Log Interceptor is parsing line by line, so if your data is scattered on different lines it can not be monitoring unless you imply a pre-processing script. I have created the below script is to join multiple lines together but… Read More »
OMW: Log file monitor for multiple log files
To monitor multiple files using a OMW log file monitor policy, you have to configure the policy to list those files separated by spaces. Normally in Unix-based systems if you used ls command with wildcards, the result will be the full files path and separated by spaces In Windows, dir is not delivering the same… Read More »
OMW: Alert when files are older than 30 minutes Part 1
1- Create the needed script This script is listing the files that are located in certain directory cscript /nologo checkolderfiles.vbs abc c:scripts list I have added two features for the script One is to display list the files which are not modified within the time specified file1.txtfile2.txtlistfiles.vbs Second is to use opcmon to with a… Read More »
OMW: List files on folder that didn’t modified within 30 minutes Part 2
nodeName = “.”Set dateTime = CreateObject(“WbemScripting.SWbemDateTime”)dateTime.SetVarDate( DateAdd(“n”,-30,now()))Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\” & nodeName & “rootcimv2”)Set colFiles = _ objWMIService.ExecQuery(“Select * From CIM_DataFile Where Drive = ‘C:’ and Path = ‘\Scripts\’ “) ‘Wscript.Echo colFiles.Count ‘echo number of filesFor Each objFile in colFiles IF objFile.LastModified < dateTime.Value Then strNewFile = objFile.FileName & “.” &… Read More »
OMW: Modify the Heartbeat settings for Managed Node
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… Read More »
List all policies deployed on your OMW Managed Nodes
Lots of questions has been raised during last few weeks in ITRC about OMW Nodes – Policies relationshipOne of the questions was about how to list all Policies assigned for certain node or all nodesthe answer was typically there is a default report built-in HP ReporterThis report is called OVO/Windows 7.5 ConfInstalledPol “OVO/Windows 7.5 Installed… Read More »
List all nodes from OMU server using opcnodes
By default OMU-L have a utility to control node management called opcnode it is similar to ovonodeutil.bat in OMW You can use this tool to list all nodes like /opt/OV/bin/OpC/utils/opcnode -list_nodes But, in one of ITRC questions the Question Author request to get only the node name which falls under certain OS type I made… Read More »
Get Network Utilization Using VBs script
Last week I have faced challenge in responding to HP support (ITRC) thread regarding collecting Network utilization for Operation Manger to evaluate it against threshold. Infrastructure SPI contain some policies for Monitoring network utilization but it is quite complicated (but efficient) as it has various mathematical calculations. Any way the script I have provided was… Read More »
Copy Files using VBS
—–copyfiles.vbs—- Dim nodeName Dim argsObj Set argsObj=WScript.Arguments If argsObj.Count=1 Then nodeName = argsObj(0) Else WScript.echo “usage: cscript.exe copyfiles.vbs <nodeName>” WScript.Quit (1) End If Set objWMIService = GetObject _ (“winmgmts:\” & nodeName & “rootcimv2:Win32_Process”) errReturn = objWMIService.Create _ (“cmd.exe /c md c:Temp”, Null, Null, intProcessID) Wscript.Echo errReturns Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\” &… Read More »