====== Summary ======
The following script gives a listing of all of your existing transforms on your system. The location and code of the transform are listed out for each transform found.
Transforms are code-snippets that can be used to change events and behavior, before the event is entered into the events database. See our administration guide for general information on transforms.
====== Get the code ready ======
===== Method 1: Download code =====
* Download the file attached, to your zenoss systems ''$ZENHOME/bin'' directory
===== Method 2: Create code =====
* Create a file called ''showAllTransforms.py'' in the ''$ZENHOME/bin'' directory
* Insert the python code, from the CODE section below, into the created file
===== Method 3: Paste in dmd =====
* If you are familiar with the zendmd command prompt, and do not care to get a .txt file output
* Get into the zendmd
* Copy and Paste the code from the CODE section below
* You only need the code starting with the ''for'' loop
====== Run the script ======
===== Method 1 and 2: Run from command line =====
* Run the following from the directory where the file is located:
showAllTransforms.py > transforms.txt
===== Method 3: execute in dmd =====
* Simply hit enter twice
====== Code ======
#!/usr/bin/env python
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
dmd = ZenScriptBase(connect=True).dmd
for ec in dmd.Events.getSubOrganizers():
if ec.transform:
print "=== %s ===" % ec.getOrganizerName()
print ec.transform
print
for i in ec.instances():
if i.transform:
print "=== %s/%s ===" % (ec.getOrganizerName(), i.id)
print i.transform
print