I’ve seen a few people in the Zenoss community forums asking for an easier way to add multiple Datapoints into Zenoss, instead of adding 1 by 1. Well, I’ve decided to try and build such a tool today. Now even though the tool is not complete (IN MY EYES). It is already has been helpful to me! As of right now the script can List Templates in a Organizer ( aka /Devices/Server/Linux ) or in a Device ( zenoss1.linuxdynasty ).
It can also create a Template, with a Command DataSource, with Multiple DataPoints. This means you can now automate the creation of Templates and DataSources and DataPoints. So if you are using a tool like Puppet, Cfengine, Bcfg2, or Chef, this process can be automated. I will be adding more features in the next few weeks.
Any question or help about this script, please post them here http://www.linuxdynasty.org/forums/Scripting/scripting/ZenossTemplateManager
- Update 1.0.6, Fixed an issue where if youdo not pass the -G option for graph it will fail.
- Update 1.0.5, Now have the ability to add multiple graphs with multiple datapoints
- Update 1.0.4, Now have the ability to create thresholds, bind templates to class or device, set severities on thresholds and
datasources, attach datapoints to thresholds.
- Update 1.0.3, I broke down the templateManager function into 3 smaller functions. You also can now list templates and datasources for either device or organizer, and list datapoints for a device. I also added more verbosity with the -V option.
- Update 1.0.2, You now do not have to pass a command with the script. So i f you already have a command in the DataSource, it wll not get overwritten.. Thank you Eangel, for telling me about this issue..
Upcoming Features such as….
- Deleteing Templates, DataSources, and DataPoints
- Copying Templates
- Adding Graphs
The tool is called Zenoss_Template_Manager.py. You can download it here..