Skip to end of metadata
Go to start of metadata

Product versions:
BusinessObjects Enterprise XI R2
BusinessObjects Enterprise XI 3.1

Introduction

This article describes the possible integration points of Microsoft Operations Manager (MOM) 2005 and its successor System Center Operations Manager (SCOM) 2007 for BusinessObjects Enterprise. Please read this article for an overview of the Monitoring options with SAP BusinessObjects Enterprise XI R2 and XI 3.1 : Enterprise Monitoring and BusinessObjects Enterprise XI.

MOM 2005

A detailed step-by-step configuration guide is available, see section "Monitoring BusinessObjects with Microsoft Operations Manager (MOM)" as part of the Monitoring Guide.

SCOM 2007

The configuration steps for SCOM 2007 are very similar. The main difference is in the VB script used to call the monitoring probe for BOE as the API has changed from MOM 2005. Here is an example of a VB script adapted to SCOM 2007 API.

'------------------------------------------------------
'------ define variables                    ------
'------------------------------------------------------

Option Explicit

Dim wshShell
Dim objFileSystem
Dim strProbe
Dim strProbeName
Dim objLogFile
Dim strLogData
Dim strStatus
Dim strErrorMessage
Dim fOpenLog
Dim objMOMEvent
Dim objParameters 
Dim strMonitoringInstallFolder
Dim strLogFileName
Dim oAPI
Dim oargs
Dim duration
'------------------------------------------------------
'------- prepare the script                      ------
'------------------------------------------------------

' -- Get input parameters
strStatus = "Error"

set oargs = wscript.arguments

'Set objParameters = 
'strMonitoringInstallFolder = objParameters.get("Monitoring_Install_Folder")
'strProbe = objParameters.get("Probe_file_name")


strMonitoringInstallFolder = oargs(0)
strProbe = oargs(1)

' -- Example of the value for Monitoring_Install_Folder is D:\Program Files\Business Objects\monitoring
' -- Example of the value for Probe_file_name is template_probe1.xml

' -- Get probe file name to define probe log file name
strLogFileName = Left(strProbe, InStr(strProbe, ".xml"))

' -- Create a Shell object
Set wshShell = CreateObject("WScript.Shell")
                wshShell.CurrentDirectory = strMonitoringInstallFolder


' -- Create a FileSystemObject
Set objFileSystem = CreateObject("Scripting.FileSystemObject")

' -- Define imput parameters for monitoring 
strProbe = "-probefile " & strProbe 

' -- Define monitoring log file location
objLogFile = strMonitoringInstallFolder & "\logs\" & strLogFileName &"log"

'------------------------------------------------------
'-------- execute the script (monitoring probe) -------
'------------------------------------------------------

' -- Run the monitoring and pipe output to the monitoring log file
wshShell.Run "monitoring.bat " & strProbe & " > " & Chr(34) & objLogFile & Chr(34) ,,true

'------------------------------------------------------
'-------- read the output                       -------
'------------------------------------------------------

' -- Open log file

Set fOpenLog = objFileSystem.OpenTextFile(objLogFile, 1)

' -- Read log file and find the probe name and the content of the error

Do While fOpenLog.AtEndOfStream = False

   strLogData = fOpenLog.ReadLine
   
   If Left(Trim(strLogData), 4) = "Name" Then
                strProbeName = Mid(strLogData, 8)
   ElseIf Trim(strLogData) = "Success : true" Then
                strStatus = "Success"
   ElseIf Left(Trim(strLogData),5) = "Error" Then
                strErrorMessage = strLogData
   ElseIf Left(strLogData,11) = "Duration : " Then
        dim strLength
        strLength = Len(strLogData)
        strLength = StrLength - 11
                duration = right(strLogData,strLength)
   End If

Loop

If strProbeName = "" Then
                strErrorMessage = "The probe with the entered name does not exist"
End If

fOpenLog.Close()

'------------------------------------------------------------------------
'-------- generate the Event accordingly (success, failure, etc)  -------
'------------------------------------------------------------------------
' -- Generate alert if probe return the error

set oAPI = CreateObject("MOM.ScriptAPI") 
Dim message

Select Case strStatus
Case "Error" 
    message = "Business Objects probe '" & strProbeName & "' failed. " & strErrorMessage & ". Please investigate."
    Call oAPI.LogScriptEvent("momscript4boe.vbs", 10002, 1, message)

case "Success"
    message = "Business Objects probe '" & strProbeName & "' Success. Duration: " & duration
    Call oAPI.LogScriptEvent("momscript4boe.vbs", 10001, 4, message)
    
    Dim propertyBag, sServer
    Set sServer = WScript.CreateObject("WScript.Network")
    Set propertyBag = oAPI.CreatePropertyBag()
    propertyBag.addValue "targetName", sServer.ComputerName
    propertyBag.addValue "perfValue", duration
    oAPI.AddItem(propertyBag)
    oAPI.ReturnItems

end Select            

' -- Reset all variables
Set wshShell = Nothing
Set objFileSystem = Nothing
Set objLogFile = Nothing
Set strLogData = Nothing
Set fOpenLog = Nothing
Set objMOMEvent = Nothing
Set strProbe = Nothing
Set strProbeName = Nothing
Set strStatus = Nothing
Set strErrorMessage = Nothing
Set objParameters = Nothing
Set strMonitoringInstallFolder = Nothing
Set strLogFileName = Nothing
'-------------------------------------------------------

'exit
Wscript.quit 0
  • No labels