|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Sunday, 18 October 2009 16:14 |
|
It is official, I have begun development on the Web Server and Database for the Port Report Project and the Network Device Manager Project. I will be combining both scripts into a True Network Device Manager. My goal is to create an Open Source Network Device Manager that will give Admins and Engineers complete Insight/Access to their network. It does not matter if you want to know which switch your ESX host is directly connected to or if you want to manage all your Switches/Linux Hosts with this product. We have a few more ideas on what we want to do, but they are just ideas and I will not post them yet.
I will be using Python, Pexpect, PySnmp, SQLAlchemy, and Django for this project. I'm hoping to have an Alpha for users to test by late November or early December. If you are interested in this project, please give me ideas on what you would like to see in this Project. Currently we do not have an official name for the project. If you have one, let me know as well. All ideas are welcome, as we are trying to make a complete enterprise product out of this project.
|
|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Monday, 05 October 2009 14:08 |
|
Today I was given a task to have my manager emailed once a day. If any of our Data Stores in ESX 3.5 are over 80% utilized. So I said to my self. What would be the easiest way to do this???? Well I've written two scripts in the past, that could help me accomplish that. The first script VMstoragePool.py will list all of the Data Stores in Vmware and its utilization. The 2nd script is check_datastore.py, and this script will return OK, WARNING, or CRITICAL, depending on the thresholds you set. So by effectively combining the 2 scripts I was able to get what I want. Example below...
python VMstoragePool.py -u "https://esxhostA" -a "login passwd" |grep "DataStore Name" |awk {'print $3'} |for line in `xargs`;do python check_datastore.py -u "https://esxhostA" -a "login passwd" -d $line -w 80 -c 90 -m "GB"|grep -P "WARNING|CRITICAL";done|mail user@domain.com CRITICAL XythosVol2 57GB Avail 94% used |avail=57 WARNING XythosVol1 62GB Avail 87% used |avail=62 WARNING LinuxVol1 57GB Avail 88% used |avail=57 WARNING WinVol1 75GB Avail 84% used |avail=75 WARNING BBSCVOL1 122GB Avail 88% used |avail=122 CRITICAL NSSharedVOL1 46GB Avail 95% used |avail=46
So I can run this script in cron once a day and pipe the output to email him directly. Simple yet effective! On a side note, I fixed both chec_datastore.py and VMstoragePool.py to effectivly parse passwd's that used characters like !@#$%^.
Both scripts can be downlaoded here..
Download check_esx_datastore.py | | File Title: | check_esx_datastore.py (Details) | | File Type: | py | | File Version: | 1.1 | | File Size: | 4.58 Kb | | License: | Copyright (C) 2008 Allen Sanabria
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | | File Author: | Allen Sanabria | | File HomePage: | http://www.linuxdynasty.org/howto-monitor-and-add-multiple-data-points-the-easy-way-in-zenoss.html | | Downloads: | 187 | | Rating: | ( Votes) | | Your Vote: | |
| | and Download VMstoragePool.py | | File Title: | VMstoragePool.py (Details) | | File Type: | py | | File Version: | 1.1 | | File Size: | 4.77 Kb | | License: | Copyright (C) 2008 Allen Sanabria
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | | File Author: | Allen Sanabria | | File HomePage: | | | Downloads: | 56 | | Rating: | ( Votes) | | Your Vote: | |
| |
|
|
Last Updated on Monday, 05 October 2009 14:31 |
|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Saturday, 26 September 2009 18:11 |
|
At the current place that I work at, we are trying to figure out, how much we are logging on a daily basis. Since my manager is thinking of purchasing Splunk ( I hope he does ). But before we make that leap and spend that much money ( Those of you who have splunk know exactly what I am talking about ). We need to know how much we are logging now and how much we would be logging after all of our devices are in Splunk.
The current issue is that we have over 400 Cisco Network devices, and they are not all in the Cisco LMS ( Lan Management Solution ). We also have Solarwind, but we do not have all of our Networking devices in there either. There is only one way I know of doing that with out using multiple tools like Cisco LMS or Func. So I figured, I should go ahead and write a Python tool that can update all of our devices ( Cisco, Nortel, Foundry, Linux, BSD, you get the idea.. ).
I wrote a Python tool that utilizes pexpect. The tools is almost complete to release on my site, but I still need to add more functionality. Currently, you can pass a device list and a command list to the script. You can also tell the tool to be verbose and print the output. Also you can tell it to use ssh or telnet or both. The tool is smart enogh to use ssh keys or log into a device you never have logged into before, by accepting the key for you.
I'm currently modifying it so that you can just pass one device and not just a list of devices. Also working on a password changer function. I've tested my tool on Linux Servers as well as Cisco devices and so far it works like a charm. I'm thinking about adding threading, but I have not yet decided to do so..
I will post this tool either tonight or tomorrow.. I hope you will find this tool as useful as we do.
|
|
Last Updated on Saturday, 26 September 2009 18:15 |
|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Monday, 04 May 2009 06:44 |
|
The Port Report Project is essentially a Switch Port Mapper Tool or a Switch Port Mapping Tool like a few other commercial products out there, except The Port Report Project is free. Right now there is no GUI or WEB interface for the project but it is in the works.
Here is a quick update..... I just add dns reverse lookups to the output of this script.. So if you have Pointer Records set on a good part of your infrastructure, you will get the host name to those MAC Addresses that have the IP addresses in the ARP table.
You can download Port Report 1.8 here http://www.linuxdynasty.org/View-details/Python-Scripts/39-port_report.py.htmll Download LD Port Report | | File Title: | LD Port Report (Details) | | File Type: | py | | File Version: | 1.13 | | File Size: | 43.83 Kb | | License: | | | File Author: | Allen Sanabria | | File HomePage: | | | Downloads: | 337 | | Rating: | ( Votes) | | Your Vote: | |
| |
Example below...
Here is an example from running port_report.py with the --report option..
GigabitEthernet3/2,00 50 56 aa 06 63,192.168.101.64,lists.linuxdynasty.org,vlan32,up,up,fullDuplex,1000mb,conan vmnic6 GigabitEthernet3/2,00 50 56 aa 1e 9b,192.168.101.54,Pointer Record Not set for 192.168.101.54,vlan32,up,up,fullDuplex,1000mb,conan vmnic6 GigabitEthernet2/28,00 11 21 35 1d da,The IP Address for 00 11 21 35 1d da is not in the ARP Table,None,vlan15,up,up,fullDuplex,1000mb,
Here is an example running with the --pname option..
SwitchPort = GigabitEthernet3/2 SwitchPortSpeed = 1000mb SwitchPortDuplex = fullDuplex SwitchVlan = vlan32 SnmpHostName = requestTimedOut HostDescr = requestTimedOut HostMAC = 00 50 56 aa 06 63 HostIP = 192.168.101.64 HostName = lists.linuxdynasty.org
SwitchPort = GigabitEthernet3/2 SwitchPortSpeed = 1000mb SwitchPortDuplex = fullDuplex SwitchVlan = vlan32 SnmpHostName = requestTimedOut HostDescr = requestTimedOut HostMAC = 00 50 56 aa 1e 9b HostIP = 192.168.101.54 HostName = Pointer Record Not set for 192.168.101.54
SwitchPort = GigabitEthernet3/2 SwitchPortSpeed = 1000mb SwitchPortDuplex = fullDuplex SwitchVlan = vlan5 SnmpHostName = No SNMP Access HostDescr = No SNMP Access HostMAC = 00 50 56 aa 51 6a HostIP = The IP Address for 00 50 56 aa 51 6a is not in the ARP Table HostName = None
|
|
Last Updated on Monday, 14 September 2009 09:13 |
|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Thursday, 30 April 2009 20:56 |
|
This is a big update for Port Report.... In this revision the following brands and devices are supported
- Cisco
- Catalyst 6509 w/ Supervisor 720 running IOS
- Catalyst 3560
- Catalyst 3550 (SMI)
- Cisco CIGESM series Chassis Blades
- Cisco Catalyst 2960
- Foundry
- Nortel
- Nortel Passport 8600
- Nortel 5520 Ethernet Routing Switch
- HP
The Script has been tested with the above devices... If you have run this script against other devices, please let us know. Also the speed in the report function has drastically increased. I ran this script against a 6509 with 800+ devices connected to it in just over 2 minutes.
The main article for this script is located here http://www.linuxdynasty.org/howto-find-the-port-on-a-switch-that-a-host-belongs-to-the-easy-way-part-1.html
You can download the script here http://www.linuxdynasty.org/View-details/Python-Scripts/39-port_report.py.html
Download LD Port Report | | File Title: | LD Port Report (Details) | | File Type: | py | | File Version: | 1.13 | | File Size: | 43.83 Kb | | License: | | | File Author: | Allen Sanabria | | File HomePage: | | | Downloads: | 337 | | Rating: | ( Votes) | | Your Vote: | |
| |
|
|
Last Updated on Monday, 14 September 2009 09:13 |
|
Read more...
|
|
Blog -
Dynastys Blog
|
|
Written by Allen Sanabria
|
|
Wednesday, 29 April 2009 14:17 |
|
I have not yet finished my testing with Nortel and Foundry. Once that is complete, then I will post 1.7 revision. Though in the mean while I was able to enhance the --report option of the port_report.py script.
It use to take me about 13 minutes to scan our 6509 Core Switch and I was just able to do it under 4 minutes. So when I do post the update, not only will you get 2 more brands supported you will also get speed improvements as well.
|
|
|