-
1. Re: JMX/SNMP newbie question
dimitris May 18, 2005 7:05 PM (in response to dissonance)The notification types can be anything you like, just try to make it unique. It is common to use some package-like convention, e.g.
com.xxx.some.type
The next step is to subscribe to receive your notification by configuring the SubscriptionList attribute of the adaptor. The provided mechanism allows you to register to receive any possible notification in the system from any mbean(s), see http://wiki.jboss.org/wiki/Wiki.jsp?page=SubscriptionList.
The final step is to define a mapping in notifications.xml, from the type you specified to a trap, see http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSNMPAdapterNotifications -
2. Re: JMX/SNMP newbie question
dissonance May 19, 2005 12:29 PM (in response to dissonance)Thanks! I'll give it a shot.
-
3. Re: JMX/SNMP newbie question
mlybarger Jun 9, 2005 3:46 PM (in response to dissonance)i'm also interested in using snmp for monitoring the jboss server's "health". one thing that has been mentioned as interesting to watch are free memory levels. if the free memory gets above say 90%, i'd like to send an snmp trap to the snmp manager.
i haven't really worked much with snmp as of yet, so hopefully i've got the lingo down.
does jboss already provide an mbean which sends this type of notification? -
4. Re: JMX/SNMP newbie question
dimitris Jun 9, 2005 4:23 PM (in response to dissonance)There is actually such an MBean:
(look in deploy/monitoring-service.xml)<mbean code="org.jboss.monitor.services.MemoryMonitor" name="jboss.monitor:service=MemoryMonitor"> <attribute name="FreeMemoryWarningThreshold">17m</attribute> <attribute name="FreeMemoryCriticalThreshold">16m</attribute> </mbean>
There is a problem with it, if you want to use it in conjuction with the snmp-adaptor, in that it produces the same notification type (jboss.alarm.memory.low) but with a different severity level to indicate the setting or the seizure of the alarm.public static final int SEVERITY_NORMAL = 0; public static final int SEVERITY_WARNING = 1; public static final int SEVERITY_MINOR = 2; public static final int SEVERITY_MAJOR = 3; public static final int SEVERITY_CRITICAL = 4; public static final int SEVERITY_UNKNOWN = 5;
So you can't only rely on the notification type only to indicate the low-memory condition.
This was the first effort of actually having a "stateful" alarm in jboss, something that would go into an active alarm table.