nino fattore | 28 May 00:43 2016
Picon

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.addDefaultTDomains();
    
  
    targetMIB.addTargetAddress(new OctetString("notificationV3"),
                               TransportDomains.transportDomainUdpIpv4,
                               new OctetString(new UdpAddress("92.135.77.100/162").getValue()),
                              
                               500, 1,
                               new OctetString("notify"),
                               new OctetString("v3notify"),
                               StorageType.permanent);

    targetMIB.addTargetParams(new OctetString("v3notify"),
                              MessageProcessingModel.MPv3,
                              SecurityModel.SECURITY_MODEL_USM,
                              //new OctetString("v3notify"),
                              //SecurityLevel.NOAUTH_NOPRIV,
                             // new OctetString("SHADES"),
                              new OctetString("NINO"),
                              SecurityLevel.AUTH_PRIV,
                              StorageType.permanent);
   
(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
Picon

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

http://www.snmp4j.org/CHANGES.txt

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

  instances.

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 org.snmp4j.agent.mo.snmp.VacmMIB  - Access allowed for view
'fullReadView2' by subtree 1.3 for OID 1.3.6.1.2.1.1.1.0

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

        at
org.snmp4j.ScopedPDU.setContextEngineID(ScopedPDU.java:69)

        at
(Continue reading)

nino fattore | 13 May 20:47 2016
Picon

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> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
nino fattore | 13 May 20:21 2016
Picon

forget password to the list

how can i retrieve the password?ThanksNino Fattore
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
atike.demirbas | 13 May 12:10 2016
Picon

[Fwd: java.lang.IllegalArgumentException error]

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

Hello,
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;
        try{
            client=new Snmp(new DefaultUdpTransportMapping());
            Address add=new UdpAddress("192.168.2.3/161");
            client.listen();

          //  USM usm=new USM(SecurityProtocols.getInstance(),new
//OctetString("MPv3.createLocalEngineID()"),0);
         //   SecurityModels.getInstance().addSecurityModel(usm);

             UsmUser user = new UsmUser(new OctetString("nagios"),
                                     AuthMD5.ID,
                                     new OctetString("User3Password"),
                                     PrivDES.ID,
                                     new OctetString("User3Encyrption"));
(Continue reading)

Raymond Yan Lok Chan | 12 May 08:25 2016
Picon

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:
https://oosnmp.net/confluence/pages/viewpage.action?pageId=5799973
and come up with the following code:
    static {
        try{
            SmiManager smiManager = new SmiManager(null, new
File("E:/Download/snmp4j-smi-1.2.0-dist/snmp4j-smi-1.2.0/mibrepository"));
            smiManager.loadModule("SNMP-VIEW-BASED-ACM-MIB");
            smiManager.loadModule("SNMPv2-MIB");
            SNMP4JSettings.setOIDTextFormat(smiManager);
            SNMP4JSettings.setVariableTextFormat(smiManager);
        } catch (IOException e){
            System.out.println(e);
        }
    }

    public static void main(String[] args) {
        OID testPrivOID = new OID("1.3.6.1.4.1.4976");
        System.out.println(testPrivOID.toString());
    }

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

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)

Frank Fock | 11 May 00:32 2016

AgenPro 4.1, SNMP4J-Agent 2.5, SNMP4J-Model 1.0 Released

Hi,

AgenPro 4.1 has been released which includes a new engine to protect
existing data. The new format to protect user code in generated files
now supports more programming languages (comment types).

AgenPro 4.1 adds support for generating a complete agent including
pom.xml, agent main, and AgentConfig.properties file.
With that, you can generate ready-to-use agents from your MIB files
with a few clicks only.

*NEW*
AgenPro 4.1 also provides code generation templates for SNMP
command generator (manager) implememtation based on
SNMP4J-Model 1.0.
It provides proxy objects for scalar and tabular SNMP objects.
Trap directed polling will be supported soon, other trap handling
is already supported using the standard SNMP4J API.
SNMP4J-Model can be used with SNMP4J-SMI-PRO to map
SNMP types to Java native types like String, Integer, Long, etc.
at runtime. AgenPro can be used to do the mapping at
compile time, though.

You can download SNMP4J-Model 1.0 and the other new releases
from https://agentpp.com/download.html
There you can also find a link to the API JavaDoc.

Comments and feature requests on SNMP4J-Model are welcome!
Its features will be extended during the next weeks and months
anyway, but I would like to know your most important requirements
(Continue reading)

linhui (F | 4 May 05:12 2016

Bug report: org.snmp4j.MessageException: Socket is closed

Hi,
In our code, we use Snmp Object to send a trap. The question is : while running for some time (may be a week) in
Windows platform, there will occur exception while sending trap.

The Exception stack is :
         org.snmp4j.MessageException: Socket is closed
         at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:485)
         at org.snmp4j.Snmp.sendMessage(Snmp.java:1082)
         at org.snmp4j.Snmp.send(Snmp.java:882)
         at org.snmp4j.Snmp.send(Snmp.java:875)
         ...

I have checked the source, The closed socket is DefaultUdpTransportMapping's DatagramSocket.

Another messages:

(1)     Before running the sending-trap thread, we use listen() function to listen the IP and port which is the
same as sending-trap IP and port.
For example, the IP is 10.66.92.233 and port is 6666, we listen 10.66.92.233/6666 and use
10.66.92.233/6666 to send a trap.

(2)     SNMP4j's version is 1.11.2

At the beginning of the thread running, there are no exceptions occur. And I don't know why this exception occur.

Somebody can help me and explains this?

Best regards,
Lin Hui
_______________________________________________
(Continue reading)

Frank Fock | 3 May 23:51 2016

SNMP4J 2.5.0 and MIB Explorer 4.1.4 Released

Hi,

SNMP4J 2.5.0 has been released and is now also available at Maven Central.
All other SNMP4J open source packages will also be updated and then 
released
on Maven Central too.

RELEASE NOTES

SNMP4J 2.5.0:
* Added [SFJ-120]: Maven Central deployment support (refactored pom.xml).
* Fixed [SFJ-118]: DefaultTcpTransportMapping: SocketEntry instances 
created for incoming TCP connections
   are not immediately removed when connection is closed remotely.
* Fixed [SFJ-119]: Snmp: NotificationListener cannot be registered with 
custom configured TransportMapping.
* Fixed [SFJ-121]: DefaultPDUFactory.createPDU does not set contextName 
and contextEngineID on ScopedPDU
   instances.
* Fixed [SFJ-124]: ArgumentParser cannot parse formats with default 
values for parameters correctly.
* Added: Added MaxAccess, SubIndexInfo, and SubIndexInfoImpl to better 
support MIB specification
   based SNMP operations.
* Improved: Added custom OID configuration support for non-standard 
security protocols in
   SecurityProtocols.addDefaultProtocols.
* Added PrivGeneric to reduce code size.
* Added SecurityPrivacy.isSupported() to be able to test security 
protocol support by JVM.
(Continue reading)

ru_44 | 27 Apr 19:10 2016
Picon

Subindex on table row

 For our custom MIB, we have added code to the MOValueValidationListener::validate() for a table column. 
 How do we figure out what the subindex is for the row's column that is being validated?
 		 	   		  
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

Gmane