Login with Facebook

Monday, March 21, 2011

Using VMware vSphere Client to connect to VMware Server

In Jan 2009 I created an article on How to use the Virtual Infrastructure Client to connect to VMware Server 2.0

Today, I hade another challenge where I want to use the latest client tool which is VMware vSphere Client to connect to an VMware Server it will give you the error below

image

image

image

 

"The required client support files cannot be retrieved from the server"
"The login process will now exit"
"Details: The server could not interpret the client's request. (404 not found)"


Solution was found in this link http://www.linux.com/community/blogs/accessing-vmware-server-2-with-vsphere-client-the-unsupported-way.html and simply download a rar file Here's a link expand the contents in the “Virtual Infrastructure Client” folder in Program files folder and rerun the tool it will work perfectly.


Note: This is not supported by VMware.

HP Software for IT Operations

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