BusinessObjects Board

How To: XI3 Windows Monitoring

There are a number of discussions re monitoring XI3 so I thought it best to just list some options.
Note: these solutions all require additional work so choose wisely as to which strategy to adopt in investing your time and effort.

First understand what is running :yesnod: :
Use Task manager or Process Monitor or Process Explorer:

SAP/BOE Monitoring
The download contains a document as to using MOMS, Tivoli and Probes - read this document irrespective of which strategy you adopt as it also provides some generic pointers as to setting up a monitoring strategy as well as including some useful guides as to what can be monitored.
https://www.sdn.sap.com/irj/boc/index?rid=/webcontent/uuid/b08e88db-7a98-2b10-8bbd-a699b7bd0290

More on MOMS
Not many are aware of this product, but it helps to always check with your server and network support guys prior to adopting a monitoring strategy as they are sure to have some industry standard already in place. http://www.microsoft.com/systemcenter/operationsmanager/en/us/default.aspx
Quick Ref Custom Scripts:
http://www.systemcenterforum.org/wp-content/uploads/Process_monitor_in_MOM1.doc

Nagios (OpenSource)
This is an industry accepted alternative that offers a wider scope than just BOE monitoring: http://www.nagios.org/
For Windows read: http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html
There are additional addons & plugins available including a check for muliple processes:
http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed%2F1431.html;d=1

Scripts
I’m always of the opion that you can find something similar to what you want on the net, and then just customize it accordingly.
In this instance, you have to separate out service and process checks i.e. CMS and SIA, and then all your BO processes.
There are a number of service monitoring scripts around so I’ll concentrate on processes.
But here’s the kicker, you have multiple processes depending on how you’ve scaled your system i.e. multiple JobServers etc.

:mrgreen: To play around with how to access process info you can use this script which will list them:


’ Process.vbs
’ Free Sample VBScript to discover which processes are running
’ Author Guy Thomas http://computerperformance.co.uk/
’ Version 1.4 - December 2005
’ -------------------------------------------------------’
Option Explicit
Dim objWMIService, objProcess, colProcess
Dim strComputer, strList

strComputer = “.”

Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” _
& strComputer & “\root\cimv2”)

Set colProcess = objWMIService.ExecQuery _
(“Select * from Win32_Process Where Name = ‘CMS.exe’ OR Name = ‘sia.exe’ OR Name = ‘JobServer.exe’ OR Name = ‘ConnectionServer.exe’ OR Name = ‘crcache.exe’ OR Name = ‘crproc.exe’ OR Name = ‘AAAnalytics.exe’ OR Name = ‘AADashboard.exe’ OR Name = ‘fccache.exe’ OR Name = ‘fcproc.exe’ OR Name = ‘EventServer.exe’ OR Name = ‘fileserver.exe’ OR Name = ‘AAMetrics.exe’ OR Name = ‘AASPC.exe’ OR Name = ‘crystalras.exe’ OR Name = ‘AAProfiler.exe’ OR Name = ‘AAQueryMgr.exe’ OR Name = ‘WIReportServer.exe’”)

For Each objProcess in colProcess
strList = strList & vbCr & _
objProcess.Name
Next

WSCript.Echo strList
WScript.Quit

’ End of List Process Example VBScript


Multiple Processes
To extend this you can look into how to test for multiple process - there are two files (ini and vbs) and they are nagios compliant:

:mrgreen: Ini file containing the logic:


