Advertisement
Guest User

SNMP4J Notification Filter

a guest
Mar 6th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. /* Works. Creates filter profile */
  2.  
  3. notificationMIB.getNotifyFilterProfileTable().addRow(
  4. notificationMIB.getNotifyFilterProfileTable().createRow(
  5. new OctetString("v2c").toSubIndex(true), // true - implied length
  6. new Variable[]{
  7. new OctetString("onlyDefault"),
  8. new Integer32(StorageType.permanent),
  9. new Integer32(RowStatus.active)}));
  10.  
  11.  
  12.  
  13. /* Fails. Matches nothing, blocks everything */
  14. notificationMIB.getNotifyFilterTable().addRow(
  15. notificationMIB.getNotifyFilterTable().createRow(
  16. // false - Not implied length true - Implied length
  17. new OctetString("onlyDefault").toSubIndex(false).append(new OID(new int[]{1,3,6}).toSubIndex(true)),
  18. new Variable[]{
  19. new OID(new int[]{1,3,6}),
  20. new OctetString(),
  21. new Integer32(1), // Included
  22. new Integer32(StorageType.permanent),
  23. new Integer32(RowStatus.active)}));
  24.  
  25. 109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Notification 1.3.6.1.6.3.1.1.5.1 reported with [] for context
  26. 109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Notification 1.3.6.1.6.3.1.1.5.1 did not pass filter 118.50.99
  27. 109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] WARN org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Access denied by VACM for 1.3.6.1.6.3.1.1.5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement