<?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>logIt &#187; template</title>
	<atom:link href="https://lakm.us/logit/tag/template/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Template Dumping Scripts</title>
		<link>https://lakm.us/logit/2010/01/template-dumping-scripts/</link>
		<comments>https://lakm.us/logit/2010/01/template-dumping-scripts/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:49:29 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[OpenView]]></category>
		<category><![CDATA[managed node]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://localhost/it/?p=181</guid>
		<description><![CDATA[To manage multiple templates in HP OMU, we need to dump them first. Dumping to file using opctempl will ease up the process of narrowing variation to gain uniformity. In the end converging to standard will help us tackle problems when faced with hundreds of templates being assigned to hundreds nodes. I tried to make [...]]]></description>
				<content:encoded><![CDATA[<p>To manage multiple templates in HP OMU, we need to dump them first. Dumping to file using <code>opctempl</code> will ease up the process of narrowing variation to gain uniformity. In the end converging to standard will help us tackle problems when faced with hundreds of templates being assigned to hundreds nodes.</p>
<p>I tried to make several scripts. Some were in conjunction used with another, some could be used individually. The problem is, they were made long ago without proper documentation, so I try to relate them first before building new ones to see if they&#8217;re still usable (at least in their conceptual work flow).</p>
<p></p>
<p><span style="background-color: #ffffff;"><span id="more-181"></span>Script is temporary placed <a title="../script/" href="../../../../script/" target="_blank">here</a>. They are in bash. For HP-UX usage you&#8217;ll most likely change the first line from <code>#!/bin/bash</code> into <code>#!/usr/local/bin/bash</code>.</span></p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2010/01/template-dumping-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working With Templates</title>
		<link>https://lakm.us/logit/2009/04/working-with-templates/</link>
		<comments>https://lakm.us/logit/2009/04/working-with-templates/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 08:38:02 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[OpenView]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://localhost/it/?p=65</guid>
		<description><![CDATA[Most template editing is done through Motif-GUI. A &#8220;template engineer&#8221; privilege capable of doing many things there. However, to run other steps outside his/her privilege, he/she needs to invoke some command line. Check installed templates and their status (enabled/disabled) in a node: $ ovpolicy -list -host Export a template to a flat file $ opctempl [...]]]></description>
				<content:encoded><![CDATA[<p>Most template editing is done through Motif-GUI. A &#8220;template engineer&#8221; privilege capable of doing many things there. However, to run other steps outside his/her privilege, he/she needs to invoke some command line.</p>
<p>Check installed templates and their status (enabled/disabled) in a node:</p>
<p><code>$ ovpolicy -list -host <hostname></code></p>
<p>Export a template to a flat file</p>
<p><code>$ opctempl -get <templ_name> <templ_type> <file><br />
</code></p>
<p>Template types for <code>templ_type</code> can be one of the following:</p>
<p><code>CONSOLE_TEMPLATE<br />
OPCMSG_TEMPLATE<br />
LOGFILE_TEMPLATE<br />
MONITOR_TEMPLATE<br />
SNMP_TEMPLATE<br />
EC_TEMPLATE<br />
SCHEDULE_TEMPLATE</code></p>
<p>Then, previous exporting can be done as e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">opctempl SOMECOMPANY-BC-VAS-MTR-OS-FS MONITOR_TEMPL some_output_file</pre></div></div>

<p>How do we get which template type for a template? Visually in Motif-GUI (there is a <strong>Type</strong> column there) or by listing available templates in management server e.g. (it will appear inside <code>|TYPE|</code> ):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ opcnode -list_templs <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> VAS
<span style="color: #000000; font-weight: bold;">|</span>GRP<span style="color: #000000; font-weight: bold;">|</span> VAS
<span style="color: #000000; font-weight: bold;">|</span>MON<span style="color: #000000; font-weight: bold;">|</span> SOMECOMPANY-BC-VAS-MTR-OS-FS
<span style="color: #000000; font-weight: bold;">|</span>MON<span style="color: #000000; font-weight: bold;">|</span> SOMECOMPANY-BC-VAS-MTR-APPS-PORT_10001</pre></div></div>

<p>Assign one of the above templates by e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ opcnode -assign_templs <span style="color: #007800;">templ_name</span>=<span style="color: #ff0000;">&quot;SOMECOMPANY-BC-VAS-MTR-OS-FS&quot;</span> <span style="color: #007800;">templ_type</span>=MONITOR_TEMPLATE <span style="color: #007800;">node_name</span>=vasprdpdb3.somecompany.lan <span style="color: #007800;">net_type</span>=NETWORK_IP</pre></div></div>

<p>to remove replace with <code>-deassign_templ</code>.<br />
Check assigned templates using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ opcnode -list_ass_templs <span style="color: #007800;">node_name</span>=vasprdpdb3.somecompany.lan <span style="color: #007800;">net_type</span>=NETWORK_IP</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2009/04/working-with-templates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
