Software Secret Weapons™


 
How To Use Linguine Watch In Java Applications
by Pavel Simakov on 2006-03-23 23:58:13 under Linguine Watch, view comments
Bookmark and Share
 


In order to add SNMP performance monitoring to your application with Linguine Watch you need to:

  • decide what to monitor
  • choose standard or implement custom IPerfMonitor objects and instantiate them in your code
  • configure and start IPerfAgent or ISNMPAgent in the main startup sequence of your application
  • register IPerfMonitor objects with IPerfAgent
  • create MIB file for SNMP monitoring

The real-life practical tutorials are available. Start with Tutorial 1.

There are many options that can be used to control Linguine Watch. Some properties apply to SNMP monitoring only, other are used at all times. Each of these variables has a corresponding setter and getter method in the appropriate class.

The various options can be set right after an instance of IPerfAgent or ISNMPAgent is created, but before the agent is started. For example:

 
	LinguineSNMPWatch watch = new LinguineSNMPWatch();
	
	watch.getPerfAgentContext().setSnapshotFileName("c:/perf.html");
	watch.getSNMPAgentContext().setPort(12345);
	
	watch.start();		
	...

  • class PerfAgentContext, controls options for core performance monitoring functionality
 
	// frequency for collecting data from the counters; 
	// once per this number of milliseconds 
	private int collectDelayMillis;

// frequency for saving HTML snapshot file; // once per this number of milliseconds private int snapshotDelayMillis;

// name of HTML snapshot file to periodically save data into; // no snapshot file if null private String snapshotFileName; // max number of history rows to keep in memory and in // the HTML snapshot file private int maxHistoryRows;

  • class HtmlSnapshotFormatter, customizes look and feel of periodic HTML snapshot file
  • class SNMPAgentContext, contains core functionality for SNMP agent
 
	// TCP/IP port number for the SNMP agent server;
	// defaults to standard SNMP port 161  
	private int port; 
	
	// each Enterprise must place its counters under
	// a specific enterprise identified; if you do not have one
	// leave this alone; used for MIB file generation
	private int enterprisesOID;
	
	// name of the enterprise; used for MIB file generation
	private String organizationName;
	
	// contact info for the enterprise; used for MIB file generation
	private String contactInfo;
	
	// community string for SNMP agent to respond to;
	// default to "public"
	private String communityString;
	
	// standard prefix for the names of counter/gages; used for MIB file generation
	private String namespace;

No comments yet


Leave a comment


 
Dog Emotional 2010 Calendar Dog Emotional Mousepad Dog Fashionable 2010 Calendar Dog Fashionable Mousepad

Copyright © 2004-2010 by Pavel Simakov
any conclusions, recommendations, ideas, thoughts or the source code presented on this site are my own and do not reflect a official opinion of my current or past employers, partners or clients
SourceForge.net Logo