Browse Source

Add stuff needed for those detailed graphs using apt-panopticon_cgp.

master
onefang 1 year ago
parent
commit
aa916bc92a
4 changed files with 51 additions and 1 deletions
  1. +31
    -0
      README.md
  2. +2
    -1
      apt-panopticon-report-email-web.lua
  3. +2
    -0
      apt-panopticron
  4. +16
    -0
      update_apt-panopticon

+ 31
- 0
README.md View File

@@ -43,6 +43,37 @@ installed -
* rrdtool, may need to include lua-rrd.
* xz, on Debian based systems it'll be in the xz-utils package.

If you want to have lots of graphs, also install
[https://sledjhamr.org/cgit/apt-panopticon_cgp/](https://sledjhamr.org/cgit/apt-panopticon_cgp/).

Web installation.
-----------------

This is a suggestion for installation on a Devuan based web server.

Create -

/var/www/html/apt-panopticon

Install apt-panopticon and apt-panopticon_cgp there, so you end up with -

/var/www/html/apt-panopticon/apt-panopticon
/var/www/html/apt-panopticon/apt-panopticon_cgp

The script update_apt-panopticon is an example script for updating
everything, including commented out commands to update the source code.
The file apt-panopticron is an example crontab file for updating
everything once every ten minutes. They assume your web server user is
www-data with a group of www-data, and you have a mirror user called
mirrors. For mirror operators, that mirrors user would be the owner of
the mirror files. You can change these to suite yourself.

Once everything is updated,
/var/www/html/apt-panopticon/results/Report-web.html

will point to the main web page, and there will be a link at the bottom of
that pointing to the detailed graphs.

Using it.
---------



+ 2
- 1
apt-panopticon-report-email-web.lua View File

@@ -429,8 +429,9 @@ if nil == web then C("opening mirrors file - " .. e) else
"pkgmaster.devuan.org is the master mirror, all the others sync to it.   " ..
"</p>\n"
)
web:write( "\n<br>\n<hr>\n\n" ..
web:write(APT.dumpTableHTML(m, "", ""))
web:write( "\n<br>\n<br>\n<h2>==== Graphs: ====</h2>\n" ..
"<img src='speed.png'>\n<br>\n<p><a href='../apt-panopticon_cgp/'>More graphs.</a></p><hr>\n\n" ..
"<p>The <a href='Report-email.txt'>email report</a>. &nbsp; " ..
"All <a href='../results'>the logs and other output</a>. &nbsp; " ..
"You can get the <a href='https://sledjhamr.org/cgit/apt-panopticon/about/'>source code here</a>.</p>" ..


+ 2
- 0
apt-panopticron View File

@@ -0,0 +1,2 @@
# Mirror tests every 10 minutes everyday
*/10 * * * * www-data /var/www/html/apt-panopticon/apt-panopticon/update_apt-panopticon

+ 16
- 0
update_apt-panopticon View File

@@ -0,0 +1,16 @@
#!/bin/bash

cd /var/www/html/apt-panopticon/apt-panopticon_cgp
#git pull > /dev/null
#chown -R mirrors:www-data *
cd /var/www/html/apt-panopticon/apt-panopticon
#git pull > /dev/null
#chown -R mirrors:www-data *

if [ ! -f apt-panopticon.lock ] ; then
rm ../results; ln -s apt-panopticon/results_old ../results
flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock
rm ../results; ln -s apt-panopticon/results ../results
fi

#chown -R mirrors:www-data /var/www/html/SledjHamr/apt-panopticon/results

Loading…
Cancel
Save