Ken Springhetti | 27 Jun 20:26 2016

Supporting an Enterprise MIB using SNMP4J

Hi,My name is Ken, I am new to SNMP4J.  I have a device runnung Linux which uses an SNMP Agent to service an
Enterprise MIB of our own creation. I am working on the next generation of that product which will be Java
based and use SNMP4J Agent, instead of the NET-SNMP Agent which was extended using C language API's to
support ourenterprise MIB, and also supported the standard MIB-II and other popular MIBS.

What I want to do is implement an agent with SNMP4J, setup our Enterprise MIB, compile it, incorporate it
into the agent, and implement the code that goes and gets that data from the database for each point.
This seems to be to be the most common scenario many would want to do, but I cannot find an example of this. 
1. Could someone point me at an example program that does this (with a custom mub compiled and the back end
implemented)2. Could someone , in plain terms, outline the sections of the Agent architecture that I
would need to implement and point me at the API calls I'd use to do it. (a commentary on the above example)3.
Tell me which products I may need to purchase to get this job done, and which products I dont need to
purchase, but would be very useful in getting the job done faster or better.
My boss has ordered a license for the SNMP4J-SMI-PRO, and other than parsing text MIBS at runtime, I am
having a hard time seeing how this product gets me where I need to go.
I understand the parts and pieces of SNMP Agents as a whole, but I am looking to understand the SNMP4J system
better and get this done.
Thank you in advance for any advice, examples, tips or support. 
Ken Springhetti
SNMP4J mailing list
SNMP4J <at>
nino fattore | 17 Jun 22:31 2016

Virtual tables

It is not clear to me how a virtual table is implemented. Any example code to implement a virtual table could
be of help.Thanks,Nino Fattore
SNMP4J mailing list
SNMP4J <at>
ulrich berl | 16 Jun 16:36 2016

snmp4j-agent 2.5.0 - TestAgent: coldStartTrap not sent

Hi !
I use the snmp4j-agent 2.5.0 - TestAgent
I can't see the coldStartTrap anyhow (or some other traps from MyCustomMib)...(tried several vacm
views (as i get a 'Access denied by VACM' - see log), different access groups ecc).
GET requests works fine (on MyCustomMib).
May you can help me ?


INFO  | NotificationOriginatorImpl       | Notification reported with [] for context
DEBUG | DefaultUdpTransportMapping       | UDP receive buffer size for socket is set to: 106496
DEBUG | VacmMIB                          | VACM access requested for context=, securityName=cpublic, securityModel=2,
securityLevel=3, viewType=0, OID=
DEBUG | VacmMIB                          | Found group name 'v1v2group' for secName 'cpublic' and secModel 2
DEBUG | VacmMIB                          | Got views
fullReadView, fullWriteView, fullNotifyView, 3, 1]] for group name 'v1v2group'
DEBUG | VacmMIB                          | Matching against access entry
fullReadView, fullWriteView, fullNotifyView, 3, 1] with exactContextMatch=false,
prefixMatch=false, matchSecModel=true and matchSecLevel=true
WARN  | NotificationOriginatorImpl       | Access denied by VACM for

    protected void addNotificationTargets(SnmpTargetMIB targetMIB,
                                          SnmpNotificationMIB notificationMIB) {
(Continue reading)

Frank Fock | 8 Jun 23:09 2016

AgenPro 4.1.1 Released


AgenPro 4.1.1 has been released to fix a regression in the user code parser which
removed the leading line feed character from parsed user code with the (old but 
widely used) //—AgentGen user code delimiter.


* Fixed: Regression in the user code parser for --AgentGen delimiters
  which removed the leading newline from the user code.

Frank Fock

SNMP4J mailing list
SNMP4J <at>
nino fattore | 28 May 00:43 2016

Please need help with trap filtering

I'd like to know what is wrong with my code!My goal is to learn how to filter notification sent out.With the
following  code i am trying to use the NotifyFilterTable and NotifyFilterProfileTable to send 
all the traps to all the targets. the following step (once the following code is working) is to try to send
different traps to different targets.Thanks,Nino

 protected void addNotificationTargets(SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB) {
    targetMIB.addTargetAddress(new OctetString("notificationV3"),
                               new OctetString(new UdpAddress("").getValue()),
                               500, 1,
                               new OctetString("notify"),
                               new OctetString("v3notify"),

    targetMIB.addTargetParams(new OctetString("v3notify"),
                              //new OctetString("v3notify"),
                             // new OctetString("SHADES"),
                              new OctetString("NINO"),
(Continue reading)

Sudharani S | 26 May 07:28 2016

Network discovery usig snmp4j

Hi  Frank,
Can you please in this.
I am new SNMP protocol ,I have below requirement.Can anyone please help in 
this below requirement.

I need the guidance to start with this,I mean please let me know what all the 
  things I need to include to do this.
   And how to do snmp walk to pim neighbors table?,I have a snmp service enabled 
   in my system apart from this what all the jar files need to be include let me 
   know please.
  The requirement follows like this:
  1)To implement multicast network discovery using snmp in java 2)Create 
   CompletedRouterList (initially NULL) to store the routers for which discovery 
  was complete and a PendingRouterList containing the routers for which 
  discover is pending.
  3)At initialization time, statically populate the PendingRouterList with 
  initial set of routers from some config file.
  4)For each router in the PendingRouterList, if multicast is enabled then 
  query the pimInterfaceTable to obtain the list of interfaces on which PIM is 
  enabled. For example if R1 has PIM enabled and has interfaces 1/1 and 1/2/ on 
   which PIM is enabled then we will have:-
            1/2         1/1
      --------- R1 ----------
 5)For each router that has at least 1 interface that has PIM enabled on it, 
 query it's PIM Neighbor table to obtain the list of it's PIM neighbors. PIM 
 neighbor table also gives the interface index with which the router is 
 connected with it's neighbor. This information can be used to build the link 
 between the router and neighbor(s).
