<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>froztbyte.getBlog() &#187; zenoss</title>
	<atom:link href="http://blog.froztbyte.net/tag/zenoss/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.froztbyte.net</link>
	<description>returns the contents of froztbyte.blog</description>
	<lastBuildDate>Mon, 13 Oct 2014 20:19:25 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>Zenoss Device Listing</title>
		<link>http://blog.froztbyte.net/2012/10/zenoss-device-listing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zenoss-device-listing</link>
		<comments>http://blog.froztbyte.net/2012/10/zenoss-device-listing/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 09:23:43 +0000</pubDate>
		<dc:creator><![CDATA[froztbyte]]></dc:creator>
				<category><![CDATA[minipost]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[infra]]></category>
		<category><![CDATA[inventory]]></category>
		<category><![CDATA[zenoss]]></category>

		<guid isPermaLink="false">http://blog.froztbyte.net/?p=326</guid>
		<description><![CDATA[Nice for if you need some form of automated report in zenoss, here&#8217;s a code snippet to print out a list of devices per class, formatted in markdown markup typehash = {} for d in dmd.Devices.getSubDevices(): if typehash.has_key(d.getDeviceClassPath()) == False: &#8230;<p class="read-more"><a href="http://blog.froztbyte.net/2012/10/zenoss-device-listing/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>Nice for if you need some form of automated report in zenoss, here&#8217;s a code snippet to print out a list of devices per class, formatted in <a href="http://daringfireball.net/projects/markdown/">markdown</a> markup</p>
<pre>typehash = {}
for d in dmd.Devices.getSubDevices():
    if typehash.has_key(d.getDeviceClassPath()) == False:
        typehash[d.getDeviceClassPath()] = []
    typehash[d.getDeviceClassPath()].append(d.viewName())

for key in typehash:
    print """### %s\n""" % (key)
    for item in typehash[key]:
        print "*   %s\n" % (item)
    print ""</pre>
<p>Run it in the zenoss console, or anything with a dmd connection. Tested on 2.5.x, but should be trivial to port forward if it breaks.</p>
<p>(PS: I could probably fix up that last bit to do something with .iteritems() instead&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.froztbyte.net/2012/10/zenoss-device-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zenoss &#8211; Find transforms</title>
		<link>http://blog.froztbyte.net/2011/08/zenoss-find-transforms/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zenoss-find-transforms</link>
		<comments>http://blog.froztbyte.net/2011/08/zenoss-find-transforms/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 11:10:33 +0000</pubDate>
		<dc:creator><![CDATA[froztbyte]]></dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[zenoss]]></category>

		<guid isPermaLink="false">http://blog.froztbyte.net/?p=58</guid>
		<description><![CDATA[So I was looking around in one of my zenoss installs some time ago to find what EventClasses I&#8217;d set up transforms in, but didn&#8217;t feel like digging around through the entire tree of EventClasses (a cursory check now reveals &#8230;<p class="read-more"><a href="http://blog.froztbyte.net/2011/08/zenoss-find-transforms/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>So I was looking around in one of my zenoss installs some time ago to find what EventClasses I&#8217;d set up transforms in, but didn&#8217;t feel like digging around through the entire tree of EventClasses (a cursory check now reveals that there&#8217;s 136 of them in my one installation). At the time, I solved the problem, extracted the data I needed, and then consequently forgot about it.</p>
<p>And then today I needed that info again. \o/ for IRC logs. To do this, connect to the dmd (on my system, which is installed with the debian package, the command for this is <em>su -c &#8220;/usr/local/zenoss/zenoss/bin/zendmd&#8221; zenoss</em>. Adjust it for your own system), and then run the following code</p>
<pre>foo = dmd.Events.getSubEventClasses()
for i in foo:
    if len(i.transform) != 0: print "%s :: \n%s\n\n" % (i.getOrganizerName(), i.transform)</pre>
<p>This will give you human-readable list of all your existing transforms, which makes it easy to find and re-use them.</p>
<p>Edit: this is confirmed working on 3.2.1 (and probably works on the rest of 3.x as well, post in the comments if it doesn&#8217;t). Thanks to jmp242 from #zenoss for testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.froztbyte.net/2011/08/zenoss-find-transforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
