BusinessObjects Board

XIR2 Service check script

Author: Jim McGregor, james.mcgregor@zionsbancorp.com
Platform: Windows
Version: 1.0

Author notes:

Service Check Script.zip (1.0 KB)


alpha1145 :us: (BOB member since 2006-01-04)

Moved to BOB’s downloads. Thanks for sharing this.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

Jim,

Thanks for sharing the scripts. It all works great!


Marek Chladny :slovakia: (BOB member since 2003-11-27)

How to install the Blat in BO Server. could you please explain the steps on that.


Vallabhaneni :us: (BOB member since 2005-04-18)

Download the blat install and then place the blat.exe file into your C:\WINDOWS\system32 folder.

Then run blat -install to store your SMTP server info into the windows registry. Note that it is not necessary to run the blat -install, however it simplifies the command line when running blat in that you do not have to specify the same SMTP server info over and over again. The following URL provides the syntax for running the blat -install command:

http://www.blat.net/?faq/index.html#where_and_how_does_blat_save_the_install_configuration

Note that by placing the blat.exe into the C:\WINDOWS\system32 folder that it is now able to be referenced by the command line in that the system32 folder should be part of the windows path environment variable.


alpha1145 :us: (BOB member since 2006-01-04)

Excellent script - simple and clever.

Too bad it’s needed so much! :wink:


dnewton :us: (BOB member since 2004-01-30)

Can you please let me know if this process works for monitoring the servers on sun solaris box,we are using business objects xi r2 version,we want to get notified when the server is down,
can you also please suggest any open source third party tools

Thanks.


manjub (BOB member since 2008-10-17)

This exact script only works on Windows, but you should be able to script something similar on *NIX.


dnewton :us: (BOB member since 2004-01-30)

I’ve just had cause to use, but slightly modify this script.
I thought I would share this modified version as the original helped me so much! Thanks!
Hope this helps someone - as V3 provides this now I guess this requirement is only going to be useful to R1, R2 users.

EDIT: apologies to anyone that picked up my first version - hopefully no-one!
The method used for testing service startup but ignoring ‘already’ errors didn’t work very well.

The main changes to the original were:
[list]
[:86915541da]Combine the 2 scripts together into one
[
:86915541da]Fix an (odd!) issue with reading in the service names
[:86915541da]Don’t use blat (but you could put this back in) rather return an error existstatus to the calling command
[
:86915541da]Ignore ‘already started’ error on start
[:86915541da]Ignore ‘already stopped’ error on stop
[
:86915541da]Allow execution from any value of CD as long as script and helper file are named correctly - useful for launching from BODI :wink:
[/list]

Usual disclaimer stuff - no warranties provided or implied


:: Phil Morris - IT Performs Ltd - 19/11/09
::  BOXI service management script
::  allows single command to start or stop status of all services
::  do not rename this script or the helper file, unless you modfiy this script appropriately
::  helper file must be in same dir
@ECHO OFF
::echo %CMDCMDLINE%
IF "%1"=="" (
 echo This script requires a parameter specifying the mode
 echo please specify one of start or stop
 exit 1
)
IF "%1" NEQ "stop" (
 IF "%1" NEQ "start" (
  echo Parameter must be 'start' or 'stop'
  exit 2
 )
)
::Work out where we expect to find the list file by taking
:: the location of this script, and substituting the filenames
set FULLCMD=%0%
set LISTFILE=%FULLCMD:boxi_services.cmd=boxi_services_list.txt%
set TMPFILE=%TEMP%\boxi_services_%RANDOM%.tmp
echo seed > %TMPFILE%
::echo %FULLCMD%
::echo %LISTFILE%
::echo %TMPFILE%
::type %LISTFILE%
IF NOT EXIST %LISTFILE% (
 echo This script requires the file boxi_services_list.txt containing a list of services to manage enclosed in double quotes 
 exit 2
)
set FAIL=0
set TOT=0
FOR /F "Tokens=1 delims=!" %%i IN ('type %LISTFILE%') DO (
 echo Trying to control service: %%i%
 set /A TOT += 1
 IF /I "%1"=="start" (
  NET START %%i > %TMPFILE% 2>&1 
  IF errorlevel 1 (
   findstr "2182" %TMPFILE%
   if errorlevel 1 (
    echo --There was a problem starting service %%i%
    set /A FAIL += 1
   ) ELSE (
    echo --Detected service %%i% aready started - no error
   )
  )
 )
 IF /I "%1"=="stop" (
  NET STOP %%i > %TMPFILE% 2>&1 
  IF errorlevel 1 (
   findstr "3521" %TMPFILE%
   if errorlevel 1 (
    echo --There was a problem stopping service %%i%
    set /A FAIL += 1
   ) ELSE (
    echo --Detected service %%i% aready stopped - no error
   )
  )
 )
)
IF "%FAIL%" GTR "0" (
 echo --%FAIL% Service operations out of %TOT% returned an error
 EXIT 2
) ELSE (
 echo --All %TOT% Service operations were successful
 EXIT 0
)

philmorris :uk: (BOB member since 2002-11-12)

Hi,

Will this script work for BOXI 3.1 or not?


biuserbo (BOB member since 2007-08-28)

Hi Jim,

As per I have download place windows\system32 folder.

where can I past the batch files and servicelist.txt (could you please let me know path)

could you please tell me steps for this one.

Many Thanks.


kalabo :singapore: (BOB member since 2008-05-14)

Is there any such tool/scripting that works on Linux? Thanks.

:wave:


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

Does this works in BOXI R3 ?


bpuser (BOB member since 2011-02-10)

Unfortunately it doesn’t work in R3.
THe only service that is running with R3 is the SIA, hence the check can only be set on SIA level.

If anyone has an idea on how we can recreate this thing for R3… I’m looking for that as well.
Thanks,
Meutte


meutte :belgium: (BOB member since 2007-12-06)