THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
To change the alert level:
Java
The attached AlertNotificationListener JMX client changes the alert level using code like:
Code Block | ||
---|---|---|
| ||
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1092/jmxrmi"); JMXConnector jmxConnector = JMXConnectorFactory.connect(url); MBeanServerConnection mbs = jmxConnector.getMBeanServerConnection(); ObjectName distributedSystem = new ObjectName("GemFire:service=System,type=Distributed"); mbs.invoke(distributedSystem, "changeAlertLevel", new String[] {"warning"}, new String[] {"java.lang.String"}) |
Once the alert level has been set to 'warning', then alerts warning log messages will be received by NotificationListenersany NotificationListener.
Here are some example using JConsole and Java.
...