==============
  SNMP Alerts
==============

The XAP Alert interface exposes the XAP environment and the application’s health state. It allows users to register listeners on
one or more alert types and receive notifications once an alert has been raised or has been resolved. You may use this framework
to build a custom integration with a third party monitoring products to leverage the XAP alerting system. A recommended approach
for such integration would be to construct a listener that writes the chosen types of alerts into logger mechanism. Examples for
such may be the log4j or the commons-logging frameworks.

Documentation:
---------------

For more information about the Alert Logging Gateway Example please refer to "SNMP Alerts":
https://docs.gigaspaces.com/14.2/dev-java/snmp-connectivity-via-alert-logging-gateway.html

Running the example:
---------------------
1. Setup an SNMP trap receiver, e.g. using the MIB browser (http://ireasoning.com/mibbrowser.shtml)
   - open the SNMP Trap Receiver (using sudo) to a specified port (default 162 - if you are not root, change port to > 1024)
   - make sure to configure host/port accordingly in <XAP ROOT>/tools/alert-integration/src/main/resources/log4j.properties

2. in <XAP ROOT>/tools/alert-integration run: mvn clean install
3. goto <XAP ROOT>/bin
4. run: ./gs-agent.sh
5. run: ./gs.sh deploy ../tools/alert-integration/target/AlertLoggingGateway.jar

6. In the trap receiver you will notice the following alerts:
 for example:

 INFO,GS-admin-event-executor-thread,org.openspaces.example.alert.logging.AlertLoggingGateway,RAISED
 | WARNING | Heap Memory Utilization |GSC Heap memory crossed above a 20% threshold, for a period of 5 seconds, with an average
  memory of 26.37% | GSC-2 36040 on moran-osx.local (192.168.33.19) |

