Genesys Engage on-premises

 View Only
Discussion Thread View
Expand all | Collapse all

What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

  • 1.  What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 10-07-2018 14:44

    What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    For example:

    On one Linux server I will run 2 Apache Tomcat: Tomcat1 & Tomcat2.

    I would like to check if Tomcat is already running like this:

    ps –ef | grep Tomcat1
    ps –ef | grep Tomcat2

    and allow Stop/Start Tomcat1 and Tomcat2  in SCI.



    ------------------------------
    Genady Lesov
    Bank Hapoalim
    ------------------------------


  • 2.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 10-08-2018 09:11
    Hello There.

    I think you can configure tomcat startup.sh default script as a 3rd party server in CME. If it does not work 100% simply wrap the startup commands in another bash script and add as a 3rd party server in cme. It might require some scripting to fit your needs.

    There is a default startup script and shutdown scrip inside the tomcat bin folder, you can use as a foundation for what you are trying to do.

    Cheers.

    ------------------------------
    Amauri de Oliveira
    Alctel Telecom
    http://amaurioliveira.com
    ------------------------------



  • 3.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 04-15-2019 09:15
    Hi Genady,

    did you figure out how to monitor the linux tomcat in SCI?
    I'm looking for a solution for the same topic.


    ------------------------------
    Florian Wittenberg
    T-Systems International GmbH
    ------------------------------



  • 4.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    GENESYS
    Posted 04-16-2019 10:53
    All,

    Genesys SCS and LCA have the ability to start, stop, and monitor 3rd party application like Tomcat.  In fact many of the the Genesys components themselves run under Tomcat and use SCS/LCA to manage them.

    The Management Framework documentation spells out how to configure 3rd party applications here: https://docs.genesys.com/Documentation/FR/Current/MLUG/Mng3rdP

    Under the "Configuring Third-Party Applications" section, expand the "Show Steps" link and you'll see exactly what to configuration in the Application object.  It essentially boils down to creating a "start_stop" section and adding a "start_command" and "stop_command".  These commands can either be the actual OS command lines or point to a shell command.

    Once started, SCS and LCA will monitor the PID of the application to determine if it was started or has stopped and that will be reflected in SCI or Genesys Administrator.

    The docs are pretty thorough and should have all you need to get your 3rd party application hooked into the system as a first class citizen.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 5.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 04-17-2019 02:24
    Hi Jim,

    I'm very well aware how to get 3rd party applications into monitoring.
    This question is related to Tomcat on Linux, Genesys limits the Command line ​arguments to 255 characters,
    but on Linux the tomcat service has a full set of java parameters included and has more than 600 characters.

    Best regards,
    Florian

    ------------------------------
    Florian Wittenberg
    T-Systems International GmbH
    ------------------------------



  • 6.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    GENESYS
    Posted 04-17-2019 11:49
    Sorry.  I wasn't trying to be insulting of your knowledge.  I misunderstood your question.  

    Is there a way for you to put the Tomcat command line in a shell script and have SCS/LCA call that to start Tomcat, so that you can get around the 255 character limit?

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 7.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 04-17-2019 12:33
    ​Hi Jim,

    no worries.
    I can give it a try, not sure if it will work, as tomcat is already started via startup.sh by default.

    ------------------------------
    Florian Wittenberg
    T-Systems International GmbH
    ------------------------------



  • 8.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    GENESYS
    Posted 04-24-2019 20:33

    There is a Knowledge base article - Article Number 000067532 - "How to use Framework to control and monitor Tomcat running on Linux".
    Please, take a look if it helps.



    ------------------------------
    Anatoly Minkovsky
    Genesys - Employees
    ------------------------------



  • 9.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 05-09-2019 15:42
    Hello,
    I can not find this article in the knowledge base. Please send link to this article.
    Thanks

    ------------------------------
    Genady Lesov
    Bank Hapoalim
    ------------------------------



  • 10.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 05-10-2019 02:12
    @Anatoly Minkovsky Thank you, just tried it, but it was somehow not working properly on RHEL with Tomcat 9, Tomcat is starting but the home page is not loading properly (404 not found), will try to get it working.

    @Genady Lesov​​​ when you search for it, select "All Content" in the Drop Down Menu, it's not showing up within Pure Engage.

    Best regards,
    Florian

    ------------------------------
    Florian Wittenberg
    T-Systems International GmbH
    ------------------------------



  • 11.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 05-11-2019 01:54
    Thanks. I found this link under "All Content".

    ------------------------------
    Genady Lesov
    Bank Hapoalim
    ------------------------------



  • 12.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    GENESYS
    Posted 05-11-2019 02:08
    Florian, Genady,

    Thank you for the comments and just to (re)confirm - you could access the Knowledge article, could not you?
    If you still cannot get that very part of Management Layer functionality working then I would suggest to open a case with Customer Care and we will review and assist.

    Thank you,

    Anatoly

    ------------------------------
    Anatoly Minkovsky
    Genesys - Employees
    ------------------------------



  • 13.  RE: What is the easiest way to monitor/stop/start Tomcat on Linux in SCI?

    Posted 10-29-2020 09:05
    Edited by Michal Wlosinski 10-30-2020 03:14
    Hi Florian

    I know it's an old thread, but recently I had a similar problem with 3rd party app control from within SCS. I found a simple workaround that might be useful.

    In my case it was about the GIR IRWS component.
    It was possible to start and stop the process using the options in the Annex/start_stop section of the application:
    .. but the process name was too long for LCA/SCS to monitor its status.

    Every 5 seconds I run a script that checks if IRWS process is running. If it is, it creates a parallel "dummy" process with any short name that LCA/SCS can recognize.

    DummyProcess.cron.sh
    #!/bin/bash

    #Real process name (full or part)
    RPN="jar /apps/gcti/ir-web-services/gir.jar"
    #Dummy process name
    DPN="IRWS_CLUSTER DummyProcess"

    if pgrep -f "$RPN" >/dev/null; then
       if ! pgrep -f "^$DPN" >/dev/null; then
       perl -MPOSIX -e "\$0=\"$DPN\"; pause" &
       fi
    else
       if pgrep -f "^$DPN" >/dev/null; then
       pkill -f "^$DPN"
       fi
    fi

    The script can be run from the user's cron (crontab -e):

    *
    * * * * for i in {1..12}; do /apps/gcti/ir-web-services/DummyProcess.cron.sh & sleep 5; done

    In the application, you just need to configure the "dummy" process name, and the status monitoring should work.
    Working Directory: .
    Command Line: IRWS_CLUSTER
    Command Line Arguments: DummyProcess

    Regards
    Michal


    ------------------------------
    Michal Wlosinski
    Whirly sp. z o.o.
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources