AR Server Status Monitor

Version 1
    Share:|

    This program performs health check on AR Server, and returns it in terms of a response code to the client request and also reports the status in a log file.

     

    - The program is a jetty server that provides REST interface to the clients, and is also accessible via http.

     

    - It accepts valid or invalid user ID + password combination to connect to the server

     

    - In case of an invalid user ID + password combination, it deduces the state of the server based on the exception it receives from the server.

     

    - Because of the fact that the program can accept invalid user ID + password combination, there is no need to store a valid user ID and password anywhere such as a configuration or properties file, thereby avoiding security issues.

     

    - Clients would get one of the following codes based on the AR Server state:

     

    UP-623@duration -> This code indicates that the program tried to connect to the AR Server using a combination of invalid user ID and password. However AR Server is up and running. Log file contains more details whether guest login is allowed by the AR Server.

    UP-0@duration -> This code indicates that the program logged in to the AR Server using a valid user ID and password, and the AR Server is up and running.

    DOWN-90@duration -> This code indicates that the AR Server is down or unreachable. It could be because network connection or AR Server is down.

    DOWN-93@duration -> This code indicates that AR Server is busy and taking more time to respond to the client than the client timeout value.

    DOWN-msgNum@duration -> This code indicates that AR Server is down. In this case, msgNum gives more details on the server's status.

    DOWN-UNKNOWN@duration   -> This code indicates that AR Server is down for unknown reason. You may need to check logs for details.

     

    - duration: The duration in seconds indicating the time taken by the AR Server to respond.

     

    Contents:

    - All dependent libraries(jetty* ; arStatusMonitor.jar, arapi*, log4j*) in lib folder

    - arstatusmonitor.bat to execute on windows OS and arstatusmonitor.sh for Unix

    - monitor.properties is the configuration file where user/server/jetty server's details needs to configured.

     

     

    How To Run:

    - Extract ARStatusMonitorUtility.zip to any location.

    - Update monitor.properties file with the required information.

    port: <Jetty Server's port> Default 46000

    arserver: <ARServer's hostname/IP> Default  localhost

    context: /arapi (DO NOT UPDATE)

    user: <User Name to connect arserver> Default !!IGNORE!!

    pass: <Password to connect arserver> Default !!IGNORE!!

    logfile: <Log File Path> Default archeckstatus.log will create in current directory. You can give any other file path as per your choice.

     

    Windows:

    - Set JAVA_HOME environment variable.

    - Launch command prompt and Execute arstatusmonitor.bat

    - Once it states 'INFO:oejs.Server:main: Started*' message, Open browser/REST client and hit URL similar to "http://localhost:46000/arapi/"

      (localhost in above URL indicates, hostname on which jetty server is running through given batch file.)

    - It will return with one of the result code which mentioned above.

     

    Unix:

    - Set JAVA_HOME environment variable.

    - Check arstatusmonitor.sh has execute permissions.

    - Execute arstatusmonitor.sh script.

    - Once it states 'INFO:oejs.Server:main: Started*' message, Open browser/REST client and hit URL similar to "http://localhost:46000/arapi/"

      (localhost in above URL indicates, hostname on which jetty server is running through given batch file.)

    - It will return with one of the result code which mentioned above.