Re: A question of net-snmp

2010-08-18 Thread Dave Shield
On 18 August 2010 06:47, AC.  wrote:
>> How exactly are you retrieving the table.
>
> I used the "snmptable" command to retrive.

In which case, things are working as expected.

snmptable will send one GETNEXT request for each
row of the table, plus one additional request to discover
that it's reached the end.

Try working this through by hand - you should see why
things work that way.


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: A question of net-snmp

2010-08-18 Thread AC.
>
> On 18 August 2010 06:47, AC.  wrote:
> >> How exactly are you retrieving the table.
> >
> > I used the "snmptable" command to retrive.
>
> In which case, things are working as expected.
>
> snmptable will send one GETNEXT request for each
> row of the table, plus one additional request to discover
> that it's reached the end.
>
> Try working this through by hand - you should see why
> things work that way.
>
I see that, but I have to follow two rules:
1. When receiving the request command that want to get table information,
it must ask the information from my kernel.
-> So I remove the check, "if(tlist == NULL)", to let agent ask
information every request.

2. At the same request to retrive the table, I just want the agent to ask
the information one time only.
--> This is my problem. Because it used the command, "getnext", to
retrive the table.
 I have only one idea to do it now.
 I can calculate the time to check it. (e.g. ask information per 30
seconds)
 Do you have better idea to resolve it?
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: A question of net-snmp

2010-08-18 Thread Dave Shield
On 18 August 2010 09:01, AC.  wrote:
> I see that, but I have to follow two rules:
> 1. When receiving the request command that want to get table information,
> it must ask the information from my kernel.
> -> So I remove the check, "if(tlist == NULL)", to let agent ask
> information every request.

That description is essentially meaningless.
I've no idea what your code looks like, so giving me
one line in isolation is no use whatsoever.


> 2. At the same request to retrive the table, I just want the agent to ask
> the information one time only.
> --> This is my problem. Because it used the command, "getnext", to
> retrive the table.
>  I have only one idea to do it now.
>  I can calculate the time to check it. (e.g. ask information per 30
> seconds)
>  Do you have better idea to resolve it?


That's the reason we suggest you use the cache handler.
This will allow you to query the kernel once, and keep the
information available for the next few seconds - typically
sufficient to serve a complete "snmpwalk" or "snmptable".

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: dropping trap

2010-08-18 Thread Dave Shield
On 18 August 2010 03:50, k b  wrote:
> I'm a newbie to net-snmp toolkit. snmptrap does not seem to be working.
> Error message returned: "No access configuration - dropping trap" and
> "This receiver will *NOT* accept any incoming notifications."

 See  the snmptrapd.conf(5) man page

In particular, the section entitled "Access Control"

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmptrapd skips "traphandle" line that are not "default" from the snmptrapd.conf file.

2010-08-18 Thread Daniel Leicht
Hi,
I'm having a problem making the snmptrapd behave the way I would like it to.
I'm trying to catch a specific OID, but can't really do so:

this is my snmptrapd.conf:
authCommunity log,execute,net public
authCommunity log,execute,net private

logoption f /var/log/snmp-received.log

traphandle  .1 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID.0.0.17
 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapEnterprise.0
/home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4.1.0.0.17
/home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4.1.0 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID.0  /home/daniel/NMS/web/alert_trapper.py
traphandle  iso.5.4.2.2.2 /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.5.4.2.2.2 /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4 /home/daniel/NMS/web/alert_trapper.py
#traphandle  default /home/zabbix/zabbix-1.8.2/misc/snmptrap/snmptrap.sh
#traphandle  default /home/daniel/NMS/web/alert_trapper.py

There are lots of "traphandle" lines above, but none of them could catch
this one:
 /usr/bin/snmptrap -v 1 -c public 10.0.0.141 1.5.4.2.2.2 localhost 6 17 ''
1.5.4.2.2.2.1 s "Hello"

If I uncomment the last traphandle line (the default one), it will catch it,
and call the handler twice for some reason.
Somebody knows why?

No matter what I tried to do, it wouldn't catch anything besides from the
unspecific default handler.

Maybe I'm missing something?
I can see in the log that it sees the trap:
2010-08-18 16:55:29 localhost [127.0.0.1] (via UDP:
[10.0.0.141]:34903->[10.0.0.141]) TRAP, SNMP v1, community public
iso.5.4.2.2.2 Enterprise Specific Trap (17) Uptime: 2 days,
0:33:42.88
iso.5.4.2.2.2.1 = STRING: "wazzup?"

Thanks in advance,
Daniel.
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmptrapd skips "traphandle" line that are not "default" from the snmptrapd.conf file.

2010-08-18 Thread Dave Shield
On 18 August 2010 15:12, Daniel Leicht  wrote:
> I'm having a problem making the snmptrapd behave the way I would like it to.
> I'm trying to catch a specific OID, but can't really do so:



> There are lots of "traphandle" lines above, but none of them could catch
> this one:
>  /usr/bin/snmptrap -v 1 -c public 10.0.0.141 1.5.4.2.2.2 localhost 6 17 ''
> 1.5.4.2.2.2.1 s "Hello"


Try catching
.1.5.4.2.2.2.0.17

See RFC 3584 for details of how SNMPv1 traps are mapping into
SMIv2 Notification OIDs.

(And where did that OID come from?
  I've never come across any iso.5 objects before!)


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmpd returns truncated sysObjectId

2010-08-18 Thread Fulko Hew
a) last week someone posted a patch on the net-snmp-bugs list to fix a
   sysObjectId directive truncation problem,
b) last nov 30 (2009) someone posted a patch to fix a sysObjectId truncation
problem
c) in july 2006 someone complained about sysObjectId truncation.

I was sadly bit by this bug today on a Windows system running Net-SNMP v5.5
(I had been developing all along on Linux boxes.)

Unfortunately, some of my sites run Windows, and can only install
pre-built binaries (but I have no Windows build facilities).

What should I do?

- wait for 5.5.x This will probably never happen ?
- wait for 5.6   How long do I have to wait ?
- downgrade to 5.4.2.1   My best solution ?

Or... how could I get pre-built Windows binaries of up-to-date stuff?

TIA
Fulko
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users