LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  LINUX Scripts & Alerts

    Employee
    Posted 05-11-2017 07:36

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Brad Brezinski

    Hello, LINUX scripts: Is there a way to write a script to not only check if LAE is running but also to verify that the server is listening to the ports (like port 7721)? Is that a good approach when setting up alerts? Why am I asking... I recently had a server issues with which I was getting java.net.ConnectExeption: Connection refused when trying to run scripts on the server. Users could not connect with BRE. I could login with putty and see that LAE was running, but I could not run scripts. The hardware team thought the server was probably not listening to port 7721 (or maybe all ports). We had the servers bounced and restarted LAE and everything was back to normal. I'd like to set up an alert for a scenario like that. Thanks, Brad


  • 2.  RE: LINUX Scripts & Alerts

    Employee
    Posted 05-11-2017 07:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    This isn't an alert but the attached script is what I generally use for startup, shutdown and checking LAE status. It should give you a good starting point to modify one for an alert. Its only for LAE, it doesn't check if Jetty or H2 are running.

    Example: when LAE is up it runs like this and tells you the port:

    [lavadmin@lava LAE6.1.4]$ brainserver status

    ====[BRAIN SERVER - lavadmin - 7614]=====================================

    [i] brain server on port 7614 is running [user:lavadmin pid:41656]




    Stop LAE:

    [lavadmin@lava LAE6.1.4]$ brainserver stop

    ====[BRAIN SERVER - lavadmin - 7614]=====================================

    [i] stopping brain server on port 7614... [user:lavadmin pid:41656]
    [i] brain server terminated




    [lavadmin@lava LAE6.1.4]$ brainserver status

    ====[BRAIN SERVER - lavadmin - 7614]=====================================

    [i] brain server on port 7614 is not running.




    Then start it up again:

    [lavadmin@lava LAE6.1.4]$ brainserver start

    ====[BRAIN SERVER - lavadmin - 7614]=====================================

    [i] starting BRAIN server on port 7614...
    [i] brain server started [user:lavadmin pid:51633]




    brainserver_20170511.txt

    *Credit to Henk in Pomerol!


    Edit: In having a second read of your post, in your particular case I think this script would show LAE as running if it was still a process, but not entirely sure.


  • 3.  RE: LINUX Scripts & Alerts

    Employee
    Posted 05-11-2017 08:52

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    I use the attached python script to check the "health" of the Automation services. I put it in cron to run once per hour.
    It verifies that Automation is up and running, and it looks for jobs that have been running too long - possibly stuck.
    You will have to tweak it to make sure it's using the right port, etc.
    Attachments:
    watchdog.py.txt


  • 4.  RE: LINUX Scripts & Alerts

    Employee
    Posted 05-11-2017 08:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Brad Brezinski

    Thanks gmullin! Brad