'* File : check_processes.ini
'*
'* Usage : Read from check_processes.vbs in same directory
'*
'* Syntax : Create a section for each process to monitor
'*
'* [process]
'*
'* Where is a number starting with 1 and incremented for each process to monitor
'*
'* Each section should have to parameters :
'*
'* name="<process_name>"
'* instances="<number_of_instances>"
'* criticity=""
'*
'* Where : <process_name> is the name of the process to monitor as specified in task manager
'*
'* is either “=” or “>” or “<” to specify the if the number of instances of
'* the given process should be respectively equal, higher or smaller than the <number_of_instances>
'*
'* <number_of_instances> is the number of allowed instances of the given process
'*
'*
'* is the criticity of the alarm reported to nagios if the number of
'* instances of the process is not in allowed range (WARNING or CRITICAL)
'*
'* Double quote should be used around each parameters value
'*
'* Example : [process1]
'* name=“JobServer.exe”
'* instances="<10"
'* criticity=“WARNING”
'*
'* [process2]
'* name=“fcproc.exe”
'* instances=">1"
'* criticity=“CRITICAL”
'*
'*
'* This example will report a warning alert to nagios if 6 or more processes storageArchive.exe are running
'*
'* This example will report a critical alert to nagios if process sqlserver.exe is not running
'*
'**************************************************************************************************

[process1]
name=“JobServer.exe”
instances="<10"
criticity=“WARNING”

[process2]
name=“fcproc.exe”
instances=">1"
criticity=“CRITICAL”


:mrgreen: The script you run to call the above ini file:

'********************************************************************
'*
'* Copyright (c) Pierre Gremaud : checks windows processes
'*
'* Module Name: Check_Processes.vbs
'*
'* Arguments: none
'*
'* Parameters : Read from file check_processes.ini in same directory
'*
'* Output : Nagios compatible Exit code (Ok, Warning, Critical or Unknown)
'*
'* and output message with monitored processes and results.
'*
'* Example:
'*
'* OK : JobServer.exe → (9<10);fcproc.exe → (1>0);
'*
'********************************************************************
'Global declaration

’ ON ERROR RESUME NEXT
ON ERROR GOTO 0
Err.Clear

'Constant declaration
CONST Exit_OK = 0
CONST Exit_Warning = 1
CONST Exit_Critical = 2
CONST Exit_Unknown = 3

'Creates needed objects
Set objWMIService = GetObject(“winmgmts:\.\root\cimv2”)
Set dicProcesses = CreateObject(“Scripting.Dictionary”)
Set colListOfProcesses = objWMIService.ExecQuery (“Select * from Win32_Process”)
Set filesys = CreateObject(“Scripting.FileSystemObject”)

'Gets current script path
strScriptPath=Left(WScript.ScriptFullName,Instr(WScript.ScriptFullName,WScript.ScriptName)-1)

'Creates Dictionary dicProcesses with processes and number of instances

'Loops for each processes
For Each objProcess in colListOfProcesses

strProc=Ucase(objProcess.Name)
If dicProcesses.Exists(strProc) Then

   'Increments intances number
   dicProcesses.Item(strProc)=dicProcesses.Item(strProc)+1

   Else
      'Creates new item
      dicProcesses.Add strProc,"1"
  
End if

Next

'Inits variables
strWorstStatus=“OK”
strMessage=""
i=1

Do Until RemoveQuotes(ReadINIFile(strScriptPath & “check_processes.ini”,“process” & i,“name” )) = “”

'Reads the ini file
strName = RemoveQuotes(ReadINIFile(strScriptPath & “check_processes.ini”,“process” & i,“name” ))
strInstances = RemoveQuotes(ReadINIFile(strScriptPath & “check_processes.ini”,“process” & i,“instances” ))
strCriticity = RemoveQuotes(ReadINIFile(strScriptPath & “check_processes.ini”,“process” & i,“criticity” ))

'Put everything in upper case
strName = Ucase(strName)
strInstances = Ucase(strInstances)
strCriticity = Ucase(strCriticity)

'Removes > and < signs form strInstances
If IsNumeric(strInstances) then
strOperator="="
ElseIf Left(strInstances,1)=">" then
strOperator=">"
strInstances=Right(strInstances,Len(strInstances)-1)
ElseIf Left(strInstances,1)="<" then
strOperator="<"
strInstances=Right(strInstances,Len(strInstances)-1)
ElseIf Left(strInstances,1)="=" then
strOperator="="
strInstances=Right(strInstances,Len(strInstances)-1)
Else
wscript.echo "Please specify a correct number on instances in check_process.ini file for process " & strName
wscript.Quit(Exit_Unknown)
End If

'Checks that strInstances is numeric
If NOT IsNumeric(strInstances) then

wscript.echo "Please specify a valid number on instances in check_process.ini file for process " &amp; strName
wscript.Quit(Exit_Unknown)

End If

'Checks that strCriticity is valid
If (strCriticity <> “WARNING”) and (strCriticity <> “CRITICAL”) Then

wscript.echo "Please specify a valid criticity in check_process.ini file for process " &amp; strName
wscript.Quit(Exit_Unknown)

End If

'If process does not run and is not supposed to run then OK
If NOT dicProcesses.Exists(strName) Then
If ((strOperator)="=") and (strInstances = “0”) or _
((strOperator)="<") and (strInstances <> “0”) Then

    strMessage=strMessage &amp; strName &amp; " -> (0" &amp; strOperator &amp; strInstances &amp; ");"


 'If process does not run and is supposed to run at least once then KO
 Else

   strMessage=strMessage &amp; strName &amp; " -> (0" &amp; strOperator &amp; strInstances &amp; ");"

   'updates status
   If strWorstStatus <> "CRITICAL" Then 
     strWorstStatus = strCriticity
   End If
 End If

Else

 'If the process runs and the number of instances is OK
 If ((strOperator)="=" and (Cstr(dicProcesses.Item(strName)) = strInstances)) or _
    ((strOperator)="<" and (Cstr(dicProcesses.Item(strName)) < strInstances)) or _
    ((strOperator)=">" and (Cstr(dicProcesses.Item(strName)) > strInstances)) Then

     strMessage=strMessage &amp; strName &amp; " -> (" &amp; Cstr(dicProcesses.Item(strName)) &amp; strOperator &amp; strInstances &amp; ");"

 'If the process runs and the number of instances is Not OK
 ElseIf ((strOperator)="=" and (Cstr(dicProcesses.Item(strName)) <> strInstances)) or _
        ((strOperator)="<" and (Cstr(dicProcesses.Item(strName)) >= strInstances)) or _
        ((strOperator)=">" and (Cstr(dicProcesses.Item(strName)) <= strInstances)) Then

        strMessage=strMessage &amp; strName &amp; " -> (" &amp; Cstr(dicProcesses.Item(strName)) &amp; strOperator &amp; strInstances &amp; ");"

        'updates status
        if strWorstStatus <> "CRITICAL" Then
          strWorstStatus = strCriticity
        End If

 End If

End If

i=i+1
Loop

'Cleans up a little
Set objWMIService = Nothing
Set dicProcesses = Nothing
Set colListOfProcesses = Nothing

'Treats results

If strMessage="" Then
wscript.echo “Nothing to do, please check file check_processes.ini”
wscript.Quit(Exit_Unknown)

ElseIf strWorstStatus=“OK” Then
wscript.echo "OK : " & strMessage
Wscript.Quit(Exit_OK)

ElseIf strWorstStatus=“WARNING” Then
wscript.echo "WARNING : " & strMessage
Wscript.Quit(Exit_Warning)

ElseIf strWorstStatus=“CRITICAL” Then
wscript.echo "CRITICAL : " & strMessage
Wscript.Quit(Exit_Critical)

Else
wscript.echo "UNKNOWN : " & strMessage
wscript.Quit(Exit_Unknown)
End If

’ This line should never been executed
wscript.Quit(Exit_Unknown)

Function ReadINIFile(FileName, Section, KeyName)

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim INIContents, PosSection, PosEndSection, sContents, Value, Found, INILine

‘Get contents of the INI file As a string
Set filetxt = filesys.OpenTextFile(FileName, ForReading, False)
Do Until filetxt.AtEndOfStream
INILine = filetxt.ReadLine
If Instr(INILine,"’")=0 Then
INIContents = INIContents & INILine & vbCrLf
End If
Loop
filetxt.close

'Find section
PosSection = InStr(1, INIContents, “[” & Section & “]”, vbTextCompare)
If PosSection>0 Then
'Section exists. Find end of section
PosEndSection = InStr(PosSection, INIContents, vbCrLf & “[”)
'Is this last section?
If PosEndSection = 0 Then
PosEndSection = Len(INIContents)+1
End If

'Separate section contents
sContents = Mid(INIContents, PosSection, PosEndSection - PosSection)

If InStr(1, sContents, vbCrLf &amp; KeyName &amp; "=", vbTextCompare)>0 Then
  Found = True
  ' Separate value of a key.
  ReadINIFile = SeparateField(sContents, vbCrLf &amp; KeyName &amp; "=", vbCrLf)
End If

End If

End Function

'Separates one field between sStart And sEnd
Function SeparateField(ByVal sFrom, ByVal sStart, ByVal sEnd)
Dim PosB: PosB = InStr(1, sFrom, sStart, 1)
If PosB > 0 Then
PosB = PosB + Len(sStart)
Dim PosE: PosE = InStr(PosB, sFrom, sEnd, 1)
If PosE = 0 Then PosE = InStr(PosB, sFrom, vbCrLf, 1)
If PosE = 0 Then PosE = Len(sFrom) + 1
SeparateField = Mid(sFrom, PosB, PosE - PosB)
End If
End Function

'Remove left and right quote
Function RemoveQuotes(ByVal strParam)
If strParam = “” Then
RemoveQuotes=""
Else
'Removes the left quotes
strParam=Right(strParam,Len(strParam)-InStr(strParam,""""))
'Removes the right quote
strParam=Left(strParam,InStr(strParam,"""")-1)
RemoveQuotes=strParam
End If
End Function


Good Luck … :stuck_out_tongue:


MikeD :south_africa: (BOB member since 2002-06-18)

This thread would be very helpful to many of us. Thanks for getting it all together Mike.


BO_TN (BOB member since 2008-07-30)

Thank you mike, this is a big help & answers alot of questions I had… :slight_smile:


Captspeed :us: (BOB member since 2006-10-03)

Sure - what people need to understand is that monitoring is not a precise science in that a simple instance of your CMS or Temp space usage can cause an outage that server / service and processing monitoring will not trap.
I.e. it’s imperative to identify ALL possible choke points so that when your system does grind to a halt, that you don’t focus too much on the visable error. The error messages etc are a direct result of a problem, but there is a chain of events that could have caused the problem, so make sure you always review all possible knock on effects from probable causes.

I also regularly troll through the various vendor sites and open source communities to constantly look for updates to things like Microsofts Resource Toolkit’s and anything else that might provide greater insight to operating systems etc. PerfMon for example is great for giving you a holistic snapshot of everything running on your server as you can retain daily reports and watch the increase in resources and activities over a period of time - the flipside is that you have to select a ‘snapshot’ window and the reports are pretty space hungry.

Some interesting easy to understand sites:



… it would be nice to have an operating system sub forum of links related to the respective technologies that we need to run Business Objects on :wink:


MikeD :south_africa: (BOB member since 2002-06-18)

Hi Mike,

Thanks for all of that great detail. I was wondering if you have anything similar for Linux? We are running BO Edge 3.1 SP1 on linux. Thanks.

:wave:


Bunnybaby79 :us: (BOB member since 2009-11-13)

I am installing the monitoring probes on a 2 server environment and having a small issue. basically i have a web tier and an application service tier. the probes when configured just dont seem to return anyting. were there any specific install instructions that are based on the 2 server install?


LANFIELD :us: (BOB member since 2006-05-18)

I am not sure if someone has already mentioned but here is the link for the XI 3 monitoring guide from SAP

http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_monitoring_guide_en.pdf

Another tip is in case you need to list the services just use

sc query

Please refer to this helpful guide:

http://telinit0.blogspot.com/2009/06/nagios-and-nsclient-for-m-windoze.html?showComment=1325529428206#c7333825169845724337

:mrgreen:


SOLID SNAKE (BOB member since 2011-08-12)