Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
SNMP Notify Target
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dick Oyen  
View profile  
 More options Jul 26 2012, 4:12 pm
From: Dick Oyen <ro...@virtualhold.com>
Date: Thu, 26 Jul 2012 16:12:14 -0400
Local: Thurs, Jul 26 2012 4:12 pm
Subject: Re: [erlang-questions] SNMP Notify Target

Unfortunately there were no responses to my original question, but I have been
using debugger to step through Erlang snmp code to see what is happening.

The snmpa:send_notification/6 (indirectly) calls
snmpa_target_cache:get_targets/1, which returns [].

That seems to be because start:application(snmp) decided not to read
target_addr.conf or target_params.conf; the reason for its decision was that
snmp_target_mib:configure/2 finds that the target params table already exists.
It exists because start:application(snmp) had created, but not populated it.
QUESTION: Can someone tell me if there is some option and where I should use
the option to get the target_addr.conf to be read into the table?

Next I experimented with forcing the file to be read into the table by running
the following from my agent erl command window:

    snmp_target_mib:reconfigure("snmp/agent/conf").

The effects of this showed up two tables in the Table Viewer of 'observer':

First, snmpa_target_cache contained a single record shown as a 2-tuple of column values:
{state, valid}

Second, snmp_local_db_shadow contained (among 26 rows) the following 4 rows
shown as 2-tuples of column values below:

{{snmpTargetAddrTable,first},    {undef,"testMIBMyFirstCoolTrap","testMIBMyFirstCoolTrap"}}

{{snmpTargetAddrTable,"testMIBMyFirstCoolTrap"},   {{"testMIBMyFirstCoolTrap",[1,3,6,1,2,1,100,1,1],[127,0,0,1,0,162],5000,3," tag1","MyCoolTrapParams",3,1,"agent's engine",[],2048},first,first}}

{{snmpTargetParamsTable,first},   {undef,"MyCoolTrapParams","MyCoolTrapParams"}}

{{snmpTargetParamsTable,"MyCoolTrapParams"},   {{"MyCoolTrapParams",1,2,"initial",1,3,1},first,first}}

Wow, that's great, so I called snmpa:send_notification/6 again.

Unfortunately, snmpa_target_cache:get_targets/1 still returns [] because
ets:match(?CACHE, {{'_','$1'},'$2'} is looking at the table that contains only
{state,valid}.

Thus, the information from target_addr.conf and target_params.conf is in some
rows in a table, but not the table that the code seems to be looking at.
QUESTION: Can someone tell me what I am doing wrong?

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Oyen  
View profile  
 More options Jul 27 2012, 8:42 am
From: Dick Oyen <ro...@virtualhold.com>
Date: Fri, 27 Jul 2012 08:42:46 -0400
Local: Fri, Jul 27 2012 8:42 am
Subject: Re: [erlang-questions] SNMP Notify Target

The original mail is at http://erlang.org/pipermail/erlang-questions/2012-July/067981.html and is included in this reply.

Thanks for the advice on the {force_load, true} option in agent.config. It got the target address loaded.

I am continuing to investigate why the snmpa:send_notification/6 tries to get the target address from snmpa_target_cache (which contains only {state, invalid}) rather than a table that contains the target address (observer Table Viewer shows that table snmp_local_db1_shadow contains the target address and params).

From: DefacedVR [mailto:vladislav.chugu...@gmail.com]
Sent: Friday, July 27, 2012 6:35 AM
To: erlang-programming@googlegroups.com
Cc: Dick Oyen; erlang-questi...@erlang.org; Dick Oyen
Subject: Re: [erlang-questions] SNMP Notify Target

пятница, 27 июля 2012 г., 0:12:14 UTC+4 пользователь Dick Oyen написал:

>Unfortunately there were no responses to my original question, but I have been

 Can you provide link to the previous mail?
using debugger to step through Erlang snmp code to see what is happening.

The snmpa:send_notification/6 (indirectly) calls
snmpa_target_cache:get_targets/1, which returns [].

That seems to be because start:application(snmp) decided not to read
target_addr.conf or target_params.conf; the reason for its decision was that
snmp_target_mib:configure/2 finds that the target params table already exists.
It exists because start:application(snmp) had created, but not populated it.
QUESTION: Can someone tell me if there is some option and where I should use
the option to get the target_addr.conf to be read into the table?
There is option {force_load, true}   from http://www.erlang.org/doc/man/snmp_app.html

Next I experimented with forcing the file to be read into the table by running
the following from my agent erl command window:

    snmp_target_mib:reconfigure("snmp/agent/conf").

The effects of this showed up two tables in the Table Viewer of 'observer':

First, snmpa_target_cache contained a single record shown as a 2-tuple of column values:
{state, valid}

Second, snmp_local_db_shadow contained (among 26 rows) the following 4 rows
shown as 2-tuples of column values below:

{{snmpTargetAddrTable,first},    {undef,"testMIBMyFirstCoolTrap","testMIBMyFirstCoolTrap"}}

{{snmpTargetAddrTable,"testMIBMyFirstCoolTrap"},   {{"testMIBMyFirstCoolTrap",[1,3,6,1,2,1,100,1,1],[127,0,0,1,0,162],5000,3," tag1","MyCoolTrapParams",3,1,"agent's engine",[],2048},first,first}}

{{snmpTargetParamsTable,first},   {undef,"MyCoolTrapParams","MyCoolTrapParams"}}

{{snmpTargetParamsTable,"MyCoolTrapParams"},   {{"MyCoolTrapParams",1,2,"initial",1,3,1},first,first}}

Wow, that's great, so I called snmpa:send_notification/6 again.

Unfortunately, snmpa_target_cache:get_targets/1 still returns [] because
ets:match(?CACHE, {{'_','$1'},'$2'} is looking at the table that contains only
{state,valid}.

Thus, the information from target_addr.conf and target_params.conf is in some
rows in a table, but not the table that the code seems to be looking at.
QUESTION: Can someone tell me what I am doing wrong?

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »