Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Dev chat 07/09/2009

VERSION 1 
Created on: Sep 14, 2009 11:17 AM by John Hamilton - Last Modified:  Sep 14, 2009 11:17 AM by John Hamilton
The topic for #zenoss is: Zenoss Developers will be here Thursday 11am EDT (10:05:02 AM)
10:05:33 AM Jane_Curry: The 2.4 Dev Guide says (p71) "classes should be subclassed from ZenModel and objects initialised from within our ZenPack's --Init__.py
10:06:03 AM Jane_Curry: I cannot see anything in any of the ZenPack __init__.py files (I think I've tried them all)
10:06:35 AM bwest: I haven't seen anything either
10:06:49 AM Jane_Curry: I set the object class for a device class by setting the zProperty zPythonClass to my object class..
10:07:14 AM Jane_Curry: .. like ZenPacks.skills1st.bridge.BridgeDevice
10:07:27 AM bwest: mray: this is an easy one I Cannot clear events from the events console? Can i force a clear from commandline?
10:07:30 AM atrawog: Jane_Curry: What everybody seams to do is: from Globals import InitializeClass InitializeClass(LinuxFileSystem)
10:07:34 AM __ian__: What exactly are you trying to do?
10:08:01 AM mrayzenoss: bwest: how can you not clear them? Do you not have the proper permissions as the current user?
10:08:30 AM __ian__: Jane_Curry: That is, what's the symptom?
10:08:43 AM bwest: mray: I am the admin. I check the events I want to move to history and and click the move to history option and nothing happens
10:09:21 AM __ian__: Jane_Curry: What atrawog said, really. You don't have to do it in __init__.py...if I'm understanding you correctly.
10:10:03 AM mrayzenoss: bwest: very strange. Which version and which browser?
10:10:15 AM bwest: 2.4.1 firefox
10:10:40 AM bwest: mray: I have restarted zenoss serveral times to no avail
10:10:47 AM Jane_Curry: OK - I have the import InitializwClss and the end of my object class file has InitializeClass(BridgeDevice)
10:10:59 AM Jane_Curry: Are we saying that that is all I need??
10:11:07 AM __ian__: Not sure exactly what you're trying to do
10:11:24 AM Jane_Curry: Do I NOT need to set the zPythonClass??
10:11:50 AM __ian__: Is your goal to get the class associated with a particular DeviceClass?
10:12:31 AM Jane_Curry: __ian__ I am trying to create a new device class called BridgeDevice which has a component class, BridgeInterface, which will show information for all ports on a Bridge (switch really)
10:12:37 AM mrayzenoss: bwest: I don't have any good suggestions really. Log out, stop zenoss, start zenoss, clear your browser cache, log back in as the 'admin'
10:12:49 AM __ian__: That paragraph in the dev guide is confusing. I don't understand what it's saying.
10:13:03 AM Jane_Curry: Oh good - thought it was me....
10:13:03 AM __ian__: Right, and as long as you've created the class you have succeeded.
10:13:04 AM mrayzenoss: bwest: you can move them in mysql, but that's besides the point
venturaville [n=venturav@157.166.167.129] entered the room. (10:13:25 AM)
10:13:34 AM bwest: mray:There is no command I can use from the command line to delete all events?
10:13:49 AM __ian__: If you want it to be used in a particular DeviceClass, yeah, you set the value of zPythonClass
10:13:58 AM __ian__: on the DeviceClass
10:14:23 AM Jane_Curry: __ian__ yup - the goal is to get the class associated with a particular DeviceClass
10:14:29 AM atrawog: Jane_Curry: You have to set the zPythonClass. But up to my knowledge the class won't work without initializing it via InitializeClass()
10:14:34 AM mrayzenoss: bwest: let me check
10:14:44 AM ckrough: Has there been any work on a unified event console for bringing together events from multiple installation sites?
10:14:59 AM __ian__: atrawog: That's sort of true. It'll probably work fine; InitializeClass() is a Zope thing that registers it so you can add it through the ZMI
10:15:16 AM bwest: ckrough:I know that is an enterprise feature
10:15:37 AM __ian__: Jane_Curry: What you want is a simple migrate script to make sure the property is set to the correct value.
10:15:47 AM ckrough: bwest: it is? I'm an Enterprise user, havent seen that. Is this recent?
10:15:52 AM Jane_Curry: .. so the good practice seems to be to set both the zPythonClass and to Initialize
10:16:33 AM Jane_Curry: __ian__ - not sure what you mean about "a simple migrate script"
10:16:40 AM bwest: ckrough:I should have said I think, I thought that was the whole point of the global dashboard
10:16:40 AM __ian__: Jane_Curry: Actually, you don't even need a migrate script, since you're creating the device class in this pack, right?
10:16:57 AM ckrough: bwest: Ill review the later versions again. Im still running 2.3.3
10:17:27 AM __ian__: Jane_Curry: Migrate script was red herring. All you have to do is set the property value on your device class.
10:17:29 AM bwest: ckrough: try looking at the info for 2.4.1 and later
cluther left the room. (10:17:39 AM)
10:17:48 AM ckrough: bwest: heh, even 2.3.3 http://www.zenoss.com/community/docs/zenoss-guide/2.3.3/ch26s01.html
10:17:53 AM ckrough: bwest: thanks
10:18:05 AM Jane_Curry: got it - that's what I have but I was confused by the comments about __init__.py in the dev guide
10:18:20 AM bwest: cluther:mray is looking for me but Can i force a clear from commandline?
mrayzenoss left the room (quit: Read error: 110 (Connection timed out)). (10:18:27 AM)
10:18:31 AM __ian__: Jane_Curry: Well, there's lots of stuff that can happen in __init__.py.
bakermd left the room (quit: "Peace out!"). (10:18:38 AM)
cluther [n=Adium@static-72-81-253-234.bltmmd.fios.verizon.net] entered the room. (10:18:38 AM)
mode (+o cluther ) by ChanServ (10:18:38 AM)
You are now known as mrayzenoss (10:18:42 AM)
mode (+o mrayzenoss ) by ChanServ (10:18:43 AM)
10:18:58 AM Jane_Curry: __ian__ but do I control it and do I care??????
10:19:11 AM __ian__: Jane_Curry: I believe what the dev guide is talking about is the case where you want to add a new zProperty
10:19:13 AM ckrough: OK, next question/request... is there any existing zenpacks/functionality to create a summary alert when a specified event threshold is reached? ie; rather than sending 2000 emails, can a single email be sent summarizing the crisis once N events are generated in under X seconds?
10:19:45 AM bwest: ckrough use the filter for alerts
10:20:29 AM bwest: cluther: mray is looking but I cannot Delete events from my event console. Can i force a clear from commandline?
10:20:38 AM __ian__: Jane_Curry: if you dump something like this in the __init__.py of a ZenPack, it'll create new zProperties for you: http://pastebin.ca/1489726
10:20:50 AM __ian__: Jane_Curry: But no, in the instant case I believe you don't care.
10:21:11 AM mrayzenoss: bwest: mysql -uzenoss -pzenoss events -e "delete from status"
10:21:26 AM __ian__: mrayzenoss: whoa there
10:21:31 AM bwest: thx
10:21:42 AM mrayzenoss: bwest: that will delete _ALL_ current events
10:21:44 AM __ian__: mrayzenoss: nm, was thinking of history.
10:21:54 AM bwest: yes i want to delete those to
10:22:01 AM mrayzenoss: bwest: change status -> history to delete those
10:22:05 AM ckrough: bwest: regarding the filter, I am referring to multiple device events, not a single device. Like when a row or two of a DC is lost and path outage doesnt apply, I get thousands of alerts when I could just use one that says "omg things are bad"
10:22:09 AM __ian__: mrayzenoss: not quite
10:22:21 AM __ian__: mrayzenoss: Deleting from history is not as simple as that
10:22:32 AM mrayzenoss: __ian__: hmmm... I just wiped my history out with it
10:22:38 AM __ian__: mrayzenoss: Because it needs to clean up the log and details tables too
jplouis [n=jplouis@rrcs-24-173-187-218.sw.biz.rr.com] entered the room. (10:22:55 AM)
10:22:55 AM mrayzenoss: __ian__: yeah
10:23:10 AM mrayzenoss: bwest: also wipe out 'log' 'alert_state' 'detail"
10:23:27 AM bwest: mray:with the same command
10:23:28 AM mrayzenoss: bwest: here's the schema, go nuts: http://dev.zenoss.org/trac/browser/branches/zenoss-2.4.x/Products/ZenEvents/db/zenevents.sql
HKhan left the room (quit: "INSERT MESSAGE"). (10:25:51 AM)
10:26:04 AM __ian__: ckrough: I don't think that functionality exists yet.
10:26:07 AM bwest: another question On the event console I want to add the field duration: that shows the time the event has held this status
10:26:22 AM ckrough: __ian__: thanks
10:26:41 AM __ian__: ckrough: I'll make a ticket for that enhancement. Sure would be cool.
HKhan [n=hkhan@hamzah.is.an.evil.g3nius.net] entered the room. (10:27:17 AM)
10:27:22 AM bwest: is that possible
10:28:07 AM __ian__: bwest: Possible but not simple. That'll take some code.
10:28:14 AM Jane_Curry: Thanks __ian__ - next one........
10:28:41 AM mrayzenoss: bwest: so you have firstTime, lastTime and stateChange
cgibbons_ [n=cgibbons@quagmire.nuclearbunny.org] entered the room. (10:28:44 AM)
10:29:25 AM bwest: mray: if by stateChange you mean the time that the event has been in a particular state
10:29:30 AM bwest: then yes
10:29:33 AM mrayzenoss: bwest: and the default expiration for events is 4 hours
10:29:49 AM mrayzenoss: bwest: stateChange is the time of the last change
10:29:52 AM mrayzenoss: not duration
10:30:28 AM bwest: I would like a field that shows how long an event has been in a it's particular state to replace the count field
10:30:34 AM bwest: just like in nagios
10:31:10 AM Jane_Curry: I have a method in my object definition file in my ZenPack that takes a local attribute (RemoteAddress) and then searches through the ZODB database for any devices that match this RemoteAddress (its a MAC address)
shakespear [n=chris@chello080108218064.4.13.vie.surfer.at] entered the room. (10:31:18 AM)
10:31:18 AM mrayzenoss: bwest: you could change your sorting to be by firstTime
10:31:54 AM mrayzenoss: bwest: the events wouldn't leave the console unless 4 hours had passed with no changes
10:32:03 AM mrayzenoss: you'd have to do the math in your head though...
10:32:27 AM mrayzenoss: you can also change the 4 hour Event Aging Threshold
10:32:45 AM shakespear: cluther: the collector is running without an error - but: the custom property is not set during initial collection - even not if I enter an value manually befor the collection
10:32:46 AM bwest: mray: yes but that doesn't quite achieve my goal. I want to look at an event and have a field that shows how long this device has had this problem.
10:33:03 AM mrayzenoss: yeah, what __ian__ said then
10:33:12 AM shakespear: cluther: it seems om.setZenProperty = MultiArgs('cFirmwareVersionCabinet', getdata['_cFirmwareVersionCabinet']) doesn't have the desired effect
10:33:16 AM mrayzenoss: you could open an enhancement request
10:33:26 AM bwest: ok. thx
10:33:39 AM __ian__: bwest: Something similar to that is planned for the next release
10:33:54 AM mrayzenoss: yeah, the Event Console is getting some love from Ian for King Crab
10:34:01 AM bwest: perfect
10:34:30 AM Jane_Curry: ... what I want to do is to use the same code in my modeler plugin to populate a RemoteIpAddress attribute ion my new object class....
10:35:15 AM bwest: _ian_: how does zPingInterfaceDescription and zPingInterfaceName work? will this allow me to create events off interfaces being down?
10:35:33 AM Jane_Curry: ... but I can't find the right way to setup dmd - here is what I have in the object class file...
10:36:03 AM Jane_Curry: def getIpRemoteAddress(self):
10:36:07 AM Jane_Curry: dmd=self.dmd
10:36:11 AM Jane_Curry: devmac=self.RemoteAddress
10:36:12 AM Jane_Curry: IpAddress=[]
10:36:12 AM Jane_Curry: Ips=dmd.ZenLinkManager.layer2_catalog(macaddress=devmac)
10:36:12 AM Jane_Curry: for i in Ips:
10:36:12 AM Jane_Curry: IpAddress=IpAddress + [i.getObject().manageIp]
10:36:12 AM Jane_Curry: return IpAddress
10:37:04 AM Jane_Curry: ... "self" in this case is the class for the modeler plugin, not the class for the object itself...
10:37:48 AM Jane_Curry: ... so it all barfs out in the modeler plugin
10:37:56 AM __ian__: ah, right. Hang on, lemme check
10:39:44 AM bwest: mray: is there a specific place where patches for a particular zenoss version are located
10:40:16 AM mrayzenoss: bwest: yeah, http://dev.zenoss.org/trac/report
10:40:39 AM __ian__: Jane_Curry: in what method on the modeler plugin are you trying to do this?
10:40:41 AM mrayzenoss: Current Maintenance Release (All) is stuff getting fixed for 2.4.3
10:41:06 AM mrayzenoss: bwest: so if you see something in there, with 'closed', you could grab the patch from the 2.4.x branch and apply it
10:41:09 AM __ian__: Jane_Curry: All you need is access to some database object. If you have that, it'll get dmd by acquisition (so you could just call, for example, device.dmd)
10:42:00 AM mrayzenoss: bwest: and whenever 2.4.3 comes out, it'll roll up those patches
10:42:56 AM bwest: mray: I have seen alot of people having issues with upgrading to 2.4.2 I am running 2.4.1 is worth just waiting to 2.4.3
10:43:14 AM mrayzenoss: 2.4.3 won't be out for awhile
10:43:55 AM mrayzenoss: I think the goal for maintenance releases is usually 6-8 weeks
10:43:59 AM mrayzenoss: 2.4.1 was an exception
10:44:11 AM mrayzenoss: since the maps were broken
10:44:31 AM bwest: mray: so it is worth upgrading to 2.4.2
cgibbons left the room (quit: Read error: 113 (No route to host)). (10:44:42 AM)
10:44:47 AM mrayzenoss: I would say yes, there are 50 some tickets closed
10:44:49 AM etank: anyone reported yet that the google maps dont work in Chrome?
10:45:13 AM rmatte: I think there's a ticket for Chrome in general
10:45:13 AM mrayzenoss: Last time I used Chrome they did, is that new?
10:45:14 AM etank: which seems really odd to me since both maps and Chrome are Google
10:45:24 AM rmatte: kind of funny that google maps don't work in google's own browser
10:45:30 AM __ian__: Yeah, maps are working in Chrome for me right now
10:45:33 AM etank: i tried using chrome yesterday and it didnt work
10:45:35 AM Jane_Curry: __ian__ Tried this dmd=device.dmd in the plugin code and get AttributeError: DeviceProxy instance has no attribute 'dmd' on remodel
10:46:10 AM etank: i get just a big ugly gray box when in chrome
jplouis left the room (quit: ). (10:46:41 AM)
10:46:42 AM bwest: mray:once last question to apply a specific patch what is the command
10:46:57 AM __ian__: Jane_Curry: This might be a fruitless endeavor. It depends what you're getting passed in, since the plugins aren't database objects.
10:47:09 AM Jane_Curry: __ian__ this code is simply part of the def process
10:47:21 AM mrayzenoss: bwest: zenpatch revistion_number
cgibbons [n=cgibbons@quagmire.nuclearbunny.org] entered the room. (10:47:55 AM)
mode (+o cgibbons ) by ChanServ (10:47:55 AM)
10:47:58 AM __ian__: etank: what version of zenoss? It's working in the trunk, at least.
10:48:09 AM mrayzenoss: bwest: so in the ticket there's probably something like (In 14180) Fixes #5279
10:48:19 AM bwest: mray:how does zPingInterfaceDescription and zPingInterfaceName work? will this allow me to create events off interfaces being down?
10:48:27 AM mrayzenoss: bwest: so you'd use 'zenpatch 14180'
10:48:31 AM etank: __ian__: 2.4.2 Core
10:48:32 AM Jane_Curry: __ian__ Yeh - I think I know what you're saying - wanted to have a go at it though
10:49:36 AM __ian__: Jane_Curry: It can probably be done, but at a different point in the process, and then you get into writing a special HubService, which has a database connection...it gets pretty tricky.
10:49:44 AM etank: __ian__: this is what i get in chrome http://img224.imageshack.us/img224/4053/chrome.jpg
10:49:56 AM __ian__: etank: and it works in FF or Safari?
10:50:06 AM etank: FF and IE 8 yes
10:50:10 AM mrayzenoss: etank: what happens if you resize the window?
10:50:12 AM Jane_Curry: __ian__ Hmmm - not sure I want to try THAT hard
10:50:12 AM etank: i dont have Safari loaded
10:50:15 AM __ian__: etank: Have you upgraded recently?
10:50:30 AM etank: __ian__: not since 2.4.2 came out
10:50:36 AM __ian__: etank: Possibly a browser cache problem?
10:50:46 AM etank: hmm
10:50:55 AM etank: mrayzenoss: same gray box.
10:51:10 AM etank: mrayzenoss: i assume you meant the maps portlet resizing
10:51:13 AM __ian__: etank: Maps haven't changed between 2.4 and the trunk.
10:51:22 AM __ian__: etank: So I'm guessing it's not a code issue.
10:51:50 AM mrayzenoss: etank: yeah, occasionally I get a weird render with FF of the map, just resizing the application a tiny bit redraws it
10:51:52 AM etank: clearing cache now to try again
10:52:31 AM etank: i did have an issue where if i put in the full address to where i am located it showed that i am in the ocean east of Greenland
10:52:42 AM etank: thats pretty far from Kentucky
10:52:55 AM etank: had to tweak the address to get it just right
10:53:18 AM Jane_Curry: I am still using Firefox 2 (2.0.0.19) and the interface is sometimes very jerky and also resource intensive
10:53:32 AM Jane_Curry: Any comments from anyone who has compared FF2 with FF3 ??
10:53:46 AM etank: clearing cache did not make a difference __ian__
10:53:56 AM etank: i will just stick to FF for now
10:53:57 AM mrayzenoss: Jane_Curry: I'm not sure we're still supporting FF2
10:54:03 AM bwest: Jane: Can you answer this question for me zPingInterfaceDescription and zPingInterfaceName work? will this allow me to create events off interfaces being down in SSH?
cgibbons_ left the room (quit: Read error: 113 (No route to host)). (10:54:06 AM)
10:54:07 AM __ian__: Jane_Curry: FF3 has a much faster javascript engine.
10:54:13 AM Jane_Curry: Zenoss is currently 2.4.1
10:54:35 AM venturaville: ff.3.5 is really fast
dean left the room (quit: ). (10:56:41 AM)
10:56:48 AM __ian__: bwest: I'm looking into those zProperties
10:57:02 AM bwest: _ian_:ok thx
10:57:28 AM jb: hi all..
10:57:33 AM bwest: mray:how long did it take to clear your databdase tables my has been taking 30 minutes and still running
10:57:57 AM bwest: mray:my history table was full
10:59:40 AM mrayzenoss: bwest: mine was fast, small install
10:59:50 AM __ian__: bwest: It's just mysql deletion. Depends on resources and number of rows.
10:59:56 AM __ian__: bwest: Those zProperties are no longer used.
11:00:40 AM bwest: _ian_: ok so that means I need to create a zenpack to monitor the status of the interfaces on SSH servers
11:03:01 AM bwest: _ian_:Or more specific I need events created when interfaces go down and right now I only see events from the main host. although I have enabled monitoring on the interfaces
daleamon [i=amon@96.255.255.22] entered the room. (11:05:06 AM)
11:07:04 AM daleamon: a quick dumb question... do I presume correctly that the 2.4.2 http://www.zenoss.com/community/docs/zenoss-guide is specific to a vendor version and not the debian one?
kisielk [n=kisielk_@mail.zymeworks.com] entered the room. (11:07:27 AM)
11:07:27 AM daleamon: my initial screen looks nothing like the one in the manual, ie not a google map.
11:08:00 AM __ian__: bwest: http://dev.zenoss.org/trac/ticket/5291
11:08:30 AM __ian__: bwest: What does the interface template look like?
11:11:01 AM mrayzenoss: daleamon: we try to make the documentation generic enough to cover all the platforms.
11:11:09 AM mrayzenoss: daleamon: what are you seeing?
bigegor [n=quassel@p57B83552.dip0.t-ipconnect.de] entered the room. (11:11:24 AM)
11:12:23 AM bwest: _ian_: for snmp I use the OID sys up and set the threshold to 1 but I don't always get alerts
11:12:23 AM daleamon: I have a dashboard with 4 quadrants, production state, Object watch list, device issues and messages.
11:12:47 AM bwest: _ian_: for ssh I would guess I need a zenpack
11:13:17 AM daleamon: Whereas the documentation fig 2.1 while claiming to be the same version looks like something much more advanced.
11:13:44 AM mrayzenoss: daleamon: you can add and delete portlets for dashboard as well as change the layout
11:13:47 AM mrayzenoss: daleamon: link?
11:13:51 AM daleamon: I am assuming the fact that the debian package is 2.4.2 means it really is.
11:14:23 AM daleamon: You mean the doc link? I poasted that up above.
11:15:07 AM mrayzenoss: daleamon: ok, you can get that by clicking 'Configure layout..."
11:15:26 AM mrayzenoss: pick the 2 columns
11:15:33 AM daleamon: I'm sure you can configure it, but it would be useful for learning if what you see after the initial setup is same as what is in the docs you are using to learn it.
11:15:35 AM bwest: _ian_ or mray:I just got this error when I ran the delete history command ERROR 1114 (HY000) at line 1: The table 'history' is full
11:15:59 AM daleamon: I'll try that, but perhaps this is a debian problem that they selected a different default from the standard docs?
11:16:18 AM mrayzenoss: nah, you're right. The screenshot doesn't match the initial page for any install
11:17:31 AM daleamon: thanks for the info. What happens when they do not match is that the new zenoss student will not trust that they have the correct docs
11:18:23 AM mrayzenoss: yeah, I'll open a ticket
11:19:04 AM daleamon: Thanks much. I will now go back to reading, secure in the knowledge that whatever I see actually exists :-^
11:20:28 AM mrayzenoss: I'm going to go ahead and let __ian__ off the hook, thanks to everyone who stopped by. I'll have the transcript up later today.
Comments (0)