How do I check if IG (All versions) is up and running?
The purpose of this article is to provide a way to check if IG is up and running when it is behind a load balancer.
1 reader recommends this article
Checking if IG is up and running
IG 7 and later
In IG 7 and later, you can use the ping endpoint to check if IG is available, for example:
http://openig.example.com:8080/openig/pingYou will receive a HTTP 200 if IG is available.
Pre-IG 7
Since most of what IG does is proxy, its health mainly depends on the health of upstream applications for which IG is the proxy.
The following method provides a simple way to check that IG is up and running by establishing that IG can read its configuration and return a result without depending on a downstream application. The static text and URI shown are just examples; you should use values that make sense in the environment where IG is deployed:
- Create a simple isAlive route. The result should return a 200 status along with some static text; for example, "Server is ALIVE". These results can be used to check the health of IG.
- Add a new route to the IG configuration. For example, you could create a 00-isAlive.json file in the $HOME/.openig/config/routes directory, similar to the following: { "handler": { "type": "StaticResponseHandler", "config": { "status": 200, "reason": "Found", "entity": "Server is ALIVE" } }, "condition": "${request.uri.path == '/isAlive.jsp'}" }Notice that /openig/ is not used for the route since this is reserved for admin purposes only; instead the /isAlive.jsp URI is used in this example.
- Configure the load balancer to check the results from this URL, for example, by calling the following URL: http://openig.example.com:8080/isAlive.jsp
Note
If you require more detailed checks, you could make use of a ScriptableHandler instead: ScriptableHandler.
See Also
How do I generate more detailed debug logs to diagnose an issue in IG (All versions)?
How do I collect JVM data for troubleshooting IG (All versions)?
Related Training
N/A
Related Issue Tracker IDs
N/A