(Continue reading)

ru_44 | 18 May 15:19 2016

Null Pointer Exception - MOSubTreeProxy snmp4jAgent v2.5.0

Hi Frank,I recently upgraded to snmp4j 2.5.0 and snmp4j agent v2.5.0. There’s a bugfix in SNMP4J v2.5.0
which causes a Null Pointer Exception when we use
the MOSubtreeProxy in SNMP4J-Agent v2.5.0

* Fixed [SFJ-121]:
DefaultPDUFactory.createPDU does not set contextName and contextEngineID on


The MOSubtreeProxy class needs to set (or initialize) the
contextEngineID & contextEngineName in the DefaultPDUFactory inside its
constructor.  Currently when the
DefaultPDUFactory.applyContextInfoToScopedPDU() is called via DefaultPDUFactory.createPDU(),
both fields are NULL.

22767 [DefaultUDPTransportMapping_192.168.1.90/161]
DEBUG  - Access allowed for view
'fullReadView2' by subtree 1.3 for OID

java.lang.NullPointerException: Context engine ID
must not be null


(Continue reading)

nino fattore | 13 May 20:47 2016

nedeed help to use the addNotificationtargets() API

I'd like to use the addNotificationTargets() agent API to add a new target for notifications when the agent
is running.How can get to it and providing the SnmpTargetMIB and SnmpNotiicationMIB?Thanks,Nino
SNMP4J mailing list
SNMP4J <at>
nino fattore | 13 May 20:21 2016

forget password to the list

how can i retrieve the password?ThanksNino Fattore
SNMP4J mailing list
SNMP4J <at>
atike.demirbas | 13 May 12:10 2016

[Fwd: java.lang.IllegalArgumentException error]

---------------------------- Original Message ----------------------------
Subject: java.lang.IllegalArgumentException error
From:    atike.demirbas <at>
Date:    Wed, May 11, 2016 4:02 pm
To:      snmp4j <at>

I have developed an software for my school project. I have tried to
collect information on agent machines. When i do it for snmpv1, it is okay
but when i do it for snmpv3 i have an error. I have searched this problem
however i haven't found it. Please, help me.

There is my code;

Snmp client=null;
            client=new Snmp(new DefaultUdpTransportMapping());
            Address add=new UdpAddress("");

          //  USM usm=new USM(SecurityProtocols.getInstance(),new
         //   SecurityModels.getInstance().addSecurityModel(usm);

             UsmUser user = new UsmUser(new OctetString("nagios"),
                                     new OctetString("User3Password"),
                                     new OctetString("User3Encyrption"));
(Continue reading)

Raymond Yan Lok Chan | 12 May 08:25 2016

Print all In new window [SMI-1.2.0]Translating OID to human readable string

Hi all,
I am currently trying to use SMI-1.2.0 API to translate an OID using the
following guide:
and come up with the following code:
    static {
            SmiManager smiManager = new SmiManager(null, new
        } catch (IOException e){

    public static void main(String[] args) {
        OID testPrivOID = new OID("");

According to the guide, I expected to see output "enterprises.4976", but
instead I am only getting "".

Just for a confirmation, I tried to put everything in the main and checked
if the smiManager loaded the required Mibs:

    public static void main(String[] args) throws {
(Continue reading)