Reputation: 851
I've built a simple alert monitor to display the health of various applications. This is configured by XML, as each monitor instance needs to show different metrics. An example configuration may be:
<machine>
<monitors>
<check type="connectivity" name="Production Server">
<property key="host" value="ops01.corp" />
<alarm />
</check>
</monitors>
</machine>
Currently, I'm storing this in the root of the C:\ drive of the server. What would be nice is if I could put it in the deploy directory of the JBoss server, and could somehow get a reference to it. Is this possible? I looked at MBeans but it didn't seem to support complex XML structures.
Robert
Upvotes: 0
Views: 363
Reputation: 46806
Try JOPR - http://www.jboss.org/jopr .
For custom metrics, you can write your own plug-in.
Upvotes: 3
Reputation: 570365
You can get an input stream for any file in the classpath by using the ClassLoader#getResourceAsStream(String name)
method. Just pass the location of the file relative to the classpath.
Upvotes: 2