Are you using HP OVO (Openview Operation)/ITO/OMU (Operation Manager for Unix) ? So you must be understand how hard to write a templates document, especially if you have hundreds or thousands templates in your environment . This is a quick-and-dirty script I use, that similar to my previous released script, tpl2csv, but instead dumping the templates to csv file, this script will generate xls (Microsoft Excel) spreadsheet.
You need to have the node templates first before executing the tpl2xls.pl script, and also the templates has to be in a correct directory hierarchy. But don’t worry, I will also give you the script (gettemplates.pl) to download the templates in correct hierarchy.
The script needs John McNamara’s Spreadsheet-WriteExcel module, but it has been included inside the tpl2xls archive.
Please read terms of use before downloading the script(s)
Download
tpl2xls
tpl2xls-1.0.3
gettemplates
This script will download templates into tpl2xls-readable hierarchy. It reads a node list file like the one included in the package
gettemplates-1.0.2.pl.tar.gz
Custsomer is a king, they said. Well that’s true on a lot of cases. Lately the customer wants us to change all the templates we have built for 3 years! That’s mean I have to change hundreds of template group in which there are up to 40 monitors inside them. Doing it from the motif GUI seems going to broke my wrist. At least i might have to buy a new mouse because of those thousands clicks per second.
OVO has been shipped with some useful console tools, especially for managing the templates. I used these tools to help me do the job:
- /opt/OV/bin/OpC/utils/opcnode : to get info and manage nodes data, including assigned templates, assigning and de-assign templates, etc.
- /opt/OV/bin/OpC/utils/opctempl : to download, upload, and modify templates
It doesn’t give much help if I do it by hand, so I write some scripts using those tools :
- gettemplates.pl : to download templates and save it under each node names they are assigned to. It required one argument, the node list file. The downloaded templates will be used for other scripts. At the moment it only support monitor scripts under one group (because that’s all I needed at the moment).
- modsevup.pl : to mass change a particular severity inside template. The script taking three arguments : template name, severity before, and severity after.
- modtextup.pl : to change the text of notifications inside a template. It will take two arguments: template name and message text.
- addnormal.pl : to add normal condition into the template. Just modify the script as you needed.
- standardise.pl : this is just the concatenation of modsevup.pl modtextup.pl and addnormal.pl. It will add normal condition
All of them will show you the changes that has made to the original file, and you will be prompted if you would to directly upload it to the OVO or not .
Download them and modify as you like, but please keep the attribution attached, or, you can always click the orange button on the bottom right side
.