You can subscribe to this list here.
2007 |
Jan
|
Feb
(65) |
Mar
(276) |
Apr
(544) |
May
(638) |
Jun
(225) |
Jul
(204) |
Aug
(294) |
Sep
(532) |
Oct
(506) |
Nov
(324) |
Dec
(359) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(208) |
Feb
(225) |
Mar
(248) |
Apr
(388) |
May
(222) |
Jun
(47) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ze...> - 2007-04-24 00:20:05
|
Author: edahl Date: 2007-04-23 20:20:05 -0400 (Mon, 23 Apr 2007) New Revision: 4820 Added: branches/zenoss-1.1.x/inst/docs/INSTALL_RHEL5.txt Modified: branches/zenoss-1.1.x/inst/docs/INSTALL_CentOS43.txt Log: * add rhel5 install instructions and tweakt hem Modified: branches/zenoss-1.1.x/inst/docs/INSTALL_CentOS43.txt =================================================================== --- branches/zenoss-1.1.x/inst/docs/INSTALL_CentOS43.txt 2007-04-23 22:26:46 UTC (rev 4819) +++ branches/zenoss-1.1.x/inst/docs/INSTALL_CentOS43.txt 2007-04-24 00:20:05 UTC (rev 4820) @@ -42,7 +42,7 @@ 4. Download the latest Zenoss RPM from the SourceForge downloads page, and install it using the following command: - # rpm -ivh zenoss-1.1.0-0.i386.rpm + # rpm -ivh zenoss-1.1.2-0.i386.rpm 5. In order to allow the SNMP Daemon to read CPU information SE Linux Added: branches/zenoss-1.1.x/inst/docs/INSTALL_RHEL5.txt |
From: <sv...@ze...> - 2007-04-23 22:27:07
|
Author: ecn Date: 2007-04-23 18:26:46 -0400 (Mon, 23 Apr 2007) New Revision: 4819 Modified: trunk/Products/ZenRRD/zencommand.py Log: deal better with incremental loading of commands Modified: trunk/Products/ZenRRD/zencommand.py =================================================================== --- trunk/Products/ZenRRD/zencommand.py 2007-04-23 21:56:28 UTC (rev 4818) +++ trunk/Products/ZenRRD/zencommand.py 2007-04-23 22:26:46 UTC (rev 4819) @@ -575,6 +575,8 @@ devices = [self.options.device] yield self.model().callRemote('getDataSourceCommands', devices) + if not devices: + devices = list(Set([c.device for c in self.schedule])) self.updateConfig(driver.next(), devices) self.rrd = RRDUtil(createCommand, 60) |
From: <sv...@ze...> - 2007-04-23 21:56:36
|
Author: ecn Date: 2007-04-23 17:56:28 -0400 (Mon, 23 Apr 2007) New Revision: 4818 Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt Modified: trunk/Products/ZenModel/OSProcessClass.py trunk/Products/ZenModel/OSProcessOrganizer.py trunk/Products/ZenModel/RRDTemplate.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt trunk/Products/ZenModel/skins/zenmodel/viewRRDTemplate.pt trunk/Products/ZenUtils/Utils.py Log: fixed #1272: Add Sequence tab like mappings have for OSProcessClasses * moved resequence to utils * menus for Performance Template resequence Modified: trunk/Products/ZenModel/OSProcessClass.py =================================================================== --- trunk/Products/ZenModel/OSProcessClass.py 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/OSProcessClass.py 2007-04-23 21:56:28 UTC (rev 4818) @@ -27,12 +27,7 @@ def manage_addOSProcessClass(context, id=None, REQUEST = None): """make a device class""" if id: - sc = OSProcessClass(id) - context._setObject(id, sc) - sc = context._getOb(id) - sc.createCatalog() - sc.buildZProperties() - + context.manage_addOSProcessClass(id) if REQUEST is not None: REQUEST['RESPONSE'].redirect(context.absolute_url() + '/manage_main') @@ -47,12 +42,14 @@ regex = "" ignoreParameters = False description = "" + sequence = 0 _properties = ( {'id':'name', 'type':'string', 'mode':'w'}, {'id':'regex', 'type':'string', 'mode':'w'}, {'id':'ignoreParameters', 'type':'boolean', 'mode':'w'}, {'id':'description', 'type':'text', 'mode':'w'}, + {'id':'sequence', 'type':'int', 'mode':'w'}, ) _relations = ( Modified: trunk/Products/ZenModel/OSProcessOrganizer.py =================================================================== --- trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-23 21:56:28 UTC (rev 4818) @@ -119,12 +119,19 @@ """ if id: sc = OSProcessClass(id) + sc.sequence = len(self.osProcessClasses()) self.osProcessClasses._setObject(id, sc) if REQUEST: return self.callZenScreen(REQUEST) else: return self.osProcessClasses._getOb(id) + + def manage_resequenceProcesses(self, seqmap=(), origseq=(), REQUEST=None): + "resequence the OsProcesses" + from Products.ZenUtils.Utils import resequence + return resequence(self, + self.osProcessClasses(), seqmap, origseq, REQUEST) def unmonitorOSProcessClasses(self, ids=None, REQUEST=None): return self.monitorOSProcessClasses(ids, False, REQUEST) @@ -152,6 +159,7 @@ for p in klass.instances(): p.device().os.processes._delObject(p.id) self.osProcessClasses._delObject(id) + self.manage_resequenceProcesses() if REQUEST: return self() Modified: trunk/Products/ZenModel/RRDTemplate.py =================================================================== --- trunk/Products/ZenModel/RRDTemplate.py 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/RRDTemplate.py 2007-04-23 21:56:28 UTC (rev 4818) @@ -314,21 +314,8 @@ def manage_resequenceRRDGraphs(self, seqmap=(), origseq=(), REQUEST=None): """Reorder the sequecne of the RRDGraphs. """ - if seqmap and origseq: - try: - origseq = tuple([long(s) for s in origseq]) - seqmap = tuple([float(s) for s in seqmap]) - except ValueError: - origseq = () - seqmap = () - if origseq: - graphs = self.getGraphs() - for oldSeq, newSeq in zip(origseq, seqmap): - graphs[oldSeq].sequence = newSeq - for i, graph in enumerate(self.getGraphs()): - graph.sequence = i - if REQUEST: - return self.callZenScreen(REQUEST) + from Products.ZenUtils.Utils import resequence + return resequence(self, self.getGraphs(), seqmap, origseq, REQUEST) def getDataSourceClasses(self): Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-23 21:56:28 UTC (rev 4818) @@ -406,7 +406,7 @@ ordering=90.0, id= 'addOSProcess', description='Add Process...', - action= 'dialog_addOSProcess', + action= 'dialog_addOSProcessClass', permissions=('Manage DMD',), isdialog= True), dict( @@ -423,6 +423,13 @@ action= 'dialog_moveOSProcesses', permissions=('Manage DMD',), isdialog= True), + dict( + ordering=3.0, + id = 'resequenceOsProcesses', + description = 'Re-sequence Processes', + action = 'javascript:submitFormToMethod("processList", "manage_resequenceProcesses")', + permissions= ('Manage DMD',) + ), ], 'Manufacturer_list': [ ZenPackItems, @@ -929,9 +936,8 @@ ordering=80.0, id = 'resequenceGraphs', description = 'Re-sequence Graphs', - action = 'manage_resequenceRRDGraphs', + action = 'javascript:submitFormToMethod("graphList", "manage_resequenceRRDGraphs")', permissions= ('Change Device',), - isdialog=True, ), ], 'Subnetworks':[ Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt Modified: trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-23 21:56:28 UTC (rev 4818) @@ -62,7 +62,7 @@ <span metal:use-macro="here/templates/macros/contentSeparator"/> -<form method="post" tal:attributes="action here/absolute_url_path"> +<form method="post" name="processList" tal:attributes="action here/absolute_url_path"> <tal:block tal:define="objects here/osProcessClasses; menu_id string:OSProcess_list; Modified: trunk/Products/ZenModel/skins/zenmodel/viewRRDTemplate.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/viewRRDTemplate.pt 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenModel/skins/zenmodel/viewRRDTemplate.pt 2007-04-23 21:56:28 UTC (rev 4818) @@ -216,7 +216,7 @@ </form> <br/> -<form method="POST" tal:attributes="action here/absolute_url_path"> +<form method="POST" tal:attributes="action here/absolute_url_path" name="graphList"> <input type="hidden" name="zenScreenName" tal:attributes="value template/id"/> Modified: trunk/Products/ZenUtils/Utils.py =================================================================== --- trunk/Products/ZenUtils/Utils.py 2007-04-23 21:03:33 UTC (rev 4817) +++ trunk/Products/ZenUtils/Utils.py 2007-04-23 21:56:28 UTC (rev 4818) @@ -501,3 +501,24 @@ x.extend(thisclass.__bases__) finalnames.add(thisclass.__name__) return bool( Set(classnames).intersection(finalnames) ) + +def resequence(context, objects, seqmap, origseq, REQUEST): + if seqmap and origseq: + try: + origseq = tuple([long(s) for s in origseq]) + seqmap = tuple([float(s) for s in seqmap]) + except ValueError: + origseq = () + seqmap = () + if origseq: + for oldSeq, newSeq in zip(origseq, seqmap): + objects[oldSeq].sequence = newSeq + def sort(x): + x = list(x) + x.sort(lambda a, b: cmp(a.sequence, b.sequence)) + return x + for i, obj in enumerate(sort(objects)): + obj.sequence = i + if REQUEST: + REQUEST['RESPONSE'].redirect(context.getPrimaryUrlPath()) + |
From: <sv...@ze...> - 2007-04-23 21:03:36
|
Author: ecn Date: 2007-04-23 17:03:33 -0400 (Mon, 23 Apr 2007) New Revision: 4817 Modified: trunk/Products/ZenEvents/EventFilter.py Log: * switch eventClass to a simple selection filter Modified: trunk/Products/ZenEvents/EventFilter.py =================================================================== --- trunk/Products/ZenEvents/EventFilter.py 2007-04-23 20:29:31 UTC (rev 4816) +++ trunk/Products/ZenEvents/EventFilter.py 2007-04-23 21:03:33 UTC (rev 4817) @@ -49,7 +49,6 @@ addDevices('Systems', 'Systems', 'systems') addDevices('Groups', 'Device Groups', 'deviceGroups') addDevices('Devices', 'Device Class', 'deviceClass') - addDevices('Events', 'Event Class', 'eventClass') esconv = [(b, a) for a, b in EventManagerBase.eventStateConversions] sconv = [(b, a) for a, b in EventManagerBase.severityConversions] pconv = [d.split(':') for d in DataRoot.prodStateConversions] @@ -57,7 +56,9 @@ dpconv = [x.split(':') for x in DataRoot.priorityConversions] dpconv = [(int(b), a) for a, b in dpconv] owners = [(n, n) for n in self.dmd.ZenUsers.getAllUserSettingsNames()] + organizers = [(n, n) for n in self.dmd.Events.getOrganizerNames()] return dict( + eventClass=Select('Event Class', organizers), summary=Text("Summary"), prodState=Enumerated("Production State",pconv), severity=Enumerated("Severity",sconv), |
From: <sv...@ze...> - 2007-04-23 20:29:29
|
Author: ecn Date: 2007-04-23 16:29:31 -0400 (Mon, 23 Apr 2007) New Revision: 4816 Modified: trunk/Products/ZenWin/zeneventlog.py Log: clean up problems posting events on device failure Modified: trunk/Products/ZenWin/zeneventlog.py =================================================================== --- trunk/Products/ZenWin/zeneventlog.py 2007-04-23 20:26:45 UTC (rev 4815) +++ trunk/Products/ZenWin/zeneventlog.py 2007-04-23 20:29:31 UTC (rev 4816) @@ -34,6 +34,7 @@ def __init__(self): Base.__init__(self) self.devices = {} + self.manager = getfqdn() def updateDevices(self, devices): """get the config data from server""" @@ -48,23 +49,24 @@ except Exception, ex: msg = summary='WMI connect error on %s: %s' % (name, ex) self.log.exception(msg) - self.sendEvent(dict(device=name, - eventKey=Status_Wmi_Conn, - agent=self.agent, - severity=Event.Error, - manager=self.manager)) + self.sendEvent(dict(summary=msg, + device=name, + eventKey=Status_Wmi_Conn, + agent=self.agent, + severity=Event.Error, + manager=self.manager)) def getWatcher(self, name, user, passwd, minSeverity): - """Setup WMI connection to monitored server. - """ - c = wmiclient.WMI(name, user, passwd) - c.connect() - wql = """SELECT * FROM __InstanceCreationEvent where """\ - """TargetInstance ISA 'Win32_NTLogEvent' """\ - """and TargetInstance.EventType <= %d"""\ - % minSeverity - return c.watcher(wql) + """Setup WMI connection to monitored server. + """ + c = wmiclient.WMI(name, user, passwd) + c.connect() + wql = """SELECT * FROM __InstanceCreationEvent where """\ + """TargetInstance ISA 'Win32_NTLogEvent' """\ + """and TargetInstance.EventType <= %d"""\ + % minSeverity + return c.watcher(wql) def processLoop(self): |
From: <sv...@ze...> - 2007-04-23 20:26:46
|
Author: marc Date: 2007-04-23 16:26:45 -0400 (Mon, 23 Apr 2007) New Revision: 4815 Modified: trunk/Products/ZenModel/migrate/menus.py Log: #1239 * Reordered menus.py * Now we should use the Menus tab on Setting to reorder Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-23 20:08:48 UTC (rev 4814) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-23 20:26:45 UTC (rev 4815) @@ -111,7 +111,7 @@ 'EventClassInst', 'DeviceOrganizer',], description='Changes', - ordering=0.0, + ordering=99.0, id='viewHistory', permissions=('Change Device',) ), @@ -122,19 +122,19 @@ 'IpInterface', 'OSProcess'], description='PerfConf', - ordering=1.0, + ordering=90.0, id='objRRDTemplate', permissions=('Change Device',) ), dict(action='../objRRDTemplate', allowed_classes=['OperatingSystem'], description='PerfConf', - ordering=1.0, + ordering=90.0, id='objRRDTemplate_os', permissions=('Change Device',) ), dict( - ordering=2.0, + ordering=1.0, id= 'addToZenPack', description='Add to ZenPack...', action= 'dialog_addOneToZenPack', @@ -153,7 +153,7 @@ 'OSProcess', 'IpRouteEntry'], description='Lock', - ordering=3.0, + ordering=10.0, id='lockObject', isdialog=True, permissions=('Change Device',) @@ -167,7 +167,7 @@ 'OSProcess', 'IpRouteEntry'], description='Delete', - ordering=4.0, + ordering=80.0, id='deleteObject', isdialog=True, permissions=('Change Device',) @@ -176,91 +176,91 @@ allowed_classes=['DeviceClass', 'Device'], description='Push Changes', - ordering=6.0, + ordering=10.0, id='pushConfig', permissions=('Change Device',) ), dict(action='../pushConfig', allowed_classes=['OperatingSystem'], description='Push Changes', - ordering=7.0, + ordering=10.0, id='pushConfig_os', permissions=('Change Device',) ), dict(action='deviceCustomEdit', allowed_classes=['Device'], description='Custom', - ordering=8.0, + ordering=60.0, id='deviceCustomEdit', permissions=('View',) ), dict(action='../deviceCustomEdit', allowed_classes=['OperatingSystem'], description='Custom', - ordering=9.0, + ordering=60.0, id='deviceCustomEdit_os', permissions=('View',) ), dict(action='deviceManagement', allowed_classes=['Device'], description='Manage', - ordering=12.0, + ordering=70.0, id='deviceManagement', permissions=('Change Device',) ), dict(action='../deviceManagement', allowed_classes=['OperatingSystem'], description='Manage', - ordering=13.0, + ordering=70.0, id='deviceManagement_os', permissions=('Change Device',) ), dict(action='serviceOrganizerManage', allowed_classes=['ServiceOrganizer'], description='Manage', - ordering=14.0, + ordering=70.0, id='serviceOrganizerManage', permissions=('Manage DMD',) ), dict(action='osProcessOrganizerManage', allowed_classes=['OSProcessOrganizer'], description='Manage', - ordering=15.0, + ordering=70.0, id='osProcessOrganizerManage', permissions=('Manage DMD',) ), dict(action='ipServiceClassManage', allowed_classes=['IpServiceClass'], description='Manage', - ordering=16.0, + ordering=70.0, id='ipServiceClassManage', permissions=('Manage DMD',) ), dict(action='osProcessManage', allowed_classes=['OSProcess'], description='Manage', - ordering=18.0, + ordering=70.0, id='osProcessManage', permissions=('Manage DMD',) ), dict(action='serviceClassManage', allowed_classes=['ServiceClass'], description='Manage', - ordering=19.0, + ordering=70.0, id='serviceClassManage', permissions=('Manage DMD',) ), dict(action='ipServiceManage', allowed_classes=['IpService'], description='Manage', - ordering=21.0, + ordering=70.0, id='ipServiceManage', permissions=('Manage DMD',) ), dict(action='osProcessClassManage', allowed_classes=['OSProcessClass'], description='Manage', - ordering=23.0, + ordering=70.0, id='osProcessClassManage', permissions=('Manage DMD',) ), @@ -271,49 +271,49 @@ 'DeviceClass', 'System'], description='Manage', - ordering=24.0, + ordering=70.0, id='deviceOrganizerManage', permissions=('Manage DMD',) ), dict(action='winServiceManage', allowed_classes=['WinService'], description='Manage', - ordering=27.0, + ordering=70.0, id='winServiceManage', permissions=('Manage DMD',) ), dict(action='editStatusMonitorConf', allowed_classes=['StatusMonitorConf'], description='Edit', - ordering=5.0, + ordering=60.0, id='editStatusMonitorConf', permissions=('Manage DMD',) ), dict(action='editManufacturer', allowed_classes=['Manufacturer'], description='Edit', - ordering=17.0, + ordering=60.0, id='editManufacturer', permissions=('Manage DMD',) ), dict(action='editPerformanceConf', allowed_classes=['PerformanceConf'], description='Edit', - ordering=20.0, + ordering=60.0, id='editPerformanceConf', permissions=('Manage DMD',) ), dict(action='editProductClass', allowed_classes=['ProductClass'], description='Edit', - ordering=22.0, + ordering=60.0, id='editProductClass', permissions=('Manage DMD',) ), dict(action='eventClassInstSequence', allowed_classes=['EventClassInst'], description='Sequence', - ordering=28.0, + ordering=20.0, id='eventClassInstSequence', permissions=('View',) ), @@ -327,7 +327,7 @@ dict(action='perfConfig', allowed_classes=['DeviceClass'], description='Available Templates', - ordering=31.0, + ordering=30.1, id='perfConfig', permissions=('Change Device',) ), @@ -337,14 +337,14 @@ 'ProductClass', ], description='zProperties', - ordering=32.0, + ordering=50.0, id='zPropertyEdit', permissions=('View',) ), dict(action='../zPropertyEdit', allowed_classes=['OperatingSystem'], description='zProperties', - ordering=33.0, + ordering=50.0, id='zPropertyEdit_os', permissions=('View',) ), @@ -352,7 +352,7 @@ 'Organizer_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=90.0, id= 'addOrganizer', description='Add New Organizer...', action= 'dialog_addOrganizer', @@ -360,7 +360,7 @@ isdialog= True, ), dict( - ordering=2.0, + ordering=80.0, id= 'moveOrganizer', description='Move Organizers...', action= 'dialog_moveOrganizer', @@ -368,7 +368,7 @@ isdialog= True, ), dict( - ordering=3.0, + ordering=70.0, id= 'removeOrganizers', description='Delete Organizers...', action= 'dialog_removeOrganizer', @@ -379,21 +379,21 @@ 'Service_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=90.0, id= 'addServiceClass', description='Add Service...', action= 'dialog_addServiceClass', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeServiceClasses', description='Delete Services...', action= 'dialog_removeServiceClasses', permissions=('Manage DMD',), isdialog= True), dict( - ordering=3.0, + ordering=70.0, id= 'moveServiceClasses', description='Move Services...', action= 'dialog_moveServiceClasses', @@ -403,21 +403,21 @@ 'OSProcess_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=90.0, id= 'addOSProcess', description='Add Process...', action= 'dialog_addOSProcess', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeOSProcesses', description='Delete Processes...', action= 'dialog_removeOSProcesses', permissions=('Manage DMD',), isdialog= True), dict( - ordering=3.0, + ordering=70.0, id= 'moveOSProcesses', description='Move Processes...', action= 'dialog_moveOSProcesses', @@ -427,14 +427,14 @@ 'Manufacturer_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=90.0, id= 'addManufacturer', description='Add Manufacturer...', action= 'dialog_addManufacturer', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeManufacturers', description='Delete Manufacturers...', action= 'dialog_removeManufacturers', @@ -444,21 +444,21 @@ 'Mib_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=90.0, id= 'addMibModule', description='Add Mib...', action= 'dialog_addMibModule', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeMibModules', description='Delete Mibs...', action= 'dialog_removeMibModules', permissions=('Manage DMD',), isdialog= True), dict( - ordering=3.0, + ordering=70.0, id= 'moveMibModules', description='Move Mibs...', action= 'dialog_moveMibModules', @@ -468,21 +468,21 @@ 'EventMapping_list': [ ZenPackItems, dict( - ordering=1.0, + ordering=80.0, id= 'addInstance', description='Add Mapping...', action= 'dialog_createInstance', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeInstances', description='Delete Mappings...', action= 'dialog_removeInstances', permissions=('Manage DMD',), isdialog= True), dict( - ordering=3.0, + ordering=70.0, id= 'moveInstances', description='Move Mappings...', action= 'dialog_moveInstances', @@ -491,14 +491,14 @@ ], 'PerformanceMonitor_list': [ dict( - ordering=1.0, + ordering=90.0, id= 'addPMonitor', description='Add Monitor...', action= 'dialog_addMonitor', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removePMonitors', description='Delete Monitors...', action= 'dialog_removeMonitors', @@ -507,14 +507,14 @@ ], 'StatusMonitor_list': [ dict( - ordering=1.0, + ordering=90.0, id= 'addSMonitor', description='Add Monitor...', action= 'dialog_addMonitor', permissions=('Manage DMD',), isdialog= True), dict( - ordering=2.0, + ordering=80.0, id= 'removeSMonitors', description='Delete Monitors...', action= 'dialog_removeMonitors', @@ -574,7 +574,7 @@ ], 'ZenPack_list':[ dict( - ordering=1.0, + ordering=1.02, id= 'addZenPack', description='Create a new ZenPack...', action= 'dialog_addZenPack', @@ -582,7 +582,7 @@ isdialog=True, ), dict( - ordering=2.0, + ordering=1.01, id= 'removeZenPack', description='Delete ZenPack', permissions=('Manage DMD',), @@ -592,7 +592,7 @@ ], 'Device_list':[ dict( - ordering=1.0, + ordering=50.0, id= 'moveclass', description='Move to Class...', action= 'dialog_moveDevices', @@ -600,7 +600,7 @@ isdialog=True ), dict( - ordering=2.0, + ordering=40.0, id= 'setGroups', description='Set Groups...', action= 'dialog_setGroups', @@ -608,7 +608,7 @@ isdialog=True ), dict( - ordering=3.0, + ordering=30.0, id= 'setSystems', description='Set Systems...', action= 'dialog_setSystems', @@ -616,7 +616,7 @@ isdialog=True ), dict( - ordering=4.0, + ordering=20.0, id= 'setLocation', description='Set Location...', action= 'dialog_setLocation', @@ -624,7 +624,7 @@ isdialog=True ), dict( - ordering=5.0, + ordering=10.0, id= 'removeDevices', description='Delete devices...', action= 'dialog_removeDevices', @@ -632,7 +632,7 @@ isdialog=True ), dict( - ordering=6.0, + ordering=2.0, id= 'lockDevices', description='Lock devices...', action= 'dialog_lockDevices', @@ -642,7 +642,7 @@ ], 'IpInterface':[ dict( - ordering=1.0, + ordering=90.0, id= 'addIpInterface', description='Add IpInterface...', action= 'dialog_addIpInterface', @@ -650,7 +650,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteIpInterfaces', description='Delete IpInterfaces...', action= 'dialog_deleteIpInterfaces', @@ -658,7 +658,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockIpInterfaces', description='Lock IpInterfaces...', action= 'dialog_lockIpInterfaces', @@ -668,7 +668,7 @@ ], 'OSProcess':[ dict( - ordering=1.0, + ordering=90.0, id= 'addOSProcess', description='Add OSProcess...', action= 'dialog_addOSProcess', @@ -676,7 +676,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteOSProcesses', description='Delete OSProcesses...', action= 'dialog_deleteOSProcesses', @@ -684,7 +684,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockOSProcesses', description='Lock OSProcesses...', action= 'dialog_lockOSProcesses', @@ -694,7 +694,7 @@ ], 'FileSystem':[ dict( - ordering=1.0, + ordering=90.0, id= 'addFileSystem', description='Add File System...', action= 'dialog_addFileSystem', @@ -702,7 +702,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteFileSystems', description='Delete FileSystems...', action= 'dialog_deleteFileSystems', @@ -710,7 +710,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockFileSystems', description='Lock FileSystems...', action= 'dialog_lockFileSystems', @@ -720,7 +720,7 @@ ], 'IpRouteEntry':[ dict( - ordering=1.0, + ordering=90.0, id= 'addIpRouteEntry', description='Add IpRouteEntry...', action= 'dialog_addIpRouteEntry', @@ -728,7 +728,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteIpRouteEntries', description='Delete IpRouteEntries...', action= 'dialog_deleteIpRouteEntries', @@ -736,7 +736,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockIpRouteEntries', description='Lock IpRouteEntries...', action= 'dialog_lockIpRouteEntries', @@ -746,7 +746,7 @@ ], 'IpService':[ dict( - ordering=1.0, + ordering=90.0, id= 'addIpService', description='Add IpService...', action= 'dialog_addIpService', @@ -754,7 +754,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteIpServices', description='Delete IpServices...', action= 'dialog_deleteIpServices', @@ -762,7 +762,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockIpServices', description='Lock IpServices...', action= 'dialog_lockIpServices', @@ -772,7 +772,7 @@ ], 'WinService':[ dict( - ordering=1.0, + ordering=90.0, id= 'addWinService', description='Add WinService...', action= 'dialog_addWinService', @@ -780,7 +780,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=80.0, id= 'deleteWinServices', description='Delete WinServices...', action= 'dialog_deleteWinServices', @@ -788,7 +788,7 @@ permissions=('Change Device',), ), dict( - ordering=3.0, + ordering=2.0, id= 'lockWinServices', description='Lock WinServices...', action= 'dialog_lockWinServices', @@ -798,7 +798,7 @@ ], 'Event_list':[ dict( - ordering=1.0, + ordering=80.0, id= 'acknowledgeEvents', description='Acknowledge Events', action= ('javascript:submitFormToMethod(' @@ -806,7 +806,7 @@ permissions=('Manage DMD',) ), dict( - ordering=2.0, + ordering=70.0, id= 'historifyEvents', description='Move Events to History...', action= 'dialog_moveEventsToHistory', @@ -814,14 +814,14 @@ isdialog= True ), dict( - ordering=3.0, + ordering=10.0, id= 'exportAllEvents', description='Download as CSV', action= 'javascript:goExport()', permissions=('View',) ), dict( - ordering=4.0, + ordering=90.0, id= 'createEventMap', description='Map Events to Class...', action= 'dialog_createEventMap', @@ -831,7 +831,7 @@ ], 'HistoryEvent_list':[ dict( - ordering=1.0, + ordering=90.0, id= 'createEventMap', description='Map Events to Class...', action= 'dialog_createEventMap', @@ -839,14 +839,14 @@ isdialog= True ), dict( - ordering=2.0, + ordering=80.0, id= 'exportAllEvents', description='Download as CSV', action= 'javascript:goExport()', permissions=('View',) ), dict( - ordering=3.0, + ordering=70.0, id= 'undeleteHistoryEvents', description='Undelete Events...', action= 'dialog_undeleteHistoryEvents', @@ -856,7 +856,7 @@ ], 'DataSource_list':[ dict( - ordering=1.0, + ordering=90.1, id = 'addDataSource', description = 'Add DataSource...', action = 'dialog_addDataSource', @@ -864,7 +864,7 @@ isdialog=True, ), dict( - ordering=2.0, + ordering=90.0, id = 'deleteDataSource', description = 'Delete DataSource...', action = 'dialog_deleteDataSource', @@ -874,7 +874,7 @@ ], 'DataPoint_list':[ dict( - ordering=1.0, + ordering=90.1, id = 'addDataPoint', description = 'Add DataPoint...', action = 'dialog_addDataPoint', @@ -882,7 +882,7 @@ isdialog=True, ), dict( - ordering=2.0, + ordering=90.0, id = 'deleteDataPoint', description = 'Delete DataPoint...', action = 'dialog_deleteDataPoint', @@ -892,7 +892,7 @@ ], 'Threshold_list':[ dict( - ordering=1.0, + ordering=90.1, id = 'addThreshold', description = 'Add Threshold...', action = 'dialog_addThreshold', @@ -900,7 +900,7 @@ isdialog=True, ), dict( - ordering=2.0, + ordering=90.0, id = 'deleteThreshold', description = 'Delete Threshold...', action = 'dialog_deleteThreshold', @@ -910,7 +910,7 @@ ], 'Graph_list':[ dict( - ordering=1.0, + ordering=90.1, id = 'addGraph', description = 'Add Graph...', action = 'dialog_addGraph', @@ -918,7 +918,7 @@ isdialog=True, ), dict( - ordering=2.0, + ordering=90.0, id = 'deleteGraph', description = 'Delete Graph...', action = 'dialog_deleteGraph', @@ -926,7 +926,7 @@ isdialog=True, ), dict( - ordering=3.0, + ordering=80.0, id = 'resequenceGraphs', description = 'Re-sequence Graphs', action = 'manage_resequenceRRDGraphs', @@ -936,7 +936,7 @@ ], 'Subnetworks':[ dict( - ordering=90.0, + ordering=80.0, id= 'discoverDevices', description= 'Discover Devices', action= ('javascript:submitFormToMethod(' @@ -945,7 +945,7 @@ permissions=('Change Device',), ), dict( - ordering=80.0, + ordering=90.0, id= 'deleteNetwork', description='Delete Networks...', action= 'dialog_deleteNetwork', @@ -954,7 +954,7 @@ permissions=('Change Device',), ), dict( - ordering=70.0, + ordering=90.1, id= 'addNetwork', description='Add Network...', action= 'dialog_addNetwork', @@ -965,7 +965,7 @@ ], 'IpAddresses':[ dict( - ordering=1.0, + ordering=90.0, id= 'deleteIpAddress', description='Delete IpAddresses...', action= 'dialog_deleteIpAddress', @@ -975,7 +975,7 @@ ], 'Manage': [ dict( - ordering=1.0, + ordering=90.0, id= 'changeClass', description='Change Class', action= 'dialog_changeClass', @@ -984,7 +984,7 @@ allowed_classes = ('Device','OperatingSystem'), ), dict( - ordering=2.0, + ordering=80.0, id= 'setProductionState', description='Set Production State', action= 'dialog_setProductionState', @@ -993,7 +993,7 @@ allowed_classes = ('Device','OperatingSystem','DeviceClass','DeviceGroup','Location','System'), ), dict( - ordering=2.0, + ordering=70.0, id= 'setPriority', description='Set Priority', action= 'dialog_setPriority', @@ -1002,7 +1002,7 @@ allowed_classes = ('Device','OperatingSystem','DeviceClass','DeviceGroup','Location','System'), ), dict( - ordering=2.0, + ordering=60.0, id= 'modelDevice', description='Model Device', action= 'collectDevice', @@ -1010,7 +1010,7 @@ allowed_classes = ('Device','OperatingSystem','DeviceClass','DeviceGroup','Location','System'), ), dict( - ordering=3.0, + ordering=50.0, id= 'resetIp', description='Reset IP', action= 'dialog_resetIp', @@ -1019,7 +1019,7 @@ allowed_classes = ('Device','OperatingSystem','DeviceClass','DeviceGroup','Location','System'), ), dict( - ordering=4.0, + ordering=40.0, id= 'resetCommunity', description='Reset Community', action= 'manage_snmpCommunity', @@ -1027,7 +1027,7 @@ allowed_classes = ('Device','OperatingSystem','DeviceClass','DeviceGroup','Location','System'), ), dict( - ordering=5.0, + ordering=30.0, id= 'renameDevice', description='Rename Device', action= 'dialog_renameDevice', @@ -1036,7 +1036,7 @@ allowed_classes = ('Device','OperatingSystem'), ), dict( - ordering=6.0, + ordering=20.0, id= 'deleteDevice', description='Delete Device', action= 'dialog_deleteDevice', @@ -1056,7 +1056,7 @@ allowed_classes = ('ReportClass',), ), dict( - ordering=90.0, + ordering=80.0, id= 'addDeviceReport', description='Add Device Report...', action= 'dialog_addReport', @@ -1065,7 +1065,7 @@ allowed_classes = ('ReportClass',), ), dict( - ordering=1.0, + ordering=70.0, id= 'addIpInterface', description='Add IpInterface...', action= 'dialog_addIpInterface', @@ -1074,7 +1074,7 @@ allowed_classes = ('OperatingSystem',), ), dict( - ordering=2.0, + ordering=60.0, id= 'addOSProcess', description='Add OSProcess...', action= 'dialog_addOSProcess', @@ -1083,7 +1083,7 @@ allowed_classes = ('OperatingSystem',), ), dict( - ordering=3.0, + ordering=50.0, id= 'addFileSystem', description='Add File System...', action= 'dialog_addFileSystem', @@ -1092,7 +1092,7 @@ allowed_classes = ('OperatingSystem',), ), dict( - ordering=4.0, + ordering=40.0, id= 'addIpRouteEntry', description='Add Route...', action= 'dialog_addIpRouteEntry', @@ -1101,7 +1101,7 @@ allowed_classes = ('OperatingSystem',), ), dict( - ordering=5.0, + ordering=30.0, id= 'addIpService', description='Add IpService...', action= 'dialog_addIpService', @@ -1110,7 +1110,7 @@ allowed_classes = ('OperatingSystem',), ), dict( - ordering=6.0, + ordering=20.0, id= 'addWinService', description='Add WinService...', action= 'dialog_addWinService', @@ -1121,7 +1121,7 @@ ], 'OIDMappings':[ dict( - ordering=1.0, + ordering=90.1, id= 'addOIDMapping', description='Add OID Mapping...', action= 'dialog_addOIDMapping', @@ -1129,7 +1129,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=90.0, id= 'deleteOIDMapping', description='Delete OID Mapping...', action= 'dialog_deleteOIDMapping', @@ -1139,7 +1139,7 @@ ], 'Traps':[ dict( - ordering=1.0, + ordering=90.1, id= 'addTrap', description='Add Trap...', action= 'dialog_addTrap', @@ -1147,7 +1147,7 @@ permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=90.0, id= 'deleteTrap', description='Delete Trap...', action= 'dialog_deleteTrap', @@ -1157,7 +1157,7 @@ ], 'Templates':[ dict( - ordering=20.0, + ordering=90.1, id= 'addTemplate', description='Add Template...', action= 'dialog_addTemplate', @@ -1165,7 +1165,7 @@ permissions=('Change Device',), ), dict( - ordering=19.0, + ordering=90.0, id= 'deleteTemplates', description='Delete Templates...', action= 'dialog_deleteTemplates', @@ -1181,7 +1181,7 @@ permissions=('Change Device',), ), dict( - ordering=18.0, + ordering=17.0, id= 'pasteTemplates', description='Paste Templates Into...', action= 'dialog_pasteTemplates', @@ -1189,7 +1189,7 @@ permissions=('Change Device',), ), dict( - ordering=16.0, + ordering=10.0, id= 'exportTemplates', description='Export Templates...', action= 'dialog_exportTemplates', |
From: <sv...@ze...> - 2007-04-23 20:08:50
|
Author: ecn Date: 2007-04-23 16:08:48 -0400 (Mon, 23 Apr 2007) New Revision: 4814 Modified: trunk/Products/ZenWin/zeneventlog.py Log: * handle connection errors Modified: trunk/Products/ZenWin/zeneventlog.py =================================================================== --- trunk/Products/ZenWin/zeneventlog.py 2007-04-23 20:07:38 UTC (rev 4813) +++ trunk/Products/ZenWin/zeneventlog.py 2007-04-23 20:08:48 UTC (rev 4814) @@ -23,7 +23,9 @@ import Globals from WinCollector import WinCollector as Base, TIMEOUT_CODE, RPC_ERROR_CODE -from Products.ZenEvents.ZenEventClasses import Heartbeat +from Products.ZenHub.services import WmiConfig +from Products.ZenEvents.ZenEventClasses import Heartbeat, Status_Wmi_Conn +from Products.ZenEvents import Event class zeneventlog(Base): @@ -43,8 +45,14 @@ if name in self.devices: continue self.devices[name] = self.getWatcher(name,user,passwd,sev) - except pywintypes.com_error: - self.log.exception("wmi connect failed on %s", name) + except Exception, ex: + msg = summary='WMI connect error on %s: %s' % (name, ex) + self.log.exception(msg) + self.sendEvent(dict(device=name, + eventKey=Status_Wmi_Conn, + agent=self.agent, + severity=Event.Error, + manager=self.manager)) def getWatcher(self, name, user, passwd, minSeverity): |
From: <sv...@ze...> - 2007-04-23 20:07:53
|
Author: ecn Date: 2007-04-23 16:07:38 -0400 (Mon, 23 Apr 2007) New Revision: 4813 Modified: trunk/Products/ZenWin/zenwin.py Log: * remove debugging prints Modified: trunk/Products/ZenWin/zenwin.py =================================================================== --- trunk/Products/ZenWin/zenwin.py 2007-04-23 19:44:40 UTC (rev 4812) +++ trunk/Products/ZenWin/zenwin.py 2007-04-23 20:07:38 UTC (rev 4813) @@ -35,7 +35,6 @@ self.username = username self.password = password self.services = dict([(k.lower(), v) for k, v in services.items()]) - print self.services class zenwin(Base): @@ -56,8 +55,6 @@ summary=msg, eventClass=Status_WinSrv, agent= self.agent, severity= sev, eventGroup= "StatusTest", manager=getfqdn()) - import pprint - pprint.pprint(evt) if sev > 0: self.log.critical(msg) else: @@ -120,7 +117,6 @@ s = w.nextEvent(100) if not s.state: return - print srec.name, s.name, s.state if s.state == 'Stopped': self.serviceStopped(srec, s.name.lower()) if s.state == 'Running': |
From: <sv...@ze...> - 2007-04-23 19:44:39
|
Author: ecn Date: 2007-04-23 15:44:40 -0400 (Mon, 23 Apr 2007) New Revision: 4812 Modified: trunk/Products/ZenWin/zenwin.py Log: work around rpc failures Modified: trunk/Products/ZenWin/zenwin.py =================================================================== --- trunk/Products/ZenWin/zenwin.py 2007-04-23 19:36:39 UTC (rev 4811) +++ trunk/Products/ZenWin/zenwin.py 2007-04-23 19:44:40 UTC (rev 4812) @@ -139,8 +139,17 @@ if device.name in self.wmiprobs: self.log.debug("WMI problems on %s: skipping" % device.name) continue - self.processDevice(device) + try: + self.processDevice(device) + except Exception, ex: + self.sendEvent(dict(summary="Wmi error talking to %s: %s" % + (device.name, ex), + device=device.name, + agent=self.agent, + eventClass=Status_Wmi_Conn)) + self.wmiprobs.append(device.name) + def updateDevices(self, devices): config = [] for n,u,p,s in devices: |
From: <sv...@ze...> - 2007-04-23 19:36:39
|
Author: ecn Date: 2007-04-23 15:36:39 -0400 (Mon, 23 Apr 2007) New Revision: 4811 Modified: trunk/bin/zenoss Log: * zenperfxmlrpc needs to go to a zenpack Modified: trunk/bin/zenoss =================================================================== --- trunk/bin/zenoss 2007-04-23 18:49:19 UTC (rev 4810) +++ trunk/bin/zenoss 2007-04-23 19:36:39 UTC (rev 4811) @@ -48,7 +48,6 @@ C="$C zenhub" C="$C zenmodeler" C="$C zenperfsnmp" -C="$C zenperfxmlrpc" C="$C zenprocess" C="$C zenping" C="$C zensyslog" |
From: <sv...@ze...> - 2007-04-23 18:49:18
|
Author: ecn Date: 2007-04-23 14:49:19 -0400 (Mon, 23 Apr 2007) New Revision: 4810 Modified: trunk/bin/zenoss Log: * zenwinmodeler is not called zenmodeler Modified: trunk/bin/zenoss =================================================================== --- trunk/bin/zenoss 2007-04-23 18:43:39 UTC (rev 4809) +++ trunk/bin/zenoss 2007-04-23 18:49:19 UTC (rev 4810) @@ -60,7 +60,7 @@ then C="$C zenwin" C="$C zeneventlog" - C="$C zenmodeler" + C="$C zenwinmodeler" fi for i in $ZENHOME/Products/*/daemons/* do |
From: <sv...@ze...> - 2007-04-23 18:43:39
|
Author: marc Date: 2007-04-23 14:43:39 -0400 (Mon, 23 Apr 2007) New Revision: 4809 Modified: trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt Log: #1277 * Removed import table Modified: trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt 2007-04-23 18:38:00 UTC (rev 4808) +++ trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt 2007-04-23 18:43:39 UTC (rev 4809) @@ -62,69 +62,7 @@ </tal:block> </tal:block> +</form> -<tal:block tal:define=" - tabletitle string:Import - "> -<tal:block metal:use-macro="here/zenuimacros/macros/zentable"> - -<!--==================== -Optional titlebar stuff - -<tal:block metal:fill-slot="menuslot"> </tal:block> -<tal:block metal:fill-slot="filterslot"> </tal:block> - - ====================--> - -<tal:block metal:fill-slot="zentablecontents"> - -<!-- BEGIN TABLE CONTENTS --> - - <tr class="tableheader" tal:condition="here/isManager"> - <td colspan="6"> - Import templates to PerfConf from the desired source - </td> - </tr> - <tr class="tableheader" tal:condition="here/isManager"> - <td colspan="6"> - - <input class="tableheader" type="submit" value="Import" - name="manage_importRRDTemplates:method" /> - from - <select class="tableheader" name="filenames" multiple="True" size="5"> - <option tal:repeat="filedata here/getRRDImportFilesData" - tal:attributes="value filedata/filename" - tal:content="filedata/display" /> - </select> - <!-- - and/or from URLs: - <textarea class="tableheader" name="urlnames" - cols="50" rows="4" - style="overflow:scroll;"></textarea> - <br /> - --> - Delete file(s) after import? - <input type="checkbox" name="dodelete" /> - </td> - </tr> - <!-- - <tr class="tableheader" tal:condition="here/isManager"> - <td colspan="6"> - <input class="tableheader" type="submit" - name="manage_importRRDTemplates:method" value="Browse" - disabled="True" /> - for templates on Zenoss.net - </td> - </tr> - --> -<!-- END TABLE CONTENTS --> - -</tal:block> -</tal:block> -</tal:block> - -</form> -</tal:block> -</tal:block> |
From: <sv...@ze...> - 2007-04-23 18:38:03
|
Author: ecn Date: 2007-04-23 14:38:00 -0400 (Mon, 23 Apr 2007) New Revision: 4808 Modified: trunk/Products/ZenWin/WinCollector.py trunk/Products/ZenWin/zeneventlog.py trunk/Products/ZenWin/zenwin.py Log: * use "watch" technique to watch for Service availability in ZenWin * add a heartbeat to the WMI collectors Modified: trunk/Products/ZenWin/WinCollector.py =================================================================== --- trunk/Products/ZenWin/WinCollector.py 2007-04-23 18:37:06 UTC (rev 4807) +++ trunk/Products/ZenWin/WinCollector.py 2007-04-23 18:38:00 UTC (rev 4808) @@ -28,9 +28,12 @@ from WinServiceTest import WinServiceTest from WinEventlog import WinEventlog +TIMEOUT_CODE = 2147209215 +RPC_ERROR_CODE = 2147023170 + class WinCollector(Base): - cycleInterval = 60. + wmiCycleInterval = 60. configCycleInterval = 20. initialServices = ['EventService', 'WmiConfig'] @@ -61,10 +64,11 @@ self.wmiprobs = driver.next() self.log.debug("Wmi Probs %r", (self.wmiprobs,)) self.processLoop() + self.sendEvent(self.heartbeat) except Exception, ex: self.log.exception("Error processing main loop") delay = time.time() - now - driveLater(max(0, self.cycleInterval - delay), self.scanCycle) + driveLater(max(0, self.wmiCycleInterval - delay), self.scanCycle) def buildOptions(self): @@ -93,7 +97,7 @@ if current is not None and current != v: self.log.info("Setting %s to %r", a, v); setattr(self, a, v) - self.heartbeat['timeout'] = self.cycleInterval*3 + self.heartbeat['timeout'] = self.wmiCycleInterval*3 def error(self, why): why.printTraceback() Modified: trunk/Products/ZenWin/zeneventlog.py =================================================================== --- trunk/Products/ZenWin/zeneventlog.py 2007-04-23 18:37:06 UTC (rev 4807) +++ trunk/Products/ZenWin/zeneventlog.py 2007-04-23 18:38:00 UTC (rev 4808) @@ -22,12 +22,9 @@ import wmiclient import Globals -from WinCollector import WinCollector as Base +from WinCollector import WinCollector as Base, TIMEOUT_CODE, RPC_ERROR_CODE from Products.ZenEvents.ZenEventClasses import Heartbeat -TIMEOUT_CODE = 2147209215 -RPC_ERROR_CODE = 2147023170 - class zeneventlog(Base): name = agent = "zeneventlog" Modified: trunk/Products/ZenWin/zenwin.py =================================================================== --- trunk/Products/ZenWin/zenwin.py 2007-04-23 18:37:06 UTC (rev 4807) +++ trunk/Products/ZenWin/zenwin.py 2007-04-23 18:38:00 UTC (rev 4808) @@ -16,18 +16,27 @@ import time from socket import getfqdn import pythoncom +from wmiclient import WMI +import pywintypes from twisted.internet import reactor, defer import Globals -from WinCollector import WinCollector as Base +from WinCollector import WinCollector as Base, TIMEOUT_CODE from Products.ZenHub.services import WmiConfig -from Products.ZenEvents.ZenEventClasses import Heartbeat, Status_Wmi_Conn +from Products.ZenEvents.ZenEventClasses import Heartbeat, Status_Wmi_Conn, Status_WinSrv -from StatusTest import StatusTest from WinServiceTest import WinServiceTest from WinEventlog import WinEventlog +class StatusTest: + def __init__(self, name, username, password, services): + self.name = name + self.username = username + self.password = password + self.services = dict([(k.lower(), v) for k, v in services.items()]) + print self.services + class zenwin(Base): name = agent = "zenwin" @@ -37,110 +46,113 @@ Base.__init__(self) self.wmiprobs = [] self.devices = [] + self.watchers = {} + self.statmsg = "Windows Service '%s' is %s" + def mkevt(self, devname, svcname, msg, sev): + "Compose an event" + name = "WinServiceTest" + evt = dict(device=devname, component=svcname, + summary=msg, eventClass=Status_WinSrv, + agent= self.agent, severity= sev, + eventGroup= "StatusTest", manager=getfqdn()) + import pprint + pprint.pprint(evt) + if sev > 0: + self.log.critical(msg) + else: + self.log.info(msg) + return evt - def getPlugins(self): - """Build a list of plugin instances for a device. - """ - plugins = (WinServiceTest(), WinEventlog()) - if not self.options.load: - self.options.load = ['WinServiceTest'] - plugins = [p for p in plugins if p.name in self.options.load] - if not plugins: - self.stop() - raise SystemExit("No plugins found for list: '%s'" % ( - ",".join(self.options.load))) - pnames = [p.name for p in plugins] - return plugins + def serviceStopped(self, srec, name): + self.log.warning('%s: %s stopped' % (srec.name, name)) + if name not in srec.services: return + status, severity = srec.services[name] + srec.services[name] = status + 1, severity + if status == 0: + msg = self.statmsg % (name, "down") + self.sendEvent(self.mkevt(srec.name, name, msg, severity)) + self.log.info("svc down %s, %s", srec.name, name) + + def serviceRunning(self, srec, name): + self.log.info('%s: %s running' % (srec.name, name)) + if name not in srec.services: return + status, severity = srec.services[name] + srec.services[name] = 0, severity + if status != 0: + msg = self.statmsg % (name, "up") + self.sendEvent(self.mkevt(srec.name, name, msg, 0)) + self.log.info("svc up %s, %s", srec.name, name) + def scanDevice(self, srec): + if not srec.services: + return None + wql = "select Name from Win32_Service where State='Running'" + w = WMI(srec.name, srec.username, srec.password) + w.connect() + svcs = [ svc.Name.lower() for svc in w.query(wql) ] + nextFd = os.open('/dev/null', os.O_RDONLY) + for name, (status, severity) in srec.services.items(): + name = name.lower() + self.log.debug("service: %s status: %d", name, status) + if name not in svcs: + self.serviceStopped(srec, name) + elif status > 0: + self.serviceRunning(srec, name) + w.close() + del w + import gc + gc.collect() - def processLoop(self, unused=None): - """Run WMI queries in two stages ExecQuery in semi-sync mode. - then process results later (when they have already returned) - """ - self.count = 0 - if self.options.debug: - # in debug mode open wmi connections sequentially (ie no threads) - for srec in self.devices: - if srec.name not in self.wmiprobs: - srec.run() - else: - self.log.warn("skipping %s no wmi connection",srec.name) - else: - # connect to WMI service in separate thread if no - # ping problem detected. - devices = self.devices[:] - running = [] - now = time.time() - while devices or running: - self.log.debug("devices:%d runing:%d", - len(devices), len(running)) - running = [ srec for srec in running if not srec.done() ] - needthreads = self.options.threads - len(running) - while devices and needthreads > 0: - srec = devices.pop() - if srec.name not in self.wmiprobs: - srec.start() - self.count += 1 - self.log.debug("count = %d", self.count) - running.append(srec) - needthreads -= 1 - else: - self.log.warn("skipping %s no wmi connection",srec.name) - if needthreads == 0 or not devices: - time.sleep(1) - if time.time() - now > self.cycleInterval*2: - problems = ', '.join([r.name for r in running]) - self.log.warning('%d servers (%s) still collecting ' - 'after %d seconds, giving up', - len(running), - problems, - self.cycleInterval*2) - for r in running[:]: - evt = { 'eventClass': Status_Wmi_Conn, - 'agent': self.agent, - 'severity':'4', - 'summary': 'Timeout failure during WMI check', - 'device': r.name, - 'component' : ''} - self.sendEvent(evt) - running.remove(r) - break + def getWatcher(self, srec): + wql = ("""SELECT * FROM __InstanceModificationEvent within 5 where """ + """TargetInstance ISA 'Win32_Service' """) + w = WMI(srec.name, srec.username, srec.password) + w.connect() + return w.watcher(wql) - #[ srec.close() for srec in self.devices ] - sys.stdout.flush() - self.sendEvent(self.heartbeat) - import gc; gc.collect() - self.log.info("Com InterfaceCount: %d", pythoncom._GetInterfaceCount()) - self.log.info("Com GatewayCount: %d", pythoncom._GetGatewayCount()) - if hasattr(sys, "gettotalrefcount"): - self.log.info("ref: %d", sys.gettotalrefcount()) + def processDevice(self, srec): + w = self.watchers.get(srec.name, None) + if not w: + self.scanDevice(srec) + self.watchers[srec.name] = w = self.getWatcher(srec) + try: + s = w.nextEvent(100) + if not s.state: + return + print srec.name, s.name, s.state + if s.state == 'Stopped': + self.serviceStopped(srec, s.name.lower()) + if s.state == 'Running': + self.serviceRunning(srec, s.name.lower()) + except pywintypes.com_error, e: + code,txt,info,param = e + if info: + wcode, source, descr, hfile, hcont, scode = info + scode = abs(scode) + if scode != TIMEOUT_CODE: + w.close() + del self.watchers[srec.name] + def processLoop(self): + for device in self.devices: + if device.name in self.wmiprobs: + self.log.debug("WMI problems on %s: skipping" % device.name) + continue + self.processDevice(device) def updateDevices(self, devices): config = [] for n,u,p,s in devices: - if self.options.device and self.options.device != n: continue - st = StatusTest(self, n, u, p, s, self.options.debug) - st.setPlugins(self.getPlugins()) + if self.options.device and self.options.device != n: + continue + st = StatusTest(n, u, p, s) config.append(st) if devices: self.devices = config def buildOptions(self): Base.buildOptions(self) - self.parser.add_option('--threads', - dest='threads', - default=4, - type="int", - help="number of parallel threads " - "during collection") - self.parser.add_option("-l", "--load", - action="append", - dest="load", - default=[], - help="plugin name to load can " - "have more than one") if __name__ == "__main__": |
From: <sv...@ze...> - 2007-04-23 18:37:06
|
Author: marc Date: 2007-04-23 14:37:06 -0400 (Mon, 23 Apr 2007) New Revision: 4807 Modified: trunk/Products/ZenModel/IpNetwork.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/viewNetworkOverview.pt Log: #1242 * Added organizerPaths to discoverDevices * Moved discoverDevices menu items. Modified: trunk/Products/ZenModel/IpNetwork.py =================================================================== --- trunk/Products/ZenModel/IpNetwork.py 2007-04-23 18:34:19 UTC (rev 4806) +++ trunk/Products/ZenModel/IpNetwork.py 2007-04-23 18:37:06 UTC (rev 4807) @@ -410,31 +410,38 @@ zcat.addColumn('getPrimaryId') - def discoverDevices(self,REQUEST = None): + def discoverDevices(self, organizerPaths=None, REQUEST = None): """ Load a device into the database connecting its major relations and collecting its configuration. - """ + """ + if not organizerPaths: return self.callZenScreen(REQUEST) + if REQUEST: response = REQUEST.RESPONSE dlh = self.deviceLoggingHeader() idx = dlh.rindex("</table>") response.write(str(dlh[:idx])) handler = setWebLoggingStream(response) - try: - zendiscCmd = "zendisc run --net=%s" % self.id - log.info('Executing command: %s' % zendiscCmd) - from popen2 import Popen4 - f = Popen4(zendiscCmd) - while 1: - s = f.fromchild.readline() - if not s: break - else: log.info(s) - log.info('Done') - except (SystemExit, KeyboardInterrupt): raise - except ZentinelException, e: - log.critical(e) - except: raise + + orgroot = self.getDmdRoot(self.dmdRootName) + from popen2 import Popen4 + for organizerName in organizerPaths: + try: + organizer = orgroot.getOrganizer(organizerName) + zendiscCmd = "zendisc run --net=%s" % organizer.id + log.info('Executing command: %s' % zendiscCmd) + f = Popen4(zendiscCmd) + while 1: + s = f.fromchild.readline() + if not s: break + else: log.info(s) + except (SystemExit, KeyboardInterrupt): raise + except ZentinelException, e: + log.critical(e) + except: raise + log.info('Done') + if REQUEST: self.loaderFooter(response) clearWebLoggingStream(handler) Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-23 18:34:19 UTC (rev 4806) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-23 18:37:06 UTC (rev 4807) @@ -936,19 +936,30 @@ ], 'Subnetworks':[ dict( - ordering=1.0, + ordering=90.0, + id= 'discoverDevices', + description= 'Discover Devices', + action= ('javascript:submitFormToMethod(' + '"subnetworkForm", "discoverDevices")'), + allowed_classes= ('IpNetwork',), + permissions=('Change Device',), + ), + dict( + ordering=80.0, id= 'deleteNetwork', description='Delete Networks...', action= 'dialog_deleteNetwork', isdialog=True, + allowed_classes= ('IpNetwork',), permissions=('Change Device',), ), dict( - ordering=2.0, + ordering=70.0, id= 'addNetwork', description='Add Network...', action= 'dialog_addNetwork', isdialog=True, + allowed_classes= ('IpNetwork',), permissions=('Change Device',), ), ], @@ -1185,19 +1196,8 @@ isdialog=True, permissions=('Change Device',), ), - ], + ], }) - - dmd.Networks.buildMenus( - {'Actions':[ - dict( - ordering=1.0, - id= 'discover', - description= 'Discover Devices', - action= 'discoverDevices', - allowed_classes= ('IpNetwork',) - ) - ] - }) + MenuRelations() Modified: trunk/Products/ZenModel/skins/zenmodel/viewNetworkOverview.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/viewNetworkOverview.pt 2007-04-23 18:34:19 UTC (rev 4806) +++ trunk/Products/ZenModel/skins/zenmodel/viewNetworkOverview.pt 2007-04-23 18:37:06 UTC (rev 4807) @@ -78,7 +78,9 @@ <span metal:use-macro="here/templates/macros/contentSeparator"/> -<form method="post" tal:attributes="action here/absolute_url_path"> +<form tal:attributes="method string:post; + name string:subnetworkForm; + action here/absolute_url_path"> <input type="hidden" name="zenScreenName" tal:attributes="value template/id"/> |
From: <sv...@ze...> - 2007-04-23 18:34:18
|
Author: ecn Date: 2007-04-23 14:34:19 -0400 (Mon, 23 Apr 2007) New Revision: 4806 Modified: trunk/Products/ZenModel/skins/zenmodel/viewPerformanceConfOverview.pt Log: * add wmiCycleTime Modified: trunk/Products/ZenModel/skins/zenmodel/viewPerformanceConfOverview.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/viewPerformanceConfOverview.pt 2007-04-23 18:33:55 UTC (rev 4805) +++ trunk/Products/ZenModel/skins/zenmodel/viewPerformanceConfOverview.pt 2007-04-23 18:34:19 UTC (rev 4806) @@ -21,6 +21,10 @@ <tr> + <td class="tableheader">WMI Cycle Interval (secs)</td> + <td class="tablevalues" tal:content="here/wmiCycleInterval" /> + </tr> + <tr> <td class="tableheader">Snmp Cycle Interval (secs)</td> <td class="tablevalues" tal:content="here/snmpCycleInterval" /> </tr> |
From: <sv...@ze...> - 2007-04-23 18:33:54
|
Author: ecn Date: 2007-04-23 14:33:55 -0400 (Mon, 23 Apr 2007) New Revision: 4805 Modified: trunk/Products/ZenModel/PerformanceConf.py trunk/Products/ZenModel/skins/zenmodel/editPerformanceConf.pt trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt Log: * add wmiCycleTime Modified: trunk/Products/ZenModel/PerformanceConf.py =================================================================== --- trunk/Products/ZenModel/PerformanceConf.py 2007-04-23 18:32:52 UTC (rev 4804) +++ trunk/Products/ZenModel/PerformanceConf.py 2007-04-23 18:33:55 UTC (rev 4805) @@ -88,6 +88,7 @@ security = ClassSecurityInfo() security.setDefaultAccess('allow') + wmiCycleInterval = 60 snmpCycleInterval = 300 configCycleInterval = 30 renderurl = '' @@ -104,6 +105,7 @@ ) _properties = ( + {'id':'wmiCycleInterval','type':'int','mode':'w'}, {'id':'snmpCycleInterval','type':'int','mode':'w'}, {'id':'configCycleInterval','type':'int','mode':'w'}, {'id':'renderurl','type':'string','mode':'w'}, Modified: trunk/Products/ZenModel/skins/zenmodel/editPerformanceConf.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/editPerformanceConf.pt 2007-04-23 18:32:52 UTC (rev 4804) +++ trunk/Products/ZenModel/skins/zenmodel/editPerformanceConf.pt 2007-04-23 18:33:55 UTC (rev 4805) @@ -24,6 +24,13 @@ <tal:block metal:fill-slot="zentablecontents"> <!-- BEGIN TABLE CONTENTS --> <tr> + <td class="tableheader">WMI Cycle Interval (secs)</td> + <td class="tablevalues"> + <input class="tablevalues" type="text" name="wmiCycleInterval:int" + size="10" tal:attributes="value here/wmiCycleInterval"/> + </td> + </tr> + <tr> <td class="tableheader">Snmp Cycle Interval (secs)</td> <td class="tablevalues"> <input class="tablevalues" type="text" name="snmpCycleInterval:int" Modified: trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-23 18:32:52 UTC (rev 4804) +++ trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-23 18:33:55 UTC (rev 4805) @@ -80,6 +80,8 @@ <span tal:condition="objects" tal:omit-tag=""> <tr> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( + tableName,'sequence','Seq')"/> + <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'name','Name')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'regex','Regex')"/> @@ -88,9 +90,18 @@ <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'count','Count')"/> </tr> - <tr tal:repeat="svcinst batch"> + <tr tal:repeat="svcinst batch" tal:define="editable here/isManager"> + <td> + <input tal:condition="editable" + type="text" name="seqmap:list" size="2" + tal:attributes="value svcinst/sequence"/> + <input tal:condition="editable" + type="hidden" name="origseq:list" + tal:attributes="value svcinst/sequence" /> + <span tal:condition="not:editable" tal:content="svcinst/sequence"/> + </td> <td class="tablevalues"> - <input tal:condition="here/isManager" + <input tal:condition="editable" type="checkbox" name="ids:list" tal:attributes="value svcinst/getId"/> <a tal:attributes="href svcinst/getPrimaryUrlPath" |
From: <sv...@ze...> - 2007-04-23 18:32:53
|
Author: ecn Date: 2007-04-23 14:32:52 -0400 (Mon, 23 Apr 2007) New Revision: 4804 Modified: trunk/Products/ZenHub/services/WmiConfig.py Log: * commit changes coming in from the modeler Modified: trunk/Products/ZenHub/services/WmiConfig.py =================================================================== --- trunk/Products/ZenHub/services/WmiConfig.py 2007-04-23 18:27:40 UTC (rev 4803) +++ trunk/Products/ZenHub/services/WmiConfig.py 2007-04-23 18:32:52 UTC (rev 4804) @@ -74,10 +74,12 @@ modname=""): dev = self.dmd.getObjByPath(url) adm = ApplyDataMap() - return adm.applyDataMap(dev, - datamap, - relname=relname, - compname=compname, - modname=modname) + result = adm.applyDataMap(dev, + datamap, + relname=relname, + compname=compname, + modname=modname) + import transaction + transaction.commit() + return result - |
From: <sv...@ze...> - 2007-04-23 18:27:40
|
Author: chris Date: 2007-04-23 14:27:40 -0400 (Mon, 23 Apr 2007) New Revision: 4803 Modified: tags/zenoss-1.1.2/inst/rpm/zenoss.spec Log: * synchronized with tagname by zenpkg Modified: tags/zenoss-1.1.2/inst/rpm/zenoss.spec =================================================================== --- tags/zenoss-1.1.2/inst/rpm/zenoss.spec 2007-04-23 18:24:59 UTC (rev 4802) +++ tags/zenoss-1.1.2/inst/rpm/zenoss.spec 2007-04-23 18:27:40 UTC (rev 4803) @@ -27,7 +27,7 @@ # set to 1 if the version of the software to be built is the trunk # if trunk is set to 0 the version will be extrapolated from the # rpm information contained in the %{version} and %{release} vars -%define trunk 1 +%define trunk 0 # the name of the ctl file for zenoss (in /etc/rc.d/rc#.d) %define S_zenoss S99zenoss @@ -41,8 +41,8 @@ # the RPM meta information Name: zenoss Summary: The Open Source Network Management System -Version: 1.1.0 -Release: 0 +Version: 1.1.2 +Release: 0 License: GPL Vendor: Zenoss, Inc. Packager: Christopher Blunck <ch...@ze...> |
From: <sv...@ze...> - 2007-04-23 18:24:59
|
Author: chris Date: 2007-04-23 14:24:59 -0400 (Mon, 23 Apr 2007) New Revision: 4802 Added: tags/zenoss-1.1.2/ Log: * auto-build of zenoss-1.1.2 by zenpkg Copied: tags/zenoss-1.1.2 (from rev 4801, branches/zenoss-1.1.x) |
From: <sv...@ze...> - 2007-04-23 18:24:13
|
Author: chris Date: 2007-04-23 14:24:11 -0400 (Mon, 23 Apr 2007) New Revision: 4801 Removed: tags/zenoss-1.1.2/ Log: sliding the tag |
From: <sv...@ze...> - 2007-04-23 15:55:52
|
Author: marc Date: 2007-04-23 11:55:49 -0400 (Mon, 23 Apr 2007) New Revision: 4800 Added: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteReportClasses.pt trunk/Products/ZenModel/skins/zenmodel/dialog_deleteReports.pt trunk/Products/ZenModel/skins/zenmodel/dialog_moveReports.pt Modified: trunk/Products/ZenModel/ReportClass.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt trunk/Products/ZenModel/skins/zenmodel/viewReportClass.pt Log: #1146 * Added 2.0 menus to Reports * Added 2.0 menus to Report Classes * Added "Status" tab * Added ZenPack menu items Modified: trunk/Products/ZenModel/ReportClass.py =================================================================== --- trunk/Products/ZenModel/ReportClass.py 2007-04-23 14:48:55 UTC (rev 4799) +++ trunk/Products/ZenModel/ReportClass.py 2007-04-23 15:55:49 UTC (rev 4800) @@ -57,10 +57,10 @@ 'actions' : ( { 'id' : 'view' - , 'name' : 'View' + , 'name' : 'Status' , 'action' : 'viewReportClass' , 'permissions' : ( "View",) - , 'visible' : 0 + , 'visible' : 1 }, ) }, @@ -68,7 +68,14 @@ security = ClassSecurityInfo() + def manage_addReportClass(self, id, title = None, REQUEST = None): + """make a device class""" + dc = ReportClass(id, title) + self._setObject(id, dc) + if REQUEST: + return self.callZenScreen(REQUEST) + def reports(self): """Return list of report instances. """ Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-23 14:48:55 UTC (rev 4799) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-23 15:55:49 UTC (rev 4800) @@ -522,8 +522,56 @@ isdialog= True), ], 'ReportClass_list': [ - ZenPackItems + ZenPackItems, + dict( + ordering=90.0, + id= 'addReportClass', + description='Add Report Organizer...', + action= 'dialog_addReportClass', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + dict( + ordering=80.0, + id= 'deleteReportClasses', + description='Delete Report Organizers...', + action= 'dialog_deleteReportClasses', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), ], + 'Report_list': [ + ZenPackItems, + dict( + ordering=90.0, + id= 'addDeviceReport', + description='Add Device Report...', + action= 'dialog_addReport', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + dict( + ordering=80.0, + id= 'deleteDeviceReports', + description='Delete Device Reports...', + action= 'dialog_deleteReports', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + dict( + ordering=70.0, + id= 'moveDeviceReports', + description='Move Device Reports...', + action= 'dialog_moveReports', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + ], 'ZenPack_list':[ dict( ordering=1.0, @@ -988,6 +1036,24 @@ ], 'Add': [ dict( + ordering=90.0, + id= 'addReportClass', + description='Add Report Organizer...', + action= 'dialog_addReportClass', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + dict( + ordering=90.0, + id= 'addDeviceReport', + description='Add Device Report...', + action= 'dialog_addReport', + isdialog=True, + permissions=('Change Device',), + allowed_classes = ('ReportClass',), + ), + dict( ordering=1.0, id= 'addIpInterface', description='Add IpInterface...', @@ -1041,24 +1107,6 @@ permissions=('Change Device',), allowed_classes = ('OperatingSystem',), ), - dict( - ordering=7.0, - id= 'addReportOrganizer', - description='Add Report Organizer...', - action= 'dialog_addReportClass', - isdialog=True, - permissions=('Change Device',), - allowed_classes = ('ReportClass',), - ), - dict( - ordering=8.0, - id= 'addDeviceReport', - description='Add Device Report...', - action= 'dialog_addReport', - isdialog=True, - permissions=('Change Device',), - allowed_classes = ('ReportClass',), - ) ], 'OIDMappings':[ dict( Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt 2007-04-23 14:48:55 UTC (rev 4799) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt 2007-04-23 15:55:49 UTC (rev 4800) @@ -1,16 +1,16 @@ <h2>Add Report</h2> -<form method="post" tal:attributes="action here/absolute_url" name="_"> <p> What would you like to name your Report?<br/> </p> <br/> -<p style="text-align:center;"> -<input type="text" name="id"> +<p style="text-align:right;"> +Name: <input type="text" name="id"> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addDeviceReport:method" - value="Yes, Create this Report" /> + value="Yes, Create this Report" + tal:attributes="onclick string:return $$('dialog').submit_form( + '${here/getPrimaryUrlPath}', 'reportForm')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> -</form> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt 2007-04-23 14:48:55 UTC (rev 4799) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt 2007-04-23 15:55:49 UTC (rev 4800) @@ -1,16 +1,16 @@ <h2>Add Report Organizer</h2> -<form method="post" tal:attributes="action here/absolute_url" name="_"> <p> What would you like to name your Report Organizer?<br/> </p> <br/> -<p style="text-align:center;"> -<input type="text" name="newPath"> +<p style="text-align:right;"> +Name: <input type="text" name="id"> </p> <div id="dialog_buttons"> -<input type="submit" name="manage_addOrganizer:method" - value="Yes, Create this Report Organizer" /> +<input type="submit" name="manage_addReportClass:method" + value="Yes, Create this Report Organizer" + tal:attributes="onclick string:return $$('dialog').submit_form( + '${here/getPrimaryUrlPath}', 'reportClassForm')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> -</div> -</form> \ No newline at end of file +</div> \ No newline at end of file Added: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteReportClasses.pt Added: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteReports.pt Added: trunk/Products/ZenModel/skins/zenmodel/dialog_moveReports.pt Modified: trunk/Products/ZenModel/skins/zenmodel/viewReportClass.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/viewReportClass.pt 2007-04-23 14:48:55 UTC (rev 4799) +++ trunk/Products/ZenModel/skins/zenmodel/viewReportClass.pt 2007-04-23 15:55:49 UTC (rev 4800) @@ -1,7 +1,9 @@ <tal:block metal:use-macro="here/templates/macros/page2"> <tal:block metal:fill-slot="contentPane"> -<form method="post" tal:attributes="action here/absolute_url_path"> +<form tal:attributes="method string:post; + name string:reportClassForm; + action here/absolute_url_path"> <input type="hidden" name="zenScreenName" tal:attributes="value template/id"/> @@ -69,7 +71,9 @@ </form> <br> -<form method="post" tal:attributes="action here/absolute_url_path"> +<form tal:attributes="method string:post; + name string:reportForm; + action here/absolute_url_path"> <input type="hidden" name="zenScreenName" tal:attributes="value template/id"/> @@ -77,7 +81,8 @@ objects here/reports; showfilterbox python:True; batch python:here.ZenTableManager.getBatch(tableName,objects); - tabletitle string:Reports" + tabletitle string:Reports; + menu_id string:Report_list" tal:condition="objects"> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> @@ -117,29 +122,6 @@ <span metal:use-macro="here/zenTableNavigation/macros/navbody"/> </td> </tr> - <tr tal:condition="python:here.isManager() and here.id=='Device Reports'"> - <td class="tableheader" colspan="2"> - <input class="tableheader" type="text" name="id"/> - <input class="tableheader" type="submit" - name="manage_addDeviceReport:method" value=" Add " /> - | - <input class="tableheader" type="submit" name="moveReports:method" - value="Move To" /> - <select class="tableheader" name="moveTarget" - tal:define="targets here/childMoveTargets"> - <option value=""></option> - <option tal:repeat="target targets" - tal:content="target">/Server/Linux</option> - </select> - | - <input class="tableheader" type="submit" - name="zmanage_delObjects:method" value=" Delete " /> - | - <input class="tableheader" type="submit" - name="SelectButton" value="Select All" - onClick="toggleSelect(this.form);return false"/> - </td> - </tr> <!-- END TABLE CONTENTS --> |
From: <sv...@ze...> - 2007-04-23 14:48:57
|
Author: ecn Date: 2007-04-23 10:48:55 -0400 (Mon, 23 Apr 2007) New Revision: 4799 Modified: trunk/Products/ZenWin/WinCollector.py Log: * config cycle is in minutes Modified: trunk/Products/ZenWin/WinCollector.py =================================================================== --- trunk/Products/ZenWin/WinCollector.py 2007-04-23 14:09:54 UTC (rev 4798) +++ trunk/Products/ZenWin/WinCollector.py 2007-04-23 14:48:55 UTC (rev 4799) @@ -108,8 +108,8 @@ yield self.configService().callRemote(self.deviceConfig) self.updateDevices(driver.next()) except Exception, ex: - self.log.exception("Error fecthing config") - driveLater(self.configCycleInterval, doReconfigure) + self.log.exception("Error fetching config") + driveLater(self.configCycleInterval * 60, doReconfigure) return drive(doReconfigure) def connected(self): |
From: <sv...@ze...> - 2007-04-23 14:09:54
|
Author: marc Date: 2007-04-23 10:09:54 -0400 (Mon, 23 Apr 2007) New Revision: 4798 Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt trunk/Products/ZenModel/skins/zenmodel/dialog_deleteMenuItems.pt trunk/Products/ZenModel/skins/zenmodel/dialog_saveOrdering.pt trunk/Products/ZenModel/skins/zenmodel/editMenus.pt Modified: trunk/Products/ZenModel/DataRoot.py trunk/Products/ZenModel/ZenMenuable.py trunk/Products/ZenModel/migrate/menus.py Log: #1238 * Added editMenu.pt and Menus tab in Settings * Save Order, Add, Delete * AddToZenPack Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2007-04-23 13:58:35 UTC (rev 4797) +++ trunk/Products/ZenModel/DataRoot.py 2007-04-23 14:09:54 UTC (rev 4798) @@ -137,6 +137,11 @@ , 'action' : 'viewZenPacks' , 'permissions' : ( "Manage DMD", ) }, + { 'id' : 'menus' + , 'name' : 'Menus' + , 'action' : 'editMenus' + , 'permissions' : ( "Manage DMD", ) + }, { 'id' : 'viewHistory' , 'name' : 'Changes' , 'action' : 'viewHistory' Modified: trunk/Products/ZenModel/ZenMenuable.py =================================================================== --- trunk/Products/ZenModel/ZenMenuable.py 2007-04-23 13:58:35 UTC (rev 4797) +++ trunk/Products/ZenModel/ZenMenuable.py 2007-04-23 14:09:54 UTC (rev 4798) @@ -10,7 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -from AccessControl import ClassSecurityInfo, getSecurityManager, Unauthorized +from AccessControl import ClassSecurityInfo, getSecurityManager, Unauthorized, Permissions from ZenMenu import ZenMenu from Globals import InitializeClass from Acquisition import aq_base, aq_parent, aq_chain @@ -18,7 +18,6 @@ from Products.ZenUtils.Utils import cmpClassNames from zExceptions import NotFound - class ZenMenuable: """ ZenMenuable is a mixin providing menuing. """ @@ -43,6 +42,44 @@ return self.callZenScreen(REQUEST) return mu + + security.declareProtected('Change Device', 'manage_addZenMenuItem') + def manage_addZenMenuItem(self, menuid, id=None, description='', action='', + permissions=(Permissions.view,), isdialog=False, isglobal=True, + banned_classes=(), allowed_classes=(), ordering=0.0, REQUEST=None): + """ Add ZenMenuItem + """ + menu = getattr(self.zenMenus, menuid, None) + if not menu: menu = self.manage_addZenMenu(menuid) + menu.manage_addZenMenuItem(id, description, action, + permissions, isdialog, isglobal, + banned_classes, allowed_classes, ordering) + if REQUEST: + return self.callZenScreen(REQUEST) + + + security.declareProtected('Change Device', 'manage_deleteZenMenuItem') + def manage_deleteZenMenuItem(self, menuid, delids=(), REQUEST=None): + """ Delete Menu Items """ + menu = getattr(self.zenMenus, menuid, None) + if menu: + menu.manage_deleteZenMenuItem(delids) + if REQUEST: + return self.callZenScreen(REQUEST) + + + security.declareProtected('Change Device', 'manage_saveMenuItemOrdering') + def manage_saveMenuItemOrdering(self, menuid, REQUEST=None): + """ Delete Menu Items """ + menu = getattr(self.zenMenus, menuid, None) + if menu and REQUEST: + for menuitem in menu.getMenus(menuid): + ordering = REQUEST[menuitem.id] + setattr(menuitem, 'ordering', ordering) + if REQUEST: + return self.callZenScreen(REQUEST) + + security.declareProtected('Change Device', 'manage_addItemsToZenMenu') def manage_addItemsToZenMenu(self, menuid, items=[{}]): """ Add ZenMenuItems to a ZenMenu. Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-23 13:58:35 UTC (rev 4797) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-23 14:09:54 UTC (rev 4798) @@ -76,6 +76,33 @@ dmd.buildMenus( { 'TopLevel':[], + 'Menus':[ + ZenPackItems, + dict(action='dialog_addMenuItem', + allowed_classes=['DataRoot',], + description='Add Menu Item...', + ordering=90.0, + isdialog=True, + permissions=('Manage DMD',), + id='addMenuItem' + ), + dict(action='dialog_deleteMenuItems', + allowed_classes=['DataRoot',], + description='Delete Menu Items...', + ordering=80.0, + isdialog=True, + permissions=('Manage DMD',), + id='deleteMenuItems' + ), + dict(action='dialog_saveOrdering', + allowed_classes=['DataRoot',], + description='Save Ordering...', + ordering=70.0, + isdialog=True, + permissions=('Manage DMD',), + id='saveOrdering' + ), + ], 'Edit':[ dict(action='viewHistory', allowed_classes=['Device', Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt Added: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteMenuItems.pt Added: trunk/Products/ZenModel/skins/zenmodel/dialog_saveOrdering.pt Added: trunk/Products/ZenModel/skins/zenmodel/editMenus.pt |
From: <sv...@ze...> - 2007-04-23 13:58:33
|
Author: ecn Date: 2007-04-23 09:58:35 -0400 (Mon, 23 Apr 2007) New Revision: 4797 Modified: trunk/Products/ZenWin/zeneventlog.py trunk/Products/ZenWin/zenwin.py trunk/Products/ZenWin/zenwinmodeler.py Log: * lots of refactor issues Modified: trunk/Products/ZenWin/zeneventlog.py =================================================================== --- trunk/Products/ZenWin/zeneventlog.py 2007-04-23 13:58:10 UTC (rev 4796) +++ trunk/Products/ZenWin/zeneventlog.py 2007-04-23 13:58:35 UTC (rev 4797) @@ -30,7 +30,7 @@ class zeneventlog(Base): - agent = "zeneventlog" + name = agent = "zeneventlog" def __init__(self): Base.__init__(self) @@ -40,7 +40,7 @@ """get the config data from server""" for name, user, passwd, sev, url in devices: try: - if name not in self.wmiprobs: + if name in self.wmiprobs: self.log.info('wmi prob on %s skipping', name) continue if name in self.devices: Modified: trunk/Products/ZenWin/zenwin.py =================================================================== --- trunk/Products/ZenWin/zenwin.py 2007-04-23 13:58:10 UTC (rev 4796) +++ trunk/Products/ZenWin/zenwin.py 2007-04-23 13:58:35 UTC (rev 4797) @@ -30,7 +30,8 @@ class zenwin(Base): - agent = "zenwin" + name = agent = "zenwin" + deviceConfig = 'getWinServices' def __init__(self): Base.__init__(self) @@ -118,7 +119,7 @@ def updateDevices(self, devices): config = [] - for n,u,p,s,_ in devices: + for n,u,p,s in devices: if self.options.device and self.options.device != n: continue st = StatusTest(self, n, u, p, s, self.options.debug) st.setPlugins(self.getPlugins()) Modified: trunk/Products/ZenWin/zenwinmodeler.py =================================================================== --- trunk/Products/ZenWin/zenwinmodeler.py 2007-04-23 13:58:10 UTC (rev 4796) +++ trunk/Products/ZenWin/zenwinmodeler.py 2007-04-23 13:58:35 UTC (rev 4797) @@ -31,7 +31,7 @@ class zenwinmodeler(Base): evtClass = Status_WinSrv - agent = "zenwinmodeler" + name = agent = "zenwinmodeler" evtAlertGroup = "ServiceTest" deviceConfig = 'getDeviceWinInfo' |
From: <sv...@ze...> - 2007-04-23 13:58:10
|
Author: ecn Date: 2007-04-23 09:58:10 -0400 (Mon, 23 Apr 2007) New Revision: 4796 Modified: trunk/Products/ZenWin/StatusTest.py Log: * clue me into what problems I'm having Modified: trunk/Products/ZenWin/StatusTest.py =================================================================== --- trunk/Products/ZenWin/StatusTest.py 2007-04-23 13:32:44 UTC (rev 4795) +++ trunk/Products/ZenWin/StatusTest.py 2007-04-23 13:58:10 UTC (rev 4796) @@ -93,7 +93,8 @@ if descr: wmsg = descr.strip() msg += wmsg self.sendFail(msg) - except: + except Exception, ex: + log.exception("Unkhandled exception", ex) msg = "plugin %s failed on %s" % (plugin.name,self.name) self.sendFail(msg) |