Highlighted
Absent Member.. Clarence Lee Absent Member..
Absent Member..
466 views

snmp trap policy add/remove.

Jump to solution


Dear All,

We are working on the messages integeration between omu9 and nnmi9.

On the nnmi server.

nnmopcexport.ovpl -u <username> -p <password> \

-template "NNMi New Management Events" -application "NNMi" \

-file NNMi_New_policy.dat

 

File being create OK

 

copy file to omu9 server

opcpolicy -add NNMi_New_policy.dat

Error: 'Object exists already'

 

using adminUI browse to policy "NNMi New Management Events"

Object not found
The following errors occurred while processing the request:

Unable to get policy NNMi New Management Events because it does not exist.

 

use command line to performed a delete.

opcpolicy -delete "NNMi New Management Events" "SMP"
Object NNMi New Management Events could not be found in the database.


Thanks to advise on how should I resolve this problem.


Regards,

Clarence

 

0 Likes
1 Solution

Accepted Solutions
Goran Koruga Absent Member.
Absent Member.

Re: snmp trap policy add/remove.

Jump to solution

Hello.

 

Note the trailing space in the policy name - this shall work:

 

opcpolicy -remove pol_name='NNMi New Management Events ' pol_type=SNMP_Interceptor

 

Regards,

    Goran

0 Likes
9 Replies
Goran Koruga Absent Member.
Absent Member.

Re: snmp trap policy add/remove.

Jump to solution

Hello.

 

You can use opcpolicy -list to list all policies, i.e.:

 

opcpolicy -list | grep SMP

 

Also make sure you have the latest OMU server patch installed.

 

Regards,

    Goran

0 Likes
Absent Member.. Clarence Lee Absent Member..
Absent Member..

Re: snmp trap policy add/remove.

Jump to solution

Dear Goran,

did what's you advise.

opcpolicy -list | grep SMP

Result

...

 |SMP| NNMi New Management Events

 

 

From here how should I proceed to delete it ?

 

Your advise please.

 

Regards,

Clarence

 

0 Likes
Absent Member.. Clarence Lee Absent Member..
Absent Member..

Re: snmp trap policy add/remove.

Jump to solution

Dear Goran,

if i use command line to performed a delete.

opcpolicy -delete "NNMi New Management Events" "SMP"

result:
Object NNMi New Management Events could not be found in the database.

 

Regards,

Clarence

 

 

0 Likes
Goran Koruga Absent Member.
Absent Member.

Re: snmp trap policy add/remove.

Jump to solution

Hello.

 

If I would have to guess, this policy does not have version 1.0 but something else - the command you are using only works with version 1.0.

 

Verify with:

 

opcpolicy -list_pols pol_type=SNMP_Interceptor

 

See which version(s) it lists, to delete all of them, use something like this:

 

opcpolicy -remove pol_name='NNMi New Management Events' pol_type=SNMP_Interceptor

 

Regards,

    Goran

0 Likes
Absent Member.. Clarence Lee Absent Member..
Absent Member..

Re: snmp trap policy add/remove.

Jump to solution

Dear Goran,

opcpolicy -list_pols pol_type=SNMP_Interceptor

got the result as

====================================================================
Name         = NNMi New Management Events
Version      = 0001.0000
Type (GUI)   = SNMP_Interceptor
Type (agent) = trapi
====================================================================

 

opcpolicy -remove pol_name='NNMi New Management Events' pol_type=SNMP_Interceptor
Object  could not be found in the database.

Regards,

Clarence

 

0 Likes
Goran Koruga Absent Member.
Absent Member.

Re: snmp trap policy add/remove.

Jump to solution

OK, so that's not it.

 

What does this show?  On Linux use 'echo -e' instead.

 

echo "select '''' || template_name || '''' name, utl_raw.cast_to_raw(template_name) hex, s.template_name from opc_source_templ s where template_name like '%NNMi%';\n" | /opt/OV/bin/OpC/opcdbpwd -e sqlplus -s

 

    Goran

0 Likes
Absent Member.. Clarence Lee Absent Member..
Absent Member..

Re: snmp trap policy add/remove.

Jump to solution

Dear Goran,

Here is the output.

 echo -e "select '''' || template_name || '''' name, utl_raw.cast_to_raw(template_name) hex, s.template_name from opc_source_templ s where template_name like '%NNMi%';\n" | /opt/OV/bin/OpC/opcdbpwd -e sqlplus -s

NAME
--------------------------------------------------------------------------------
HEX
--------------------------------------------------------------------------------
TEMPLATE_NAME
--------------------------------------------------------------------------------
'NNMi Management Events'
4E4E4D69204D616E6167656D656E74204576656E7473
NNMi Management Events

'NNMi New Management Events '
4E4E4D69204E6577204D616E6167656D656E74204576656E747320
NNMi New Management Events

NAME
--------------------------------------------------------------------------------
HEX
--------------------------------------------------------------------------------
TEMPLATE_NAME
--------------------------------------------------------------------------------



 

Regards,

Clarence

 

0 Likes
Goran Koruga Absent Member.
Absent Member.

Re: snmp trap policy add/remove.

Jump to solution

Hello.

 

Note the trailing space in the policy name - this shall work:

 

opcpolicy -remove pol_name='NNMi New Management Events ' pol_type=SNMP_Interceptor

 

Regards,

    Goran

0 Likes
Absent Member.. Clarence Lee Absent Member..
Absent Member..

Re: snmp trap policy add/remove.

Jump to solution

Dear Goran,

Thank you very much,  it work..

 

Regards

Clarence

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.