Commit graph

36 commits

Author SHA1 Message Date
Kevin Fenzi
1cd00567f2 web-data-analysis: pip is pip3
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-10-28 08:33:02 -07:00
Kevin Fenzi
1736849caa web-data-analysis: add countme group before trying to add it to countme user
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-10-28 08:25:53 -07:00
Will Woods
f46768ec6b countme: add .gitconfig
This gives the web-data-analysis `countme` user a .gitconfig file so the
commits it makes in its local git repo have a proper user name and
email address. (Also it makes git stop complaining..)

The email address might not actually be valid, but this repo doesn't
currently go anywhere public so it shouldn't really matter.
2020-10-13 16:17:00 +00:00
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
Stephen Smoogen
5f7864f24f put in web-data-analysis changes to get proxies to work 2020-07-31 11:08:44 -04:00
Stephen Smoogen
b37734873b remove awstats and other cron jobs we arent using 2020-07-10 17:10:11 -04:00
Kevin Fenzi
b012b97f8a log01 / web-data-analysis: it is python3-pandas in rhel8
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-17 19:14:36 -07:00
Stephen Smoogen
6f69b370f4 [grobisplitter] first attempt at adding configs for system 2019-06-01 17:32:24 +00:00
Patrick Uiterwijk
adcbf72f03 Packageize this, packageize that, packageize the world
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 22:25:52 +00:00
Stephen Smoogen
a513fc88e5 we have new html for the data site 2017-04-20 17:36:55 +00:00
Stephen Smoogen
44511a18dc remove mysql items as I want piwik on a different box 2017-04-19 20:20:53 +00:00
Stephen Smoogen
b67e3ea7bc this is why this never worked 2017-04-19 20:14:52 +00:00
Stephen Smoogen
0f6fcd4599 put in a picture of a whale and a flowerpot. 2017-02-15 23:14:59 +00:00
Stephen Smoogen
14a85f11f5 ok lets get this working 2017-02-15 19:51:59 +00:00
Stephen Smoogen
4b0c8808c9 add in our cron and ansible rules 2017-02-15 19:30:16 +00:00
Stephen Smoogen
c741920adf and we have a nice little fix for images 2016-11-28 20:04:11 +00:00
Stephen Smoogen
ece83b5c0c and put in a summary file for mattdm 2016-11-28 18:09:03 +00:00
Kevin Fenzi
04a52b8667 Death to all trailing whitespace. 2016-08-08 19:36:31 +00:00
Stephen Smoogen
ac6741f873 and we have some items for awstats 2016-05-30 00:39:16 +00:00
Stephen Smoogen
03dcf5b451 and we need to add this 2016-05-07 15:36:42 +00:00
Stephen Smoogen
10d97a0e92 hey do you know variables are useful. mmmmkay 2016-05-07 14:10:39 +00:00
Stephen Smoogen
63b7cbe08a and on the 5th day he ran out of tylenol and motrin. 2016-05-06 18:25:22 +00:00
Stephen Smoogen
79656cc660 and we need to change the name elsewhere. 2016-05-06 13:12:04 +00:00
Stephen Smoogen
4074e1f09d and we need to have the files so it works 2016-05-05 20:00:48 +00:00
Stephen Smoogen
e3022ea7e5 and we need to have a } for every { 2016-05-05 19:58:33 +00:00
Stephen Smoogen
bcb3611abb and we have the initial items for a getfedora daily stats 2016-05-05 19:56:03 +00:00
Stephen Smoogen
e8f870e1db well that explains why epylog was installed on the box 2016-05-05 12:31:41 +00:00
Stephen Smoogen
5be680f570 and we need an = sign 2016-05-04 22:14:56 +00:00
Stephen Smoogen
a7c12d920a and we dont create directoires by hand 2016-05-04 22:13:51 +00:00
Stephen Smoogen
63a1b4af95 and we dont create directoires by hand 2016-05-04 22:12:13 +00:00
Stephen Smoogen
155c342c04 item! item! 2016-05-04 19:58:59 +00:00
Stephen Smoogen
744634880e with_items silly 2016-05-04 19:57:48 +00:00
Stephen Smoogen
0707acc995 put the mirror data into a subdir 2016-05-04 19:53:18 +00:00
Stephen Smoogen
0b13e4b8c3 and it is a sh not a cron 2016-05-04 17:23:16 +00:00
Stephen Smoogen
011bd449ea mae sure the html direcotrty exists 2016-05-04 17:17:25 +00:00
Stephen Smoogen
e4c4695a70 and we need a task 2016-05-04 17:10:30 +00:00