Unsolved
This post is more than 5 years old
24 Posts
0
6838
March 7th, 2010 22:00
Brocade Scripting commands
Experts,
I wish to run few commands to perform Daily Health checks and this I need to do on some 30 switches ( different models and switch types). Few switches have CLI while other few have GUI and both.
Any way by which I can trigger executing my set of commands and try sending any alerts(warnings or errors on each switch) noted to my email Id.
Cheers,
BMK
No Events found!



dynamox
9 Legend
•
20.4K Posts
0
March 8th, 2010 03:00
emc_troy
2 Intern
•
142 Posts
0
March 8th, 2010 09:00
Run PUTTY in a batch file against all 30 switches. Then open PUTTYCS and type the command that will be send to all switches at the same time.
dynamox
9 Legend
•
20.4K Posts
0
March 8th, 2010 15:00
ok and how do you capture output from 30 putty sessions and pipe it to separate log file for each ?
emc_troy
2 Intern
•
142 Posts
0
March 8th, 2010 18:00
I have no idea... Because you are asking - I bet it is impossible :-)
I use this method to collect data from N switches for HealtCheck.
From PUTTYCS:
# supportsave -u ftp_user -p ftp_password -h ftp_server_ip -d /ftp_dir/brocade{%INC%} -l ftp -R
dynamox
9 Legend
•
20.4K Posts
0
March 8th, 2010 21:00
it's possible, just a lot of manual work with pre-creating putty sessions for each switch and configuring unique log for each one. I would rather do it programmatically in my script.
that's very handy utility, i've used to do it in Konsole on Ubuntu but this is nice equivalent for Windows. Thanks Troy.
emc_troy
2 Intern
•
142 Posts
0
March 9th, 2010 17:00
I agree with you dynamox - scripting is the better in this case. I just wanted to give "alternative".
I think instead of reinventing the weel, better buy prroven solution - ECC for example ;-)
dynamox
9 Legend
•
20.4K Posts
0
March 9th, 2010 18:00
hahah...shameless plug
emc_troy
2 Intern
•
142 Posts
0
March 9th, 2010 19:00
Let’s go into some details:
Now the “other” side:
So think about it …;-)
Krishna_BM
24 Posts
0
April 19th, 2010 04:00
>>>>30 Switches – I think this is a descent size environment. --- Yes it is.
- Writing script for monitoring – you really have to know what you are doing --- Yes, While you script you know the purpose
- If there is a failure and your script doesn’t catch it – guess who is in trouble. - --- For some reason if there is a failure or if you dont get email alerts you would rather look than keep on guessing
Now the “other” side:
What do you expect to get when you create this “custom monitoring”- medal? I bet your salary will not be effected at all! Somebody will get credit for saving the company some money (I am not going to say who) - Looks like you only earn and don't tend to learn.
- What about EMC come and do all the work for you – install ECC, configure it - nice GUI that you can use to full “some” people above you. - see above comment
- If there is a problem you always blame on EMC.--- If you put the blame on EMC then Somebody (I am not going to say who) may ask you to chase them. The time you take to fix the script failure would be less to chase EMC
- You will have one more bullet in your resume – “ECC expert” - One more bullet can also be "Scripting Expert on switches"
emc_troy
2 Intern
•
142 Posts
0
April 19th, 2010 11:00
...I just "tried" to point to some (-)-s of what you are trying to do. Good luck with the script.
Krishna_BM
24 Posts
0
May 13th, 2010 04:00
Nevermind Troy,
further to make it happen I tried my bit of efforts as dynamox tried to explain (didn't find time for this long)
>I installed putty.exe on windows server
>I created batch file and scheduled it to run daily at once
The contents of the batch file are
"PuTTY.exe -ssh -load "10.207.48.146" -pw -m D:\commands.dat"
>I put my set of switch-commands to be run in commands.dat file on location D:
Of course, the batch file contents shows the login password - which I believe can be encrypted
use the logging options in Putty to create the log file and open the saved logs to view the output of the commands captured.....simple!!
Thanks to you both again.
B M Krishna