#!/bin/bash
cd /opt/atlassian/jira/atlassian-jira/report;
java -jar /opt/atlassian/accesslog/access-log-analyser-1.1.jar file=/opt/atlassian/jira/logs/access_log.*;
echo "
Incoming requests by categories
" > /opt/atlassian/jira/atlassian-jira/report/caca.txt;
cat /opt/atlassian/jira/atlassian-jira/report/request-log-summary.wiki >> /opt/atlassian/jira/atlassian-jira/report/caca.txt;
echo "
TOP 20 Unknown requests.
" >> /opt/atlassian/jira/atlassian-jira/report/caca.txt;
cat /opt/atlassian/jira/atlassian-jira/report/unknown-requests.txt >> /opt/atlassian/jira/atlassian-jira/report/caca.txt;
echo "
" >> /opt/atlassian/jira/atlassian-jira/report/caca.txt;
sed '/<\/div>/r /opt/atlassian/jira/atlassian-jira/report/caca.txt' /opt/atlassian/jira/atlassian-jira/report/requests-over-time.html > /opt/atlassian/jira/atlassian-jira/report/index.html;
rm -rf /opt/atlassian/jira/atlassian-jira/report/reque* /opt/atlassian/jira/atlassian-jira/report/*.txt;
chmod u+x /opt/atlassian/accesslog/jiraloganalyzer.sh
**Creamos una tarea en el cron** (Cada hora de lunes a viernes).