forked from IQSS/dataverse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request IQSS#4182 from IQSS/4180-watch_timers
4180 watch timers
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters