Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Mail from Weblogic scripting tool when instance state is abnormal

In production environments there is a possibility of a WebLogic server instance go on overload and crash or it could reach to a non-RUNNING state due to various reasons. If the failure of the instance is notified immediately it can be checked and further steps can be initiated to resolve it.

Python network library smtplib in Weblogic scripting tool

   WLST supports multiple network libraries such as:

  • ftplib
  • poplib
  • imaplib
  • smtplib
  • telnetlib

The above mentioned are network capabilities in their process, for scripting we need to import the libraries and you can use the built-in functions. Before using this smtp libraries you need to check whether the SMTP service is enabled on the machine.

The process is to send an alert mail message when one of the Managed Server goes to SHUTDOWN or UNKNOWN state or some other state which is not RUNNING

The machine which is being used should have SMTP, mail service must be enabled, check before creating this script on the box. In the following script “TO” value which is mentioned as [email protected] can be replaced by list of mail id’s of your Weblogic administrators separated by a comma.

CRONJOB SCHEDULE

If the script needs to run for every 30 minutes the following line should be scheduled into a shell script. The shell script needs to be mapped to crontab by giving the -e option.
To test run this script in UNIX/Windows/MacOS/anyother…

SCENARIO

If the server state is not normal like the below images, then Weblogic scripting tool sends an alert mail notifying the state of the server.

1.

2.

The post Mail from Weblogic Scripting Tool when instance state is abnormal appeared first on Diksha SEA.



This post first appeared on Diksha Skill Enhancer Academy- Professional IT Training Company, please read the originial post: here

Share the post

Mail from Weblogic scripting tool when instance state is abnormal

×

Subscribe to Diksha Skill Enhancer Academy- Professional It Training Company

Get updates delivered right to your inbox!

Thank you for your subscription

×