Skip to content
Snippets Groups Projects
Commit ded0619e authored by Marco Malavolti's avatar Marco Malavolti
Browse files

Added eccs_status file and fixed LogRotate for stats.

parent 2453e839
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
/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
......
......@@ -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)
......
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
......@@ -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"
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment