Now you can take a ton of your time and review Class by Class and Device by Device until you finally finish. You will eventually get it all in a Zenpack……. Well lucky for you guys I created a Python Script that runs as the Zenoss user and create a Zenpack for you. All you have to do is pick a name for the ZenPack and optionally the Device Class you want to scan. The script will scan the Device Class that you specified ( or by default scan the entire /Device Class and its Sub Classes). It will then create the ZenPack with all the locally attached Device Templates. I am thinking of also adding the Events class as part of the next release of this script.
Update 1.0.1, I added the –unique option. If you decide to use this option, This Zenpack will only add, The Device Templates that are not already part of an existing ZenPack. I also added the –verbose option, so that you can see which Device Templates are being added or being dismissed.
You can download the script here
Download
Example…..
python createZenPack.py -p "ZenPacks.Allen.Test1" -a "Allen Sanabria" -v "0.9" -r "/Server/Linux/" INFO:zen.HookReportLoader:loading reports from:/opt/zenoss/ZenPacks/ZenPacks.Allen.Test1/ZenPacks/Allen/Test1/reportsCreated ZenPack ZenPacks.Allen.Test1Scanning for locally attached TemplatesScanning for locally attached TemplatesObjects Attached to Zenpack ZenPacks.Allen.Test1/zport/dmd/Devices/Server/Linux/foo1.com/foo/zport/dmd/Devices/Server/Linux/DNS/bind/zport/dmd/Devices/Server/Linux/Apache/http
Another Example, with the unique option and verbose option.
python createZenPack.py -p "ZenPacks.Allen.Test1" -a "Allen Sanabria" -v "0.9" -u -V -INFO:zen.HookReportLoader:loading reports from:/opt/zenoss/ZenPacks/ZenPacks.Allen.Test1/ZenPacks/Allen/Test1/reportsCreated ZenPack ZenPacks.Allen.Test1Scanning for locally attached TemplatesScanning for locally attached TemplatesObjects Attached to Zenpack ZenPacks.Allen.Test1I'm not UNIQUE /zport/dmd/Devices/Server/rrdTemplates/LDAPServerI'm in ZenPacks.zenoss.LDAPMonitorI'm not UNIQUE /zport/dmd/Devices/Server/rrdTemplates/ApacheI'm in ZenPacks.zenoss.ApacheMonitorI'm UNIQUE /zport/dmd/Devices/Server/Linux/foo1.com/foo
Another Example…
python createZenPack.py --listHPTemperatureSensorsZenPacks.Allen.Test1ZenPacks.Allen.FullZenPacks.Allen.Tomcat
Help OutPut…
python createZenPack.py -husage: createZenPack.py --packname=ZenPackName --author=name --version=1.0 options: -h, --help show this help message and exit -p ZPACKNAME, --packname=ZPACKNAME The name of the ZenPack that you want to create -a AUTHOR, --author=AUTHOR Who is creating The ZenPack? -v VERSION, --version=VERSION What Release is this? -r ROOT, --root=ROOT What Device Class You want the Search to begin at? -l, --list List all the ZenPacks
Downloads are not working. Trying to down load this script and all I see is: {quickdown:53}
I switched from Joomla to wordpress, I am working on getting the downloads section working again