Replace RRD with something JS based
jfesler opened this issue · comments
The RRD libraries can be finicky; and I'm finding some behavior differences between versions. With a broad number of mirror sites, this is a problem.
The nightly script can be amended to emit javascript, placed in the "site" directory. This javascript can contain the raw data it takes to generate charts. This is pretty straight forward - except for the part where I need at least 20 mirrors to update to the latest script.
This should be broken down into a few tasks.
- Replacement script that updates the database, emits .js with table data
- This will likely be a new script; and an ask that people also update their crontab
- Settle on a chart library (chart.js, google charts, etc) - input welcome
- Integration into build system, only emit javascript calls on the "stats" page
- Notification to the official mirror operators, who have stats enabled
Identifying operators to notify has been scripted:
jfesler@bender:~/falling-sky/source/sites/ % ./mirrors-with-stats-enabled.pl
dygraphs appears to work well.
https://github.com/falling-sky/source/wiki/InstallCharts
Top section.
Also quoted here:
Updating from a previous version?
Many of you are looking at this in response to a recent email (June 9, 2016).
rsync -a fsky@rsync.test-ipv6.com:stable/extras/. falling-sky-extras
- Update your crontab
- Remove
falling-sky-chart.pl
- Replace with
falling-sky-dyngraphs-csv.pl
- Optionally, add either
--days 750
or--since 2010/05/10
- Remove
Mine looks like this:
% crontab -l
# m h dom mon dow command
MAILTO=jfesler@gigo.com
*/15 * * * * rsync -avq "fsky@rsync.test-ipv6.com:stable/content/." /var/www/. --delete --exclude site
0 * * * * /home/jfesler/falling-sky-extras/falling-sky-dyngraphs-csv.pl --config /var/www/site/config.js --since 2010/05/01
Notifications have been sent, for all official mirrors that appear (via config.js) to display stats.