April 23, 2014

Ports used by NNMi

Check nms-local.properties file in %NNMInstallDir%\misc\nnm\props\local for ports used by NNMi

April 2, 2014

IBM Tivoli Monitoring (ITM) and Operations Manager for Unix (OMU) Integration


SNMP emitter from ITM Hub will send all the SNMP traps to the intermediate server where HPOV Agent is hosted. This agent will parse the received SNMP trap as per the defined policy and then will forward only those events to OMU which are required to be configured. Through this filtering mechanism we can reduce the load on OMU server and will receive all the events which are required.
Policy which will be created on intermediate server will contain the rules for the specified OIDs that is required to be configured. In these rules we can defined the alert attributes i.e. alert severity, text, application, group etc. 

Installation of HP Operations Manager for Windows


February 23, 2014

Sonic Bus in BSM

In earlier versions of BAC (like 7.5 or before that) it was called BUS. Back then, it was Mercury's creation and BUS was based on C. After HP's acquisition, they decided to use an external, third-party product called Sonic BUS - based on java.

What you need to know about bus:

* Sonic bus is the bridge between your BSM Gateway and Data Processing servers
* Data from your Data Collectors (BPM, RUM, SiteScope, Diagnostics, OMW/U etc.) comes to your Gateway server and goes to the Sonic BUS. From there, different components catch the data and use it for their own purpose:
    - db_loader inserts this raw data in your Profile database, so it can be used for reports for example. Based on this data, you get aggregated data. No data from db_loader, no reports.
    - the MARBLE (former online_engine) components of BSM use the Sonic BUS to catch your data and color your views (Dashboard/Service Health).
* Sonic BUS mainly consists of two parts - Message Broker and Domain Manager. MB is located on both Gateway and Data Processing servers, whereas the DM resides only on the Data Processing one. Your data is being transferred between the MB of the two servers.
* Message Broker and Domain Manager work by default on respectively ports 2507 and 2506. Sonic BUS also uses a wide range of dynamic ports.
* Sonic BUS has its own local database (on the BSM file system) - the information that goes to it is not stored in the Database server!
* If you access your BSM servers, go to Start > Programs > Progress, you will find the Sonic BUS management console (press ok to login). From here, you can manage and view the data that is in the Sonic BUS queues.

February 12, 2014

DB2 SPI Installation & Configuration

Steps to Install and Configure DB2 SPI on HP Operations Manager for Windows/Unix/Linux

(A)   OMW Prerequisite -
1.       Disk space - 100 MB
2.       Memory - 10 MB

(B)   DB2 server prerequisite -
1.       75 MB for HP Reporter
2.       5 MB X No of Databases to be managed
3.       50 MB X No of table spaces to be managed

(C)   Installation -
1.       Install DBSPI by executing DB2SPI-x.msi
2.       Verify that DB2SPI entry is there in Add/Remove Programs
3.       Check that ATOP2 server service is there in services.msc
4.       Check Tool groups, Node groups and Policy Groups are created in OMW

(D)   Configuration –

1.       Create DB2SPI administrator using “User Roles Editor”. Select “DB2SPI Administrator Role” and add users by clicking properties.
2.       Add DB2 servers in specific DB2-Node group
3.       Assign DB2 SPI Policies to individual DB2 servers
4.       Deploy instrumentation (DB2SPI, SHS Data Collector, SPI Data Collector) on DB2 Nodes

5.       Add DBP2SPI license using tool

January 27, 2014

VBScript to terminate HP OMW console of the users disconnected from more than 1 hour

Below is the vbscript code to terminate HP OMW console of the users disconnected from more than 1 hour -


'----------------------------------------------------
' Script: Terminate_HPOM_Console.vbs
'
' Author: Amit Kumar
'
' Usage: 
'  Terminate_HPOM_Console.vbs
'
' This script will Terminate HP OMW console of the users who are disconnected from more than one hour
'----------------------------------------------------


' Set the time period to retrieve the event logs of last one hour 

Const CONVERT_TO_LOCAL_TIME = True

Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
Set dtmEndDate = CreateObject("WbemScripting.SWbemDateTime")
dtmStartDate.SetVarDate dateadd("n", -60, now)' Set the start time to 1 hour ago of current time
dtmEndDate.SetVarDate dateadd("n",0, now) ' End time is set to current time


computerName = WScript.Arguments(0) 'Name of the server to look for the disconnected sessions

Dim strCmd
    strCmd = "cmd /q /c ""quser| find /i ""Disc"" "" " 'Command that checks for the disconnected users


Set objShell = WScript.CreateObject("WScript.Shell")
Set objExec = objShell.Exec(strCmd)


Do
     line = objExec.StdOut.ReadLine()
     strOutput = line & vbcrlf
c = InStr(strOutput,"Disc")
userName = Trim(Mid(strOutput,2,7)) 'Name of the users who are found disconnected




If (userName <> "") Then 'This condition checks if any user is found disconnected


'List all the session disconnect event logs of the disconnected users that came in last one hour

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & computerName & "\root\cimv2")

Set colLoggedEvents = objWMIService.ExecQuery ("Select * from Win32_NTLogEvent Where Logfile = 'Security' and "&" EventCode = '683' and "&" Message like '%"& userName &"%' and "&" TimeWritten >= '"& dtmStartDate & "' and TimeWritten < '" & dtmEndDate & "'")

'Checks whether the user's disconnected time duration is more than 1 hour. 
'This is checked by counting the event logs and if count is found to be 0 
'it indicates that the specific user is disconnected from more than 1 hour

If (colLoggedEvents.Count = 0) Then

'WScript.echo "Terminate HPOMW console " & userName
Call KillProcess (userName,computerName) 'Call kill process function to terminate HPOM console

End If
End If

Loop While Not objExec.Stdout.AtEndOfStream


'Function to terminate HPOM Remote console of the disconnected users

Function KillProcess (userName,computerName)


Dim objWMIService : Set objWMIService = GetObject("winmgmts:{impersonationLevel=Impersonate,(debug)}!\\" & computerName & "\root\cimv2")

Dim colProcesses : Set colProcesses = objWMIService.ExecQuery("Select * From Win32_Process Where Name = 'mmc.exe'")
Dim objProcess, strUserName, strDomain, strCommandLine
For Each objProcess In colProcesses
    On Error Resume Next
    strCommandLine = objProcess.CommandLine
    objProcess.GetOwner strUserName

'Kills only the mmc process of the users disconnected from more than one hour

If (strUserName=userName) Then

'WScript.Echo strUserName
objProcess.Terminate()


    End If
     
    On Error GoTo 0
Next

End Function

HPOO database connectivity issue

Problem - Facing following issue while configuring database connectivity during HP Operation Orchestration installation -

java.sql.SQLException: Network error IOException: Connection refused: connect


Solution - Goto AllProgram->SQL Server 2008->configuraton tools->SQL Server Configuration Manager->SQL Server Network Configuration-> Select your server instance and right click on TCP/IP then goto IPAddresses. Change/Place port number for all IP's as 1433. Save it.

September 26, 2011

Recreate NNM Database

Before you start it is recommended that you have a complete backup so that
should there be any problems you can return to the status quo ante.

The steps are the following:
(1)Delete unnecessary data from the database.
(2)Unload the data from the database into a flat file.
(3)Edit the solid.ini file in order to limit the size to which the database
will grow.
(4)Delete the database.
(5)Recreate the database.
(6)Reload the data into it.


1) To delete unnecessary data from the database use the command

#ovdwevent -trim.

You can test to see what data you are about to delete using

#ovdwevent -trimnodelete

before you do it for real. For a full explanation of the options see the
ovdwevent (1) man page. However deleting data will not reduce the size of the
database file, it will simply free up space inside it. (Once you have got your
database under control you might consider setting up a cron job to delete
superfluous data on a regular basis, and thus prevent any problems caused by
the database filling up.)

2) Now unload the data from the database into a flat file with ovdwunloader.
Check the man page for a full explanation of the options. You will need to
export both the trend and event data, so you will need to run the command twice:

#ovdwunloader -file trend_output_file -trend -v
#ovdwunloader -file event_output_file -event -v

Stop OpenView
#ovstop -v

3) The default size of the database is a single two gigabytes file. You can
control the size by editing $OV_DB/analysis/default/solid.ini and setting the
FileSpec parameter in the Index File section. The FileSpec parameter describes
the location and the maximum size of the database file and accepts the
following three arguments:
database file name
max filesize
device number (optional)
You can also use the FileSpec parameter to divide the index file into multiple
files and onto multiple disks. To do this, specify another FileSpec parameter
identified by the number 2. The index file will be written to the second file
if it grows over the maximum value of the first FileSpec parameter. For example
the default value for this parameter is solid.db, 2147483647 (which equals 2 GB
expressed in bytes).
FileSpec_1=SOLID.DB 2147483647
In the following example, the parameters divide the index file on the disks C:,
D: and E: to be split after growing larger than 1 GB (=1073741824 bytes).
FileSpec_1=c:\soldb\solid.1 1073741824 1
FileSpec_2=D:\soldb\solid.2 1073741824 2
FileSpec_3=G:\soldb\solid.3 1073741824 3
NOTE. The index file locations entered must be valid path names in the server’s
operating system. For example, if the server runs on a UNIX operating system,
path separators must be slashes instead of backslashes. Although the database
files reside in different directories, the file names must be unique. In the
above example, it is assumed that C:, D: and E: partitions reside on separate
physical disks. Splitting the index file on multiple disks will increase the
performance of the server because multiple disk heads will access the data in
your index file. There is no limit to the number of index files you may use.

4) Now delete the database:

#cd $OV_DB/analysis/default

#rm solid.db
#rm solmsg.*
#rm ./log/sol*.log

5) Now recreate an empty database

#cd $OV_DB/analysis/default
#ovdbrun -x exit -u ovdb -p ovdb

#cd $OV_CONF/analysis/sqlScripts
#ovdbcheck -start
#ovdwquery -file tables_common.solid
#ovdwquery -file tables_event.solid
#ovdwquery -file tables_trend.solid
#ovdwquery -file tables_topo.solid

#ovdbcheck -stop
#ovstart -v

6) Now that OpenView is running again we need to reload the data from the flat
files into the database.
#ovdwloader -file trend_output_file -v
#ovdwloader -file event_output_file -v

July 19, 2011

Check free memory on unix server

Commands to check free memory on unix servers -

(1) vmstat 1 2 | tail -1 | awk '{printf "%d%s\n", ($5*4)/1024, "MB" }'

(2) top -h -d 1