Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, Zenoss Inc. 5 # 6 # This program is free software; you can redistribute it and/or modify it 7 # under the terms of the GNU General Public License version 2 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 from Products.ZenStatus import pingtree 15 from Products.ZenHub.services.PerformanceConfig import PerformanceConfig 16 from Products.ZenHub.PBDaemon import translateError 1719 "Support zenping configuration loading" 20 21 @translateError 246726 pm = dmd.Monitors.getPerformanceMonitor(self.instance) 27 me = pm.findDevice(root) 28 if not me: 29 me = self.lookupByIp(dmd, pm, fallbackIp) 30 if me: 31 self.log.info("building pingtree from %s", me.id) 32 tree = pingtree.buildTree(me) 33 else: 34 self.log.critical("ZenPing '%s' not found, " 35 "ignoring network topology.", 36 root) 37 tree = pingtree.PingTree(fallbackIp) 38 tree.root = pingtree.RouterNode(fallbackIp, root, 0) 39 tree.root.addNet(tree, "default", "default") 40 config = dmd.Monitors.Performance._getOb(self.instance) 41 devices = config.getPingDevices() 42 self.prepDevices(tree, devices) 43 return tree.root44 4547 return device48 4951 """Try to find the root device by our IP 52 """ 53 ip = dmd.Networks.findIp(fallbackIp) 54 if ip and ip.device() and \ 55 ip.device().getPerformanceServerName() == pm.id: 56 return ip.device()57 5860 """resolve dns names and make StatusTest objects""" 61 for device in devices: 62 if not pingtree.hasDev(device): 63 pingtree.addDevice(device)6466 return listener.callRemote('updateConfig')
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Fri Aug 28 03:05:40 2009 | http://epydoc.sourceforge.net |