Softpanorama

May the source be with you, but remember the KISS principle ;-)
Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Removal of policies

News HP HPOM Policies Recommended Links Reference Version Management Comparing Policies
Creating and Uploading Policies Listing policies installed on the node Removal of policies Assigning Policies Deploying Policies How to find out which policies are associated with the particular node
Policy Groups Default Policy Groups node groups Layout groups Message groups Policy Files Naming Conventions
Troubleshooting Event Correlation Actions History Humor Etc

A single policy, as well as an entire container, can be removed from the database by using the opcpolicy command line tool. To delete a policy, it has to be uniquely identified by either its name/type/version combination or by its UUID.

If just policy name and type are provided, the entire policy container is deleted.

NOTE Deleting the policy also results in deleting all its assignments.

Following is an example of deleting a policy container:# opcpolicy -remove pol_name="Test policy" pol_type=Logfile_Entry

Policy groups are deleted by using -del_group option of the opcpolicy command line utility. For example, to delete the policy group ”Testgroup”, use the following command:# opcpolicy -del_group pol_group="Test group"

For more information about command options, refer to the opcpolicy(1M)reference page.Downloading Policies You can download policies using the -download option of the opcpolicy command . If a policy version is omitted from the command line arguments, the entire container is downloaded. Example of policy download using the opcpolicy command line tool:

# opcpolicy -download pol_name="Oracle messages" pol_type="Open_Message_Interface" version=1.0 dir=/tmp

For more information about the parameters available with the opcpolicy command, refer to the opcpolicy (1M) reference page.


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Dec 23, 2010]  IT Resource Center forums - Templates by command line - This thread has been closed

Sep 3, 2008

Hery Mulyawan  03:51:31 GMT

Dear Experts... i need your advice for this following question

I have a management server (trial licence), and it's already expired, but there are templates,commands, and so on still left on a specific node, i need to remove them for many purposes, so..

1. How to assign (before distribute)template by command line ? 2. How to delete a specific template already assigned to specific node ? (by command line) 3. Does each template assigned to a node will be come a specific file in certain directory inside the node ? 4. How to delete specific template and its related command, monitor and action ? (by command line)

Kindly need your advice.., points available

Jeroen Peereboom :

Hery,

use opcnode for template to node assignments.

3. No, on the managed node there are files like 'le' for all logfile encapsulators assigned to the node, 'monitor', 'msgi' and so on.

In stead of removing assignments, you may just stop and kill the agent on the node (opcagt -stop; opcagt -kill, or stop the agent Services using the Windows management console) and disable startup when the system restarts (On Windows, make the service manual startup (or disabled), on Unix check the /etc/init.d, rcx.d and so on).

HtH,

JP

Jeroen Peereboom:

 L.S. aasuming you assigned the templates to the node directly (not via a Node Group):

/opt/OV/bin/OpC/utils/opcnode -list_ass_templs node_name=<node_name> net_type=NETWORK_IP

will tell you which templates have been assigned to your node.

Suppose you want to remove a logfile template: /opt/OV/bin/OpC/utils/opcnode -deass_templs templ_name="<template_name> templ_type="LOGFILE_TEMPLATE" node_name=ns60as033 net_type=NETWORK_IP

After this, you can distribute the new configuration to you managed node: opcragt -distrib -templates <node_name>

To be honest, I see no reason to remove these files. They only occupy some disk space. Better leave them on the managed node.

However, a dirty (risky) way for removing actions, commands, monitors: On the management server in /var/opt/OV/share/databases/OpC/mgd_nodes are files for each platform. Go to your platform specific directory (for example customer/hp/pa-risc/hpux1100/actions/), remove some files) and use opcragt to distribute: opcragt -distrib -force -actions <node_name)

Of course, this is a dirty method and be sure to make a backup of all these files (tar?) and restore them afterwards.

Alternatively you may use ovdeploy or opcdeploy to directly remove files on the managed node. I don't use it often, so check the man page. Or just have someone login on the managed node and remove the files.

But as said before, why remove them?

By the way, your JAVA GUI is still available...

HtH,

JP.

Pat Campbel:

 You can use the ovpolicy command to remove templates. Read the man page for this command; there is a -remove option to remove one or more policies

Pat Campbell Sep 3, 2008 21:03:35 GMT 3 pts

 Really no need to remove the files to measure performance, just disable the templates or stop the processes.

