|
Monitoring -
Zenoss
|
|
Written by Allen Sanabria
|
|
Sunday, 28 March 2010 21:15 |
|
I've come to realize, that CIM is the new SNMP, but on steroids. Most new SAN, NAS, Network, and Operating Systems now support CIM/WBEM. To me it is easier to gather statistics and information through CIM, then it is through SNMP. In this article I am going to give you a script that will allow you to query the 3par for Disk IO stats. You will be able to grab Disk IO stats on a per Volume, per Port, or per Disk basis.You will also be able to search for a Volume, Port, or Disk, instead of just dumping all the Volumes, Ports, or Disk.
Before you download this script, you will need to download pywbem from sourceforge and install it. .
Download Get 3par Disk IO Stats | | File Title: | Get 3par Disk IO Stats (Details) | | File Type: | py | | File Version: | 0.0.10 | | File Size: | 4.73 Kb | | License: | | | File Author: | Allen Sanabria | | File HomePage: | | | Downloads: | 31 | | Rating: | ( Votes) | | Your Vote: | |
| |
All the data that you get from the script, must be saved as a COUNTER and not a GAUGE.
Here is an example of searching for statistics by DISK for DISK 2:6:1..
python get3parIOstats.py -u "http://3par" -a 'login passwd' -s '2:6:1' --disk OK|2:6:1_ReadIOs=67236384 2:6:1_WriteIOs=28457131 2:6:1_TotalIOs=95693515
|
|
Last Updated on Monday, 29 March 2010 14:28 |
|
Read more...
|
|
|
Monitoring -
Zenoss
|
|
Written by Allen Sanabria
|
|
Friday, 19 March 2010 14:31 |
|
Good Afternoon my fellow Zenoss users. here I bring you another Python tool to use with Zenoss. This tool will allow you to list all of your alerting rules, either by Group, User, or Query. If you are like me and have over 100 Alerting Rules. Managing these rules are more then a pain in the butt. Especially when you create a new rule and you know you created it correctly, but it just does not work... Well you might have another conflicting rule. Well what do you do in this situation?? You can go through each rule manually and sooner or later you will find it.
Or you can use my tool to find it for you. You might ask... How will yout tool find the conflicting rule for me??? Well to be honest it will not find the rule for you. What it can do is search all the rules for a certain query. Which can return one or more alerting rules if they are similiar in nature. or you can have the tool, list all of your Alerting rules. Or you can have the script list all of your alerting rules by group or user. The toll will report back to you The Group/User, The Alerting Rules attached to that Group/user, and the Schedules Attached to that Alerting Rules.
Where this tool really helped me, was when the DST changed happened. None of my schedules were working anymore, so the work around is to move all the schedules ahead of time. Using this script I found all my schedules very quickly, with out haveing to go through each of my alerting rules one by one.
|
|
Last Updated on Friday, 19 March 2010 16:14 |
|
Read more...
|
|
Monitoring -
Zenoss
|
|
Written by Allen Sanabria
|
|
Thursday, 04 March 2010 23:12 |
|
I've seen a few people in the Zenoss community forums asking for an easier way to add multiple Datapoints into Zenoss, instead of adding 1 by 1. Well, I've decided to try and build such a tool today. Now even though the tool is not complete (IN MY EYES). It is already has been helpful to me! As of right now the script can List Templates in a Organizer ( aka /Devices/Server/Linux ) or in a Device ( zenoss1.linuxdynasty ).
It can also create a Template, with a Command DataSource, with Multiple DataPoints. This means you can now automate the creation of Templates and DataSources and DataPoints. So if you are using a tool like Puppet, Cfengine, Bcfg2, or Chef, this process can be automated. I will be adding more features in the next few weeks.
Any question or help about this script, please post them here http://www.linuxdynasty.org/forums/Scripting/scripting/ZenossTemplateManager UPDATES!!!!!!
- Update 1.0.6, Fixed an issue where if youdo not pass the -G option for graph it will fail.
- Update 1.0.5, Now have the ability to add multiple graphs with multiple datapoints
- Update 1.0.4, Now have the ability to create thresholds, bind templates to class or device, set severities on thresholds and
datasources, attach datapoints to thresholds.
- Update 1.0.3, I broke down the templateManager function into 3 smaller functions. You also can now list templates and datasources for either device or organizer, and list datapoints for a device. I also added more verbosity with the -V option.
- Update 1.0.2, You now do not have to pass a command with the script. So i f you already have a command in the DataSource, it wll not get overwritten.. Thank you Eangel, for telling me about this issue..
Upcoming Features such as....
- Deleteing Templates, DataSources, and DataPoints
- Copying Templates
- Adding Graphs
The tool is called Zenoss_Template_Manager.py. You can download it here..
Download Zenoss_Template_Manager | | File Title: | Zenoss_Template_Manager (Details) | | File Type: | py | | File Version: | 1.0.6 | | File Size: | 15.32 Kb | | License: | | | File Author: | Allen Sanabria | | File HomePage: | | | Downloads: | 107 | | Rating: | ( Votes) | | Your Vote: | |
| |
|
|
Last Updated on Thursday, 18 March 2010 17:06 |
|
Read more...
|
|
Monitoring -
Zenoss
|
|
Written by Allen Sanabria
|
|
Tuesday, 17 June 2008 14:48 |
|
The script below I created to sync up Zenoss with the Citrix Netscalers. What this will do essentially is make sure that all of our devices in Zenoss are in the correct Systems in Zenoss. So for instance lets say we have a cluster called Foo-Cluster and we have 100 devices that are in that cluster as per the netscaler. This script will move those 100 devices into that System aka {Cluster} in Zenoss.
The reason this is so important is that when you update the Citrix Netscaler you will also have to update Zenoss, but if you run this script in cron then you will not have to update Zenoss at all. This script was written in Python This script was tested with Zenoss 2.0.2, Also some modifications may have to be made to fit your environment.
Please post any questions to this script here http://linuxdynasty.org/phpBB3/viewtopic.php?f=5&t=3
You can download the script here ... zenoss_netscaler_snmp.py
|
|
Last Updated on Tuesday, 07 April 2009 18:07 |
|
Read more...
|
|
Monitoring -
Zenoss
|
|
Written by Allen Sanabria
|
|
Friday, 25 April 2008 23:25 |
|
For those Zenoss users out there, this script will send a emailof devices that are in the discovered class.
So once you receive this email you will know that you need to move those devices into there appropriate classes.
#!/bin/env python #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. ############################################################## #Created by Allen Sanabria aka LinuxDynasty aka PrNino69 #This script is to check how many devices are in the #Discovered Class #Started Nov 28th #Completed, Nov 28th ##############################################################
import os, sys from re import sub from string import split from string import join from urllib import urlopen from smtplib import SMTP from time import sleep
user = "zenoss" passwd = 'zenoss' util = '@zenoss' base = "http://%s:%s%s:8080" % (user,passwd,util) discovered_url = urlopen(base+'/zport/dmd/Devices/Discovered/getSubDevices').read() discovered_sub = sub("<Device at /zport/dmd/Devices/Discovered/devices/|>|^\[|\]$|,", "", discovered_url) discovered_list = list(split(discovered_sub))
message = """\nThe boxes below were discovered in the last run of zendisc.\nThey are all located under /Devices/Discovered Class.\n Please move Devices to appropriate Device class, if one does not exist please create one.\n This script runs on the zenoss (cc17-22) server.""" devices = sub(",|\[|\]", "\n", str(discovered_list)) BODY = join((message, devices),"\n") print BODY FROM = "zenoss@linuxdynasty.org" TO = "sa@linuxdynasty.org" SUBJECT = "Devices That Were Discovered During The Network Scan!" body = join(("From: %s" % FROM, "To: %s" % TO, "Subject: %s" % SUBJECT, "", BODY), "\n") server = SMTP('localhost') server.set_debuglevel(1) server.sendmail(FROM, [TO], body) sleep(10) server.quit()
|
|
Last Updated on Tuesday, 29 July 2008 12:26 |
|
|