Commit graph

65 commits

Author SHA1 Message Date
Kevin Fenzi
6c38d7b61a various: fix some more shell variables that were accidentally converted to builtin.shell
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-01-15 17:26:50 -08:00
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +10:00
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Kevin Fenzi
a30087e431 data-analysis: fix syntax harder
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-24 11:08:36 -07:00
Kevin Fenzi
d8eed2a4b8 data-analysis: quote variable
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-24 11:07:16 -07:00
Kevin Fenzi
108f7ad464 data-analysis: indention fix for state
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-24 11:05:18 -07:00
Stephen Smoogen
bad5871b19 Remove tabs and trailing whitespace.
Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-06-24 17:37:14 +00:00
Stephen Smoogen
705687562c Fix spelling erorr in playbook
For some reason I decided to smell absent as abscent. I need to take remedial English again.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-06-24 17:37:14 +00:00
Stephen Smoogen
8d17ae6c6b make sure that graphs actually generate, remove old files
Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-06-24 17:37:14 +00:00
Kevin Fenzi
ff6dbdbd6d data-analysis: looks like we are using the python3.11 version of this package now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-01-09 11:37:25 -08:00
Pedro Moura
ec843a62c1 Reformatted main.yml
Signed-off-by: Pedro Moura <pmoura@redhat.com>
2023-07-17 23:36:22 +00:00
Pedro Moura
1b05dd52ba Add script to compress log files every month to reduce storage
Signed-off-by: Pedro Moura <pmoura@redhat.com>
2023-07-17 23:36:22 +00:00
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