Tuesday 11 November 2014

Siebel monitoring – build your own and of course free!


Taking a bit of a side track from Open UI topic here. There are very few of the shelf tools available in the market when it comes to monitoring your Siebel servers which can
  • monitor servers and components at a micro level
  • Alert admin users before your business starts complaining.
  • Easily configurable
How about building your own monitoring? I am considering two use cases to demo it.
  1. a job which monitors the servers status and alert set of users by email if any of the server is not Online.
  2. a job which monitors set of listed components and alert users if any of them in trouble via email
All I am using is srvrmgr command and analyse the output and take appropriate action. I am doing this using simple VB coding. You don’t need to have any paid tools – only windows platform is needed as you will run your VB code using cscript.

use case 1: To monitor servers (by status)
The need:
At every 10 mins, (or at desired interval)

  • Run srvrmgr command
  • Fire command: “list server”
  • Capture the output and process it. Any server not in status of Running, include it for emailing.
  • eMail if any servers in trouble.
Copy of my SIEB_SRVR_RUN.vbs is available at the bottom. It’s pretty self explanatory. Remember to change the extension to .vbs before you start using it. I have added enough comments to it. Below are changes you need to make it work – line 60 onwards in the code.
  1. vBINPATH = "D:\SIA81\siebsrvr\BIN\" '#path where your srvrmgr command is
  2. Recipients = "shivakumarub@gmail.com;abc@abc.com" '#you can add as many emails you want separated by ;
  3. Sender = “SiebMon@gmail.com”  ‘#Change it as needed
  4. sSmtpServer = "xxxx"  ‘#SMTP server name
  5. sSmtpUser = "xxxx"    ‘#SMTP user name
  6. sSmtpPword ="xxxx"   ‘#SMTP password
Now create a simple .bat file to run cscript on above vbs file and add it to the windows scheduler to run at the desired interval. A copy of my RuNSrvrMon.bat file is at the bottom for your reference. My .vbs file is under d:\SiebMon and hence .bat code is referring to it. Please provide proper gateway, enterprise and username and password who can run srvrmgr command in the .bat file. Remember to change the extension to .bat before you start using it.

Use case 2: To monitor list of components

Now, let’s look at bit more complicated use case to monitor a given list of components.

Side note: In my environments, we have components enabled on all the servers. The servers on which they need to run are set to Auto Mode so that they come up automatically when the services/servers are restarted. On rest of the servers where we don’t want them to be running, the Mode is set to Manual and they are in Shutdown status. Above setup will really helpful in case you want to scale your environment – all you need is to set the Mode to Auto and bring them up and they will immediately start serving your users and processes without any outage. Also, handy when you want to increase the logging level – you can just mention the component without server as the comp is enabled on all.

The need: We need a file containing list of components to be monitored by our custom component monitor - COMPList.txt provided at the bottom. Remember above side note : Auto - Running & Manual - Shutdown.

At every 10 mins, (or at desired interval)
  • run srvrmgr command
  • fire command: “list comps”. This will list all the components and their status
  • capture the output and process it. Loop through the srvrmgr output file
    • if the component is listed in your complist file and it’s mode is Auto, then check it’s status. If not Running then it is in trouble and flag it for sending email.
    • If the component is listed in your complist file and it is reaching max task (90% as set in variable in the code) then flag it for sending email.
  • eMail if any components in trouble along with details to the admin users.
Copy of my Copy of my SIEB_COMP_RUN.vbs is available at the bottom. It’s pretty self explanatory. Remember to change the extension to .vbs before you start using it. I have added enough comments to it. Please review and let me know any questions. Below are changes you need to make it work – line 60 onwards in the code.
  1. vBINPATH = "D:\SIA81\siebsrvr\BIN\" '#path where your srvrmgr command is
  2. Recipients = "shivakumarub@gmail.com;abc@abc.com" '#you can add as many emails you want separated by ;
  3. Sender = SiebMon@gmail.com
  4. sSmtpServer = "xxxx"  ‘#SMTP server name
  5. sSmtpUser = "xxxx"    ‘#SMTP user name
  6. sSmtpPword ="xxxx"   ‘#SMTP password
Now create a simple .bat file and put below line in it to it and add it to the windows scheduler to run at the desired interval. A copy of my RunCompMon.bat file is at the bottom for your reference. My .vbs file is under d:\SiebMon and hence .bat code is referring to it. Please provide proper gateway, enterprise and username and password who can run srvrmgr command in the .bat file.

All I am doing above is giving you simple hints. it can be extended to any level. The solution can be extended to build a dashboard (URL based) where the info can be shown to the users which gets refreshed at regular intervals.

Let me know what you think of above simple framework for monitoring your Siebel.

Files for Server monitoring:
SIEB_SRVR_RUN.vbs //remember to save it as .vbs on your local
RunSrvrMon.bat //remember to save it as .bat on your local
Files for Component monitoring:
COMPList.txt // this file contains the comps to be monitored for status and maxtask
SIEB_COMP_RUN.vbs //remember to save it as .vbs on your local
RunCompMon.txt // remember to save it as .bat on your local
Cheers,
Shiv

6 comments:

  1. Yes, of course, you need to learn JavaScript because it has a lot of usage in the web developing world, and its the only language which runs on the browser. And the average salary of a JavaScript Expert is about $112,436 per year in the united states.keep up!!

    Android Training in Chennai

    Android Online Training in Chennai

    Android Training in Bangalore

    Android Training in Hyderabad

    Android Training in Coimbatore

    Android Training

    Android Online Training

    ReplyDelete