Comments (3)
It seems like this line
String sampleDMax = selectParameterFromNode(sample, "dmax", "0");
is causing trouble, its return value should be "0"
, since dmax
isn't in the sample jmxetric_text.xml
file. For somehow it returns ""
.
from jmxetric.
Think I've found the problem. In jmxetric_test.xml
, we have the following doctype
<!ELEMENT sample (mbean)*>
<!ATTLIST sample delay CDATA #REQUIRED>
<!ATTLIST sample dmax CDATA "" >
This meant that dmax
is always going to be present, with a default value of ""
. Hence the method selectParameterFromNode
in XMLConfigurationService
:
Node node = ganglia.getAttributes().getNamedItem(attributeName);
if ( node != null ) {
String value = node.getNodeValue();
if ( value != null )
ret = value ;
}
would return ""
, as node
is never null
for dmax
, since a default value was given in the XML doctype.
2 ways to fix this:
- remove that attribute from
sample
- give it a default string of "0", because that's what the code does anyway
Referencing the initialdelay
attribute in etc/jmxetric.xml
, it seems that 2. is a better way:
<!ELEMENT sample (mbean)*>
<!ATTLIST sample delay CDATA #REQUIRED>
<!ATTLIST sample initialdelay CDATA "0">
<!ATTLIST sample dmax CDATA "" >
and note that dmax has an empty default string here as well.
@dpocock which way would be suitable?
from jmxetric.
I would suggest two things:
- fix the default in the sample, change it to "0"
- some people may have already copied that sample and may not notice the fix. Therefore, I think that in the code it should check if sampleDMax.equals("") and if so replace it with 0
from jmxetric.
Related Issues (20)
- Use of patterns in mbean parameter name doesn't work HOT 6
- should not initialise logging when loaded early, breaks other logging systems HOT 2
- support for deriving rates from counters HOT 1
- delayed mbean initialisation HOT 1
- Scaling metrics
- calls ManagementFactory.getPlatformMBeanServer too early HOT 2
- write a utility to scan the MBean server and generate sample configuration entries HOT 4
- the value of TMAX in the gmond output XML is always 60, no matter what delay is configured
- need a way to specify DMAX HOT 3
- Using slope=positive does not work for gmond 3.0.x
- support for including configuration from multiple files HOT 2
- better CPU metric support HOT 7
- reloading jmxetric XML configuration at runtime HOT 3
- Private MyPublisher class in MBeanSamplerTest.java does not implement all methods of Publisher interface
- Standardize formatting for source files HOT 1
- jmxetric 1.0.6 fails to honor <ganglia> element in xml config
- Feature request: Read ganglia configuration from gmond.conf, or allow multiple <ganglia> config elements to be specified
- Can't monitor webapp's JVM in JBoss EAP 6.2 (Domain mode) HOT 2
- configuration of jmx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmxetric.