Skip to content

Commit

Permalink
Merge pull request #1280 from usegalaxy-eu/hxr.monitor-cvmfs_timeout
Browse files Browse the repository at this point in the history
Parallelize CVMFS monitoring to bring back the CVMFS Grafana dashboard
  • Loading branch information
bgruening authored Jul 25, 2024
2 parents 9e1bbfb + d50c83d commit c6b1447
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions roles/hxr.monitor-cvmfs/templates/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ check_repo() {
host="$1"
repo="$2"

http_code="$(curl http://$host/cvmfs/$repo/.cvmfspublished -I --silent | head -n 1 | cut -f2 -d' ')"
header="$(curl http://$host/cvmfs/$repo/.cvmfspublished --silent | head -n 12)"
http_code="$(curl --max-time 20 http://$host/cvmfs/$repo/.cvmfspublished -I --silent | head -n 1 | cut -f2 -d' ')"
header="$(curl --max-time 20 http://$host/cvmfs/$repo/.cvmfspublished --silent | head -n 12)"

if [ "$http_code" -eq "200" ]; then
# https://cvmfs.readthedocs.io/en/stable/cpt-details.html#repository-manifest-cvmfspublished
Expand All @@ -21,6 +21,8 @@ check_repo() {

{% for host in cvmfs_check_servers.hosts %}
{% for repo in cvmfs_check_servers.repos %}
check_repo {{ host }} {{ repo }}
check_repo {{ host }} {{ repo }} &
{% endfor %}
{% endfor %}

wait

0 comments on commit c6b1447

Please sign in to comment.