Jul 15, 2009 1:58 PM
Zenoss Interface Errors Report (Interface Util Report style)
-
Like (0)
Alright, Python Newb here. I created the requisit files, and have the report in my list. When I select the report, DMD reported various lexical errors. I played around afair bit but I either get expected, or unexpected indentation, or AttributeError: interfaceerrs instance has no attribute 'run'.
import Globals
from Products.ZenReports import Utils, Utilization
import re
class interfaceerrs:
"""
The interface error report
"""
def run(self, dmd, args):
summary = Utilization.getSummaryArgs(dmd, args)
report = []
for d in Utilization.filteredDevices(dmd, args):
isLocal = re.compile(d.zLocalInterfaceNames)
for i in d.os.interfaces():
if isLocal.match(i.name()): continue
if not i.monitored(): continue
if i.snmpIgnore(): continue
if not i.speed: continue
results = i.getRRDValues(['ifInErrors',
'ifOutErrors'],
**summary)
inerror = results.get('ifInErrors',
results.get('ifInErrors', None))
outerror = results.get('ifOutErrors',
results.get('ifOutErrors', None))
r = Utils.Record(device=d,
interface=i,
speed=i.speed,
inerror=inerror,
outerror=outerror)
report.append(r)
return report
Can someone help me here, this report seems to be what I'm looking for, I just need to get it generated.
Also, under 2.5.1 zenoss-stack install the directory structure moved, but I figured that one out pretty quick.
jtofflemire:
Sorry, I'd become busy and forgot to get back to you. I'll zip up the new Zenoss 2.5 version and get it up here for you today!
Attached is a zip file containing the errors/discards report, duplex modeling, and more. All files must be manually installed. Backup origonals, as you'll need to replace files. Restart Zenoss when finished. For version 2.5 only!
InterfaceMap.py -> $ZENHOME/Products/DataCollector/plugins/zenoss/snmp/InterfaceMap.py
IpInterface.py -> $ZENHOME/Products/ZenModel/IpInterface.py
viewIpInterface.p -> $ZENHOME/Products/ZenModel/skins/zenmodel/viewIpInterface.pt
Conents of '\ZenOSS_Mods\Performance_Reports\Z2.5\Network_Reports\' to -> $ZENHOME/Products/ZenReports/reports/Performance_Reports/Network_Reports/
Contents of '\ZenOSS_Mods\Report_Plugins\Z2.5' -> $ZENHOME/Products/ZenReports/'
Contents of '\ZenOSS_Mods\Report_Server_Plugins\Z2.5' -> $ZENHOME/Products/ZenReports/plugins/'
Has anyone ported these reports for a later version of Zenoss?
terry:
I don't know. It wouldn't be hard to update for v4.
Best,
--Shane Scott (Hackman238)
We're on 3.x. It looked like most of the files in 3.x incorporate the changes in your files, so I quickly installed the new files. It doesn't work, so I get to spend time learning about how to build a new report within 3.x. I thought I'd check before spending that time.
Terry:
Can you post a tar of the files? I don't have any customers who use this report anymore (most use a BI tool that data mines from ZenOSS) so I lost it. I'd be happy to go and update it for you.
Best,
--Shane Scott (Hackman238)
I downloaded the tar file that you provided in this thread on Nov 30 (look back in the thread). I've not modified them locally, so it would be reasonable to start with them. I installed the rpt files from Performance_Reports/Z2.5/Network_Reports and the following report server plugin files from Report_Server_Plugins/Z2.5:
interfaceDiscardsQH.py, interfaceErrsBH.py, interfaceVdtlB.py, networkCpuE.py, and neworkMemC.py. After installing, I loaded the reports: "python ReportLoader.py --force". I've also restarted zenoss after the report load didn't work.
I'm new to python and tales. My next step was to take a working report, copy it and read, hack, read, hack til I get something to work. ;-)
I forgot to ask...
What BI tool do most customers use to access Zenoss data?
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||