Commit graph

48 commits

Author SHA1 Message Date
Stephen Smoogen
0a7ac90878 remove hotspot analysis from web-data-analysis. It has been broken for over six months with no requests to fix 2022-01-11 05:42:47 -05:00
Stephen Smoogen
bfb1320bc9 Add a countme for CentOS Stream 9 2022-01-05 13:48:34 -05:00
Stephen Smoogen
b0f46d9ce7 remove getfedora statistics. not run in over year.
Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2022-01-05 13:48:34 -05:00
Nils Philippsen
a0d70d7e4f Move executable scripts into /etc/cron.daily
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-09-23 10:41:57 +02:00
Nils Philippsen
27b41a491e Deploy mirrors-countme (only) as RPM package
This also ensures that the previously cloned git repository and local
installation of the Python package and associated scripts are removed.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-09-15 14:41:41 +00:00
Nils Philippsen
0b518a7e88 Fix typo
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-09-09 10:38:38 +00:00
Nils Philippsen
ecd8ab8383 Merge syncing and combining logs into one cronjob
This should prevent race conditions of the form that logs are attempted
to be combined while syncing those of individual hosts hasn't finished.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-09-09 10:38:38 +00:00
Nils Philippsen
a766ec6416 Merge awstats role into web-data-analysis
This is to enable running the syncing and combining scripts in
series rather than from independently scheduled cron jobs.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-09-09 10:38:38 +00:00
Nils Philippsen
5e09dce82d Import fedora-messaging-utils role
Importing the role rather than listing it in the playbook lets its tasks
have the tags used in the importing role, i.e. should ensure they are
run when the things that need simple_message_to_bus are installed.

Additionally, don't attempt to install it manually from
web-data-analysis (it isn't found because it lives in a different role).

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-08-16 06:02:37 +00:00
Adam Saleh
db936062b3 Add more message-based tracing to log01 scripts 2021-08-11 11:18:17 +00:00
Nils Philippsen
f703e7a771 Add and use optimized http log syncing script
The previous one synced all hosts serially and ran rsync for each log
file. This reimplements the shell script in Python, with these changes:

- Run rsync on whole directories of log files, with much reduced
  overhead.
- Use a pool of five workers which process hosts in parallel.

Additionally, remove download-rdu01.vpn.fedoraproject.org from the list
of synced hosts.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-08-05 16:44:47 +00:00
Nils Philippsen
c782eceae1 Move syncHttpLogs.sh into web-data-analysis role
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-07-23 13:06:23 +02:00
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