-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
functionality to monitor process with minimal configuration #35
base: master
Are you sure you want to change the base?
Conversation
…ent. - Replaced InputSource with Document for efficiency reasons and to support .xml configuration files loaded from the system classpath. - Added some extra output so the initial state is known each time. - Added process name resolvers. Useful to name a process using several criteria. Solvers are applied in order as they are declared in the configuration. The first that return a name wins. - Added 3 process name resolvers implementations. They pick the name from a) an environment variable, b) a system property, c) a constant. - Modified the configuration. Added a section: /jmxetric-config/jvm/process-name-solvers Example: <process-name-solvers> <process-name-solver type="environment-variable" value="APPNAME" /> <process-name-solver type="property-variable" value="app_name" /> <process-name-solver type="string" value="MyProcess" /> </process-name-solvers> - Added a property warnNotFoundJmxEntries in MBeanAttribute, if true and there is an error when the agent look for a JMX property, it will print a warning in the logs. if it is false (default value) no warning is logged for not found values. Useful to have a generic XML configuration file that can be used with several JVMs. (Implementation of the setter is pending though). - Removed unused methods in MBeanHolder
a) environment variable PROCESSNAME b) environment variable PROCESSNAME c) environment variable PROCESS_NAME d) environment variable processName e) property variable process_name - Switched to UNICAST since that is what it is used in AWS and similar services. - Updated jmxetric_test.xml - Updated .gitignore to exclude intelliJ files.
… places. Right now it tries: a) find the given name in the classpath b) find it in the path c) find it in /etc/ganglia directory d) try to get the default configuration that is stored in the same JAR with teh anme default_jxmetric.xml e) throw an exception.
…the variable Djava.util.logging.config.file=myfile. System.out.println are now log.info() and they are silenced. Created jmxetric.logging.properties with a configuration that keeps all quiet except with SEVERE logs. Imports are reorganized.
Thanks for this contribution, your efforts are really appreciated. One initial thing that sticks out when I look at this is the logging stuff. I've been very tempted to remove logging from this project for a few reasons:
What is your feeling about this? We can still have logging in unit tests of course. |
I believe we should replace java.util.logging classes used in the agent for Pablo On Mon, Apr 20, 2015 at 10:14 AM, Daniel Pocock [email protected]
|
I made several changes to:
a) create a jar with all its dependencies in 1 jar (with agent classifier)
b) added a default configuration inside the jar.
c) added some configurations to be applied 1 by one until one solves the name of the process.
d) replaced InputSoure with Document so we can read configuration files from files as before or from input streams.
Added a logging.properties that only reports errors in the logs. Using a property we could make that the agent read other configuration file so we can make logging more verbose.
The idea is that once the agent is installed, it could server several processes without configuration. Other scenario is to have a central configuration somewhere. This is useful for cluster monitoring like amazon, google, etc.