Skip to content
Snippets Groups Projects
Commit babb158e authored by Dan Notestein's avatar Dan Notestein
Browse files

Make hivemind's healthcheck require reptracker to be in sync also

parent 9ba65584
No related branches found
No related tags found
2 merge requests!66Merge develop to master for release,!37Add the ability to get email notifications when haproxy detects a service going down
...@@ -8,6 +8,13 @@ trap "trap - 2 15 && kill -- -\$\$" 2 15 ...@@ -8,6 +8,13 @@ trap "trap - 2 15 && kill -- -\$\$" 2 15
check_haf_lib check_haf_lib
REPTRACKER_LAST_PROCESSED_BLOCK_AGE=$(psql "$POSTGRES_URL_REPTRACKER" --quiet --no-align --tuples-only --command="select extract('epoch' from hive.get_app_current_block_age('reptracker_app'))::integer")
if [ "$REPTRACKER_LAST_PROCESSED_BLOCK_AGE" -gt 60 ]; then
age_string=$(format_seconds "$REPTRACKER_LAST_PROCESSED_BLOCK_AGE")
echo "down #reptracker_app block over a minute old ($age_string)"
exit 3
fi
HIVEMIND_LAST_IMPORTED_BLOCK_AGE=$(psql "$POSTGRES_URL" --quiet --no-align --tuples-only --command="select extract('epoch' from hive.get_app_current_block_age('hivemind_app'))::integer") HIVEMIND_LAST_IMPORTED_BLOCK_AGE=$(psql "$POSTGRES_URL" --quiet --no-align --tuples-only --command="select extract('epoch' from hive.get_app_current_block_age('hivemind_app'))::integer")
if [ "$HIVEMIND_LAST_IMPORTED_BLOCK_AGE" -gt 60 ]; then if [ "$HIVEMIND_LAST_IMPORTED_BLOCK_AGE" -gt 60 ]; then
age_string=$(format_seconds "$HIVEMIND_LAST_IMPORTED_BLOCK_AGE") age_string=$(format_seconds "$HIVEMIND_LAST_IMPORTED_BLOCK_AGE")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment