Commit Graph

19 Commits

Author SHA1 Message Date
Adrian Schmutzler 386ffce1c5 calcglobalstats: Add missing MySQL commit
The commit was missing after the MySQL queries, leaving e.g. updated
V2 Hoods unchanged in the database.

Add commit for individual function and for the script to be sure
nothing else is overlooked.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-13 14:23:34 +01:00
Adrian Schmutzler 5e1d037b12 scripts/defragtables: remove stats tables
We don't use MySQL tables for stats anymore, so no need to keep
them here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-24 16:45:42 +01:00
Adrian Schmutzler 6eda60f537 global: convert to InfluxDB
This converts the entire setup to use InfluxDB 1.x for stats tables
instead of MySQL.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-24 11:05:14 +01:00
Adrian Schmutzler e65ae22d0b scripts/calcglobalstats: Fix import of deleted function
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-12-01 12:19:16 +01:00
Adrian Schmutzler dc7ee80770 Remove hoodsv1 table and corresponding interface with KeyXchangeV1
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-30 18:58:44 +01:00
Adrian Schmutzler cadabe2774 Polyhoods: Introduce database support and read functions
Polyhoods need to be read manually. Running
scripts/readpolyhoods.py will erase both tables and reread data.

At the moment, the URL points to a test setup.

This requires changes to the MySQL database!

This is meant for later use and does NOT add any data to the
Monitoring at the moment.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-24 15:34:43 +01:00
Adrian Schmutzler 2fac3f0550 Global: Read V1 hoods from KeyXchange
This obsoletes the hood initialization file.

Hood are capitalized and "V1" is added at the end.

This may require a rename of the existing hood stats.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-28 00:33:12 +02:00
Adrian Schmutzler 0239138542 Global: Add V2 hoods to table
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-28 00:33:00 +02:00
Adrian Schmutzler 27c1c1a36a scripts: Redirect cron output to log only
This prevents information sent via e-mail.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:14:20 +02:00
Adrian Schmutzler e139bb0b54 scripts: Add scripts to defragment MySQL tables
scripts/defragtables.py:
- If run without argument, all tables EXCEPT stats are defragmented
  (quick run)
- If run with argument e.g. "1", all table INCLUDING stats are
  defragmented (will take about one hour)

scripts/defragtable.py <space-separated list of tables>:
- Defragments the specified tables; will crash if table does not
  exist

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-12 22:13:06 +02:00
Adrian Schmutzler ed22c43d79 scripts: Add deleteunlinked.py
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-13 00:00:27 +01:00
Adrian Schmutzler 5392b47667 Add Gateway-specific statistics
This add Gateway stats which work similar to the detailed hood
statistics.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-01-10 23:46:35 +01:00
Adrian Schmutzler b4e5f7594a scripts: Add crontiles.sh
Provide regular restart of uwsgi-tiles as a workaround for
missing dots.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-08 13:35:03 +01:00
Adrian Schmutzler faec559e1b calcglobalstats/deletestats: Limit decimal places for durations
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-08 13:20:47 +01:00
Adrian Schmutzler 75ce39db17 routertools/deletestats.py: More commits and more output
This patch enables committing after each statement of the old
data deletion. Maybe this helps to prevent a big single locking
period.

In addition, the duration is shown for individual steps.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-04 16:13:18 +01:00
Adrian Schmutzler 1dcbd844f6 scripts/users2csv: Support multi-byte characters (UTF-8)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-19 15:58:15 +01:00
Adrian Schmutzler 279b7c82c8 scripts: Run statistics cron jobs every 5+3 minutes
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-18 00:46:30 +01:00
Adrian Schmutzler 3f056aeff8 scripts: Transfer users between mongodb and MySQL
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 23:35:56 +01:00
Adrian Schmutzler 892e758e5b Rearrange scripts into folder and provide cron for stats
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-11-16 13:53:28 +01:00