To disable the SPI, use "opctemplate -d <template_name>" or opctemplate -d -all, to disable all templates.

To eliminate the OVO agent, "opcagt -kill".

To eliminate ovpa, "ovpa stop".

Hery Mulyawan Sep 3, 2008 06:31:27 GMT N/A: Question Author

 Hi JP,

Thanks for your advice, but let me make it more precise, i have HPOM 8.x on HP-UX.., i have distributed SPI X to a node, there are ovo agent and OVPA inside the node, and also other application (some kind of charging gateway), i need to remove the SPIs Template from the node and remain the OVO and OVPA installed&running on it,

so my purpose is to remove the SPI X template, and also the command, monitor related to it, I cant login to Motif GUI due to licence issue.

Do you have any idea JP ?

Hery Mulyawan:

 Hi JP.

I understand your confusion, our concern is to measure the resources consumed by OVO, while the application itself (charging gateway) has already consumed a lot of resources,and very sensitive,also it run heavily, so the charging team would like to know their application's performance with this following scenario : 1. with OVPA+OVO agent+SPI are running 2. With OVPA+OVO are running 3. None of them are running

/opt/OV/bin/OpC/utils/opcnode -list_ass_templs node_name=<node_name> net_type=NETWORK_IP ==> it's not working, "Retrieving information for 'TEMPLATE_LIST' from the OVO database failed."

i Prefer to delete the "command" etc directly from the node @ instrumentation directory, so the impact will be on the managed node. JAVA GUI is not working also, for now i have shut the agents down.. and the test are being made...

Is there any command to manually remove or delete templates from node? opctemplate can only disable.

Jun 18, 2007

 Hello

There is no good manual way of deleting policies from a node managed by OVOW.

If you really want to do this - you can delete the folders that contain the policies from the node. The only catch is it is an all-or-nothing deletion of policies (by type) from the node. If you are interested you can do this by following:

1. Delete all files in directory "%OvAgentDir%\conf\ConfigFile\policies" to remove all ConfigFile policies from the node.

2. Delete all files in directory "%OvAgentDir%\conf\svcdisc\policies" to remove all Service Auto-Discovery policies from the node.

3. Delete all files in directory "%OvAgentDir%\conf\nodeinfo\policies" to remove all Node Info policies from the node.

4. Delete all files in directory "%OvAgentDir%\conf\mgrconf\policies" to remove all Flexible Management policies from the node.

5. Delete all files in directory "%OvAgentDir%\conf\OpC\vpwin" to remove all other policies from the node.

Note that this only clears policies from the node side. If the OVOW server knows about policies on this node then you will have a mismatch (that you will have to fix on server side).

Hope this helps. Regards Ram

Rem-8 Jun 18, 2007 14:22:27 GMT N/A: Question Author

 Well, thanks for that step by step. I saw that when there are policies in OVOW policy view, but policy is not in the managed node and want to Remove policy from node policy view, I get MMC snap-in error. How can I fix policies on the OVOW side?

I will be glad to delete ALL policies and redeploy the new ones.

Ram Jun 18, 2007 14:32:39 GMT 9 pts

 Hello

I am assuming that OVOW server is still managing the node - it is just that there is a mis-match in policy inventory between what the server sees and what is on the node.

You can try following and see if it helps:

1. Use OvInternals tool called "redistpolicies.vbs" and this will deploy the policies that are in OVOW policy inventory to the node.

2. Once the policy inventory in the node and server matches then you can use the OVOW Console and run the "Remove from node" on the policies.

Hope this helps. Regards Ram

Rem-8 Jun 19, 2007 03:54:29 GMT N/A: Question Author

 Are policies such as Measurment Thresholds also in D:\Program Files\HP OpenView\Installed Packages\{790C06B4-844E-11D2-972B-080009EF8C2A}\conf\OpC\vpwin ?? If I delete content and use ovinternals tool I will have managed nodes with non of the policies? Clear like an air in Antarctica?

Ram Jun 19, 2007 07:25:03 GMT Unassigned

 Hello

You are right - policies such as measurement threshold, WMI and logfile encapsulator are in the %ovagentdir%\conf\opc\vpwin folder.

If you remove all the files from the folders that I had listed in the last posting then it should clear all the policies from the node.

Hope this helps. Regards Ram



Etc

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes.   If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. 

ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.  

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least


Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 19, 2014