Skip to content

Commit

Permalink
Merge pull request IQSS#4182 from IQSS/4180-watch_timers
Browse files Browse the repository at this point in the history
4180 watch timers
  • Loading branch information
kcondon authored Oct 12, 2017
2 parents 6b488e3 + e3908c4 commit 494bc23
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/sphinx-guides/source/_static/util/check_timer.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# example monitoring script for EBJ timers.
# currently assumes that there are two timers
# real monitoring commands should replace the echo statements for production use

r0=`curl -s http://localhost:8080/ejb-timer-service-app/timer`

if [ $? -ne 0 ]; then
echo "alert - no timer service" # put real alert command here
fi

r1=`echo $r0 | grep -c "There are 2 active persistent timers on this container"`

if [ "1" -ne "$r1" ]; then
echo "alert - no active timers" # put real alert command here
fi

4 changes: 4 additions & 0 deletions doc/sphinx-guides/source/admin/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ In production you'll want to monitor the usual suspects such as CPU, memory, fre
https://github.com/IQSS/dataverse/issues/2595 contains some information on enabling monitoring of Glassfish, which is disabled by default.

There is a database table called ``actionlogrecord`` that captures events that may be of interest. See https://github.com/IQSS/dataverse/issues/2729 for more discussion around this table.

Should you be interested in monitoring the EJB timers, this script may be used as an example:

.. literalinclude:: ../_static/util/check_timer.bash

0 comments on commit 494bc23

Please sign in to comment.