Login with Facebook

Monday, March 21, 2011

OMW:Enable Automatic Instrumentation Deployment

 

In the same namespace where you enabled Policy Deployment allows you to control the Auto deployment of the instrumentation, this can be allowed thought

In the console tree, right-click Operations Manager
Configure –> Server

image
Select "Policy Management and Deployment"
Select "Enable Automatic Instrumentation Deployment" change the Value to True.

 

image

Whenever Deploy a policy, the system will check for a Property called Category assigned to the policy and it will try to find that category under %ovdatadir%\shared\Instrumentation\Categories  on the management server and deploy the related tools to that node.

Sample:

Database SPI policies has the category Database_Monitoring you can easily locate the attribute in the list view of the policies under the Policy Management Node in OMW Console or the Properties page of the policy

 

image

image

Once this policy is deploy the folder contents %ovdatadir%\shared\Instrumentation\Categories\Database_Discovery will be deployed to the node (you may have sub-folders if you want different files to be deployed based on the Operating System Types / Versions / OSbits)

image

This article is created in response to ITRC Question below

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1473794

Wednesday, March 16, 2011

Script for creating nodes in OMW

Copy and paste the script below as createNodes.vbs
If Wscript.Arguments.Count < 1 Then
'Check that you spacified the nodes filename
wscript.echo "Usage cscript createNodes.vbs ""filename"" "
wscript.echo "Ex:"
wscript.echo "cscript createNodes.vbs ""c:\nodelist.txt"""
Else
Set args = WScript.Arguments
arg1 = WScript.Arguments.Item(0)

Set CSVoFS = CreateObject("Scripting.FileSystemObject")
nodesFile = arg1
Set file = CSVoFS.GetFile(nodesFile)
Set line = file.OpenAsTextStream(1,TristateUseDefault)
Do While line.AtEndOfStream <> True
myLine = Split(line.ReadLine,",")
nodeName= myLine(0)
call createNode()
Loop

End if

Function createNode()
Command = """D:\Program Files\HP\HP BTO Software\bin\ovownodeutil.cmd"" -add_nodewithtype -node_name " & nodename & " -ostype ""AIX"" -osversion ""5L 5.3"" -systemtype ""Power PC Family"" -osbits ""32"" -agent_bin_format ""PowerPC"" "
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(Command)
Wscript.Echo "The output of the command: " & Command
Do While Not oExec.StdOut.AtEndOfStream
commandoutput = oExec.StdOut.ReadLine()
Wscript.Echo commandOutput
Loop
End Function


Create a text file for example nodes.txt


node1.mahmoudthoughts.com
node2.mahmoudthoughts.com
node3.mahmoudthoughts.com

 

To ensure the script will work in your OMW version, change the path for ovownodeutil.cmd  located on line 22


The sample script is for creating AIX nodes only


To create any nodes open the Node Properties for a node with the same version and get the values located in the system tab and modify line 22 as per the red marks.


image_thumb2


Run

cscript createNodes.vbs nodes.txt

Friday, March 4, 2011

Monitor Unix processes in HP OM

Monitor the processes by several ways.

1-Log File Monitor
Configure the policy with pre-processing enabled to execute your script that direct the output to a text file and based on pattern matching rules, fetch the number of the processes.

2-Threshold Monitoring Policy
Where you have to create Measurement Threshold monitoring to launch a script and send the number of process instances along with opcmona.

3-Use the OSSPI built-in monitoring script to reach your goal as stated in your original question.

1- Monitor process using log file policy

Create Log file monitor policy
Leave log file location as empty
Enabled pre-processing option and for the field of command to be executed put your script
ps -ef | grep processname | grep -v grep | wc -l > /tmp/processname
Type the /temp/processname on the file to be read field
Note: replace the "processname" with the process you are looking for.
Create rule to look for value 0 to send you alert and for <!0> to send you the process is working

2- Monitor process using Measurement Threshold policy


Create a Measurement Threshold policy and name it with the process name
Select program as source and type
"processmonitor.sh policyname processname"
Note: replace the policyname and process name to match the exact policy name and process name.

Create minimum rule if processes are less than 1 then alert to be generated to as process is down

 

Create the following script and distribute it to the nodes (best option to distribute it as instrumentation)

---------processmonitor.sh--------
opcmon=$OVINSTALLDIR/bin/opcmon
policy=$1
process=$2
count=$(ps -ef | grep $process | grep -v grep | wc -l)
$opcmon $policy=$count
----------------------------------

3- Monitor Process using OSSPI.

Ref: Unix OS SPI Admin Guide http://support.openview.hp.com/selfsolve/document/KM14827/binary/UNIXOS-SPI_a35_AdminRef_pdf Page 86

The answer to your original question:
In OSSPI process monitor there is two files used for this:
1st one is created automatically called procmon.cfg and is created by "OSSPI-AutoDiscovery" policy and it is called discovery application
You can modify this file to add more processes but I am not sure if it will be overwritten by the re-discovery
2nd file is called procmon_local.cfg this can be manually created and it will not be overwritten by re-discovery, that's why you see everybody using it.

The file syntax is typical to procmon.cfg; also check the admin guide for more details.
[Process]
/path/to/process *

Also you can add processes by tools available in the OSSPI Process Monitoring application group to edit the process monitor configuration file.


After you add your processes
You can create a copy of any OSSPI process monitor template like "OSSPI-cronproc" and give it a new name and ensure that the program name in this policy to replace policy name and process name to match your own "osspi_perl.sh osspi_procmon.pl OSSPI-cronproc cron" with "osspi_perl.sh osspi_procmon.pl PolicyName Processname"

Thursday, March 3, 2011

Check OM Oracle DB Status

 

To check the database:
#su - oracle
Verify that ORACLE_HOME and ORACLE_SID are set correctly.

Check status by command tnsping:
$
tnsping ov_net

Check status by SQL query:

$ORACLE_HOME/bin/sqlplus /nolog
SQL> connect / as sysdba
SQL>

   1: set lines110
   2: col strtd hea 'STARTED'
   3: col instance_name for a8 hea 'INSTANCE'
   4: col host_name for a15 hea 'HOSTNAME'
   5: col version for a10
   6: select instance_name, version, host_name, status
   7: , database_status, to_char(startup_time,'DD-MON-YYYY HH:MI:SS') strtd
   8: from v$instance;

SQL> exit

Start the database:


$ORACLE_HOME/bin/sqlplus /nolog
SQL> connect / as sysdba
SQL> STARTUP MOUNT
SQL> exit

Usually default database setting is as below:
ORACLE_SID is [openview]
Password of Oracle user 'system' is [manager]
Oracle Service name is [ov_net]


Screenshot-1

OMU - Linux-2011-03-03-03-02-37

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1471367

Wednesday, February 23, 2011

Tuesday, February 15, 2011

Egypt: The camp that toppled a president

This is how Egyptians protests

All rights to http://www.bbc.co.uk/news/world-12434787

Egypt: The camp that toppled a president

Cairo's central Tahrir Square was the focal point for anti-Mubarak protesters during 18 days of demonstrations. As the protest neared its peak, the BBC's Yolande Knell took a tour of the area. Explore the protesters' camp by clicking on the links.

CLICKABLE Find out more..

Tanks

Throughout the demonstration, protesters have sat and slept around tanks parked near the Egyptian Museum, to prevent the army from advancing into the square.

Street clinic

This "street hospital", staffed by volunteer doctors, is one of several clinics where injured protesters have their wounds treated. Since Egyptians do not typically have access to free medical care, some say the clinics in the square are an improvement on what they are used to.

Flag sellers

A whole economy has grown up in the square since the protests began. Street vendors sell flags and hats in the colours of the Egyptian flag. A large flag costs five Egyptian pounds (about 50p).

Food stalls

This bean seller is one of many food vendors who have set up stalls inside the barricades. Protesters have also taken over the Hardees fast food restaurant, where they give out free bread and cheese.

Rubbish bins

Egypt has no formal system of recycling so the demonstrators have set up their own, as part of efforts to keep the square clean.

Artwork

This artwork, "Egypt's Heart", is one of many created by the demonstrators. The heart faces down one of the streets through which pro-Mubarak supporters came to clash with the anti-government protesters. Many visitors have had their photographs taken next to the heart.

'KFC clinic'

This Kentucky Fried Chicken fast food restaurant has been taken over by protesters and turned into a clinic for the injured and the sick.

Newspaper wall

Every morning Egypt's main newspapers are pasted up on the shutters of this shop, allowing protesters who cannot afford to buy a paper can still follow the latest reports, says our correspondent.

Pharmacy

This pharmacy near the main stage is helping campers and visitors keep clean and healthy. Some of the supplies are being given out for free.

Campsite

Though the majority of demonstrators go home each evening, a hard core have set up campsites on the roundabout, pavements and grass verges. Some sleep in tents, while others shelter under plastic sheets and rugs draped across pathways.

Wall of martyrs

Memorials of protesters who died during the uprising have been erected at the "wall of martyrs". Friends of the victims put up pictures and accounts of how they died. Some are very graphic and accuse the police of brutality.

Toilets

The camp toilets are here in a shed formerly used by construction workers near the Egyptian Museum. After 18 days, the smell is quite incredible.

Kindergarten

Schools in Cairo have been closed during the protests. But there are so many mothers who want to attend the demonstration that many bring their children here - to a kindergarten organised by the demonstrators.

Bloggers

Egypt's internet activists have played a key role in the pro-democracy protests and many are camped together on the roundabout in the centre of the square.

Water point

Drinking water is not easy to come by, so protesters have been filling their bottles at this water point beside a construction site.

Main stage

This platform has become a kind of "Speakers' Corner" for protesters to call comrades to action and pay tribute to those who have died during the demonstrations. The white screen is used to project televised speeches by the government and the army.

-

Tuesday, February 1, 2011

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 relationship
One of the questions was about how to list all Policies assigned for certain node or all nodes
the answer was typically there is a default report built-in HP Reporter
This report is called OVO/Windows 7.5 ConfInstalledPol "OVO/Windows 7.5 Installed Policies per Node"
You can also rerun the report as Excel.
367640
But the issue is sometimes you need a report for  a certain node or all nodes and HP Reporter requires certain configuration (very easy) but I have given also another solution
To list all policies deployed on nodes based on latest Policy Synchronization