ansible/roles/web-data-analysis/files
Will Woods f8a5720535 add 'countme' stuff to web-data-analysis role
This should automate running the "countme" scripts every day to parse
new log data and publish updated totals.

Here's what I've added to the ansible role:

* install package deps for `mirrors-countme`
* make "countme" user with home /srv/countme
* clone 'prod' branch of https://pagure.io/mirrors-countme to /srv/countme
  * if changed: pip install /srv/countme/mirrors-countme
* make web subdir /var/www/html/csv-reports/countme
* make local data dir /var/lib/countme
* install `countme-update.sh` to /usr/local/bin
* install `countme-update.cron` to /etc/cron.d
  * runs /usr/local/bin/countme-update.sh daily, as user `countme`

That should make sure `countme-update.sh` runs every day.
That script works like this:

1. Run `countme-update-rawdb.sh`
  * parse new mirrors.fp.o logs in /var/log/hosts/proxy*
  * write data to /var/lib/countme/raw.db
2. Run `countme-update-totals.sh`
  * parse raw data from /var/lib/countme/raw.db
  * write updated totals to /var/lib/countme/totals.{db,csv}
3. Track changes in updated totals
  * set up /var/lib/countme as git repo (if needed)
  * commit new `totals.csv` (if changed)
4. Make updated totals public
  * Copy totals.{db,csv} to /var/www/html/csv-reports/countme

For safety's sake, I've tried to set up everything so it runs as the
`countme` user rather than running everything as `root`. This might be
an unnecessary complication but it seemed like the right thing to do.

Similarly, keeping totals.csv in a git repo isn't _required_, but it
seemed like a good idea to keep historical records in case we want/need
to change the counting algorithm or something.

I checked the YAML with ansible-lint and tested that all the scripts
work as expected when run as `wwoods`, so unless I've missed something
this should do the trick.
2020-10-13 16:17:00 +00:00
..
html remove moving average graphs as they dont work 2020-07-31 18:08:26 -04:00
condense-getfedoralogs.cron and we have the initial items for a getfedora daily stats 2016-05-05 19:56:03 +00:00
condense-getfedoralogs.sh and we put in a fixme for something later 2017-01-12 19:17:45 +00:00
condense-hotspot.cron add in our cron and ansible rules 2017-02-15 19:30:16 +00:00
condense-hotspot.sh remove moving average from hotspot as it will not work in EL8 2020-08-03 15:11:38 -04:00
condense-mirrorlogs.cron [data-analysis/mirror-stats] Fix it so cron jobs only emit errors 2019-03-07 11:19:19 +00:00
condense-mirrorlogs.sh turn off moving averages as I dont have time to rewrite the code with newer pandas syntax and python3 2020-07-02 14:24:10 -04:00
countme-update.cron add 'countme' stuff to web-data-analysis role 2020-10-13 16:17:00 +00:00
countme-update.sh add 'countme' stuff to web-data-analysis role 2020-10-13 16:17:00 +00:00
getfedora-data.awk forgot I had 2 print statements which needed to be aligned. Removed extraneous data in script. 2016-09-07 16:04:44 +00:00
getfedora-data.gp fix the data-analysis graphs to plot past 2019-12-31 to 2020-12-31 2020-07-31 13:17:35 -04:00
getfedora.awk and we have the initial items for a getfedora daily stats 2016-05-05 19:56:03 +00:00
getstuff-data.gp fix the data-analysis graphs to plot past 2019-12-31 to 2020-12-31 2020-07-31 13:17:35 -04:00
hotspot-data.awk sometimes logs give you 0 time 2017-02-15 20:57:17 +00:00
hotspot-moving_avg.py well lets try some dates 2017-02-15 20:46:59 +00:00
hotspot.awk we have a temporary fix for the hotspot data 2017-02-15 19:26:30 +00:00
hotspot.gp remove moving average from hotspot as it will not work in EL8 2020-08-03 15:11:38 -04:00
mirrorlist.py remember what the program did and rewrite statement 2018-03-21 22:03:52 +00:00
mirrors-data.awk fix matts problem 2020-04-24 21:34:09 +02:00
mirrors-data.gp again remove ending backslash from last line before unset 2020-08-03 07:25:15 -04:00
mirrors-moving.gp fix the data-analysis graphs to plot past 2019-12-31 to 2020-12-31 2020-07-31 13:17:35 -04:00
mirrors-moving_avg.py fix matts problem 2020-04-24 21:34:09 +02:00
run-daily-awstats.sh web-data-analysis: removing taskotron.fp.o 2020-06-17 17:19:16 +00:00