diff --git a/api.py b/api.py index 72276d1f77bbc1e05c1f8fbbfe0a8f9e78905689..f25f5693b68727412b86d3c549710cff45302d04 100755 --- a/api.py +++ b/api.py @@ -124,7 +124,7 @@ def parseLog(lines,criteria): rowDate = datetime.strptime(clearDateString(row[1]), '%a %b %d %H:%M:%S %Y').strftime('%Y-%m-%d') - # check for entries to be in range of date of rotated log + # check for entries to be in range of date of rotated log if 'cur_date' in criteria and criteria['cur_date'] != rowDate: continue diff --git a/eccs-logrotate.conf b/eccs-logrotate.conf index 6762a49e7a9272bc667fc14975d9135839701104..55df22b0b552077cb0bf365a7aa08c21671c44d1 100644 --- a/eccs-logrotate.conf +++ b/eccs-logrotate.conf @@ -1,6 +1,6 @@ -/home/eccs/logs/eccs-uwsgi-req.log { +/home/eccs/stats/eccs-uwsgi-req.log { su root root - create 664 eccs eccs + create rotate 30 daily nocompress diff --git a/eccs.ini b/eccs.ini index 03a8133d9e73a8bfe41b5b12c1d59f05709b5c61..d9bb6a61bd724fbf8af44e20796c0e0659bfa718 100644 --- a/eccs.ini +++ b/eccs.ini @@ -23,7 +23,7 @@ wsgi-file = eccs-wsgi.py plugins = python3,logfile enable-threads = true -req-logger = file:logs/%(project)-uwsgi-req.log +req-logger = file:stats/%(project)-uwsgi-req.log log-maxsize = 100000000 log-format = %(addr)|[%(ctime)]|%(method)|%(uri)|%(uagent)|%(referer) diff --git a/eccs_cron b/eccs_cron index e8b3b60dc90038767a9ec59936047e91303b9002..c3af8ce2499c1e8a03718fd3020272736a4e3aa4 100644 --- a/eccs_cron +++ b/eccs_cron @@ -1,5 +1,5 @@ 0 22 * * * root (echo "[start LogRotate]" && /usr/sbin/logrotate -v /etc/logrotate.d/eccs && echo "[end LogRotate]") > /proc/1/fd/1 2>&1 0 1 * * * root /usr/bin/touch /home/eccs/eccs.ini 0 1 * * * root (echo "[start PyFF]" && /usr/local/bin/pyff --loglevel=DEBUG /home/eccs/pyff-config/sps-metadata.xml && echo "[end PyFF]") > /proc/1/fd/1 2>&1 -0 2 * * * root (echo "[start ECCS]" && /bin/bash /home/eccs/cleanAndRunEccs.sh && echo "[end ECCS]") > /proc/1/fd/1 2>&1 +0 2 * * * root (echo "[start ECCS]" && /bin/bash /home/eccs/cleanAndRunEccs.sh && echo "[end ECCS]") 2>&1 | tee /proc/1/fd/1 > /home/eccs/debug/eccs_status 0 8 * * * root (echo "[start ECCS clean]" && /bin/bash /home/eccs/clean7daysOldFiles.sh && echo "[end ECCS clean]") > /proc/1/fd/1 2>&1 diff --git a/setup-eccs-dev.sh b/setup-eccs-dev.sh index 5b280686014c0e3213f1d6fb48b6607d9cf9ea10..6f484a1924de400a271c787dc6329f25cde13471 100755 --- a/setup-eccs-dev.sh +++ b/setup-eccs-dev.sh @@ -24,4 +24,4 @@ echo "docker exec -it -u eccs -w /home/eccs eccs ./cleanAndRunEccs.sh > /proc/1/ echo "" echo "Delete all results of today" echo "" -echo "docker exec -it -u eccs -w /home/eccs/ eccs rm -rf html/$(date +%Y-%m-%d) output/eccs_$(date +%Y-%m-%d).log logs/*_$(date +%Y-%m-%d).log" +echo "docker exec -it -u eccs -w /home/eccs/ eccs rm -rf html/$(date +%Y-%m-%d) output/eccs_$(date +%Y-%m-%d).log logs/*_$(date +%Y-%m-%d).log stats/*_$(date +%Y-%m-%d).log" diff --git a/web/index.php b/web/index.php index 171d661df022150ffc470cfd45d4711d8c313327..b4a4323773d169244fa83075efbbca46454c41e5 100644 --- a/web/index.php +++ b/web/index.php @@ -83,14 +83,14 @@ $data[ 'check_result' ] = htmlspecialchars($_GET[ "check_result" ] ?? null); <div class="clearfix"> <div class="boxStatus"> <strong>Show IdPs with status:</strong> - <label id="lbl-error" for="error">ERROR</label> <input id="error" type="checkbox" name="status" value="ERROR"/> - <label id="lbl-ok" for="ok">OK</label> + <label id="lbl-error" for="error">ERROR</label> <input id="ok" type="checkbox" name="status" value="OK"/> - <label id="lbl-unknown" for="unknown">UNKNOWN</label> + <label id="lbl-ok" for="ok">OK</label> <input id="unknown" type="checkbox" name="status" value="UNKNOWN"/> - <label id="lbl-disabled" for="disabled">DISABLED</label> + <label id="lbl-unknown" for="unknown">UNKNOWN</label> <input id="disabled" type="checkbox" name="status" value="DISABLE"/> + <label id="lbl-disabled" for="disabled">DISABLED</label> </div> <!-- END boxStatus --> <div class="boxCalendar"> <div id="calendarGo">