Automation script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automation script
# 1  
Old 11-05-2015
Hammer & Screwdriver Automation script

Hello All ,

I came across a tricky solution to devolop . Here is a part of the requirement automation .

I have different set of server say : Web ( has 4 servers under it ) , App ( has 4 servers under it ) , DB ( has 2 servers under it )
Above each i have different load balancers , Say : Web comes under IntErVIP , App and DB comes under IntrAVIP.


we have certain commands from Unix to take server in and out from respective load balancers when requiured and an email has to come to my email address. Can you please help me with a script for this with case condition probably . Please let me know if any additional info required.

for example . Take app server 1 , appserver2 out from intrAVIP

so by running the script i should get a message as below

Code:
"Taking app server 1 , appserver2 out from intrAVIP as requested" 
--<<executing commands >>
"request has been completed and sending an email to <email> as well "

adding few more info to be clear , i am looking for the commands for the section "--<<executing commands >>" , please let me know if i need to add any more info to be clear.

Last edited by radha254; 11-07-2015 at 05:01 AM.. Reason: to make it more clear.
# 2  
Old 11-06-2015
What you need:
1. Positional arguments - to handle arguments passed from command line
2. if-condition - if you want to do something conditionally; then use the if-block; fi
3. Commands to take in/out from load balance servers (which you already have).
4. Working email client/email server on your linux server. Most servers at work will have this. Contact your IT team if it's not available. To test if you have a working email, try the following: (mailx, mutt... are couple of commonly used mail processing systems)
Code:
echo "test email body" | mailx -s "test email subject" your_email_address@domain.com

These will help you kick start. Let us know what you come up with.
# 3  
Old 11-06-2015
As a starting point, did you consider the links given at the bottom of this page?
# 4  
Old 11-07-2015
Quote:
Originally Posted by RudiC
As a starting point, did you consider the links given at the bottom of this page?
I did search already before posting the question . I could not find my requirement , if you understand its little tricky .

---------- Post updated at 02:30 PM ---------- Previous update was at 02:28 PM ----------

Quote:
Originally Posted by balajesuri
What you need:
1. Positional arguments - to handle arguments passed from command line
2. if-condition - if you want to do something conditionally; then use the if-block; fi
3. Commands to take in/out from load balance servers (which you already have).
4. Working email client/email server on your linux server. Most servers at work will have this. Contact your IT team if it's not available. To test if you have a working email, try the following: (mailx, mutt... are couple of commonly used mail processing systems)
Code:
echo "test email body" | mailx -s "test email subject" your_email_address@domain.com

These will help you kick start. Let us know what you come up with.
Hello -

Thanks for the start . But i know i have a working email address , but if you can help me with the actual requirement of mine that would be great . I know i have to use the case method to develop , but need some help over here .

if you feel what i mentioned is not clear , i will explain more in detail.

Thanks in advance to all .

I have a very short timeline to finish this , appreciate your quick help .
# 5  
Old 11-07-2015
You have two load balancers (IntErVIP and IntrAVIP) that I have never heard of. Searching for IntErVIP finds a local business in (from the telephone country code) South Africa. Searching for IntrAVIP finds a local business in Paredes, Portugal. Neither of them find anything about a load balancer.

I have no idea what commands you need to issue to these load balancers to find out what servers are assigned to that load balancer, what command you need to issue to these load balancers to assign a server to that load balancer, nor what command you need to issue to revoke a server's assignment to a load balancer. Nor do I know if revoking an assignment happens immediately upon request or if you ask these load balancers to revoke an assignment and they send you a message at some unspecified time in the future when the server has completed the tasks it was processing when you asked for it to be deallocated.

If you are saying you want us to write two load balancing programs for you with no specification of what they are supposed to do nor how they are different, you are expecting way way way too much from unpaid volunteers.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automation Script for Oracle

Hi, As a Oracle Developer, I am writing many Procedures,Functions and Packages. Facing Many optimization issue after writing these Database objects. Trying to tune it manually. Can we write any Shell/Perl/Python script to Optimize these Database objects instead of doing manual check and... (1 Reply)
Discussion started by: vasuvv
1 Replies

2. Shell Programming and Scripting

awk script automation

I have the below code which calculates the time difference between src and dst from a large trace file. The code works for a given source and destination. However, I want to automate the code to go over any src and destination. The format of the source is like that: X.Y where x is always =2 and Y... (10 Replies)
Discussion started by: ENG_MOHD
10 Replies

3. Shell Programming and Scripting

Script Automation

Hi Gurus, I have a clearcase script that i use to check in a single file at time on my clearcase server. the script is as follows setmyview settask 75098_MSI_TRILOGY_EIM cd /vobs/Trilogy_R12/custom/msieim/12.0.0/sql/ cleartool co -nc . ct mkelem -nc Filename_1.sql cp... (3 Replies)
Discussion started by: r_t_1601
3 Replies

4. Shell Programming and Scripting

sftp automation script not working

Hi all , can any one tell me how to code SFTP automation script ? I searched lots of forums but i didn't get any useful information:( I don't want auto Login script > like if u run the script it should automatically login into specific account and etc.. Just i want the following things... (4 Replies)
Discussion started by: sravan008
4 Replies

5. Shell Programming and Scripting

Help with Swapinfo automation Alert script

I am new to unix scripting (HP-UX) and need to write a script for checking memory usage. I am using "ipcs -ma" and using "awk" to select specific colums and redirecting output to variable. /usr/bin/ipcs -ma | awk '{ print $5,$10,$12}' > $TMP_FILE exec < $TMP_FILE while read line; do ... (1 Reply)
Discussion started by: JamesBond007
1 Replies

6. Shell Programming and Scripting

Help with Truststore automation shell script

Please close this thread. I have raise this question in appropriate thread. Thanks (0 Replies)
Discussion started by: KuldeepSinghTCS
0 Replies

7. Shell Programming and Scripting

Help with Shell Script automation

can someone look into this one please... I am struck at this point. I do not know what logic to be followed here. I can go ahead with my work only, if this step is done. Please Help. I have a process X in a shell script. Once the process X is done, it generates a log file. Process X is basically... (1 Reply)
Discussion started by: ss3944
1 Replies

8. Shell Programming and Scripting

FTP automation script

Hi, I have got a requirement like this. a parameterized function custFtp which will take 5 i/ps and will do the following tasks. p1) server name p2) username p3) password p4) path name of the server where the file resides p5) file name pattern the function will work like this. ... (1 Reply)
Discussion started by: ani_datta
1 Replies

9. Filesystems, Disks and Memory

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

10. UNIX Desktop Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
Login or Register to Ask a Question