From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] Revived (as addon): squid graphs 3.2 (V2) - based on the original sources, adapted and patched for IPFire Date: Sat, 09 Dec 2017 21:57:28 +0100 Message-ID: <20171209205728.1570-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6629482998627757270==" List-Id: --===============6629482998627757270== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, This is 'squid-graph 3.2' - for details see: https://sourceforge.net/projects/squid-graph/ "Squid Graph is a free, simple, yet powerful Squid v2 native logfile analysis= tool that generates reports with graphical representation of the proxy server's tr= affic, somewhat like the popular MRTG tool." I found by chance that the corresponding translation strings were still prese= nt, but not used, so I thought "Why not?". After some tests I decided to revive this tool - here it is as an IPFire addo= n, based=20 on the original sources. About four weeks ago, I sent an email to the original developer via Sourcefor= ge, asking if he would mind if I would patch his sources for use with IPFire, but still = got no answer, so I decided to publish this IPFire'd version. I'm using the original tarball - if anything is updated, patching is easy. Main differences to the original version: GUI and scripts were slightly tuned, fully localised and polished for better readability. The old translation strings were removed, all needed loca= lisations went in '/var/ipfire/addon-lang/'. For better GUI integration I moved the menu-entry 'entropy' one step down, so= that the '*-graphs' entries were lying together. I found no problems so far during= testing. Updates are made every five minutes through '/etc/fcron.cyclic'. Feedback is welcome... Best, Matthias Signed-off-by: Matthias Fischer --- config/menu/20-status.menu | 2 +- config/rootfiles/packages/squid-graph | 17 ++ langs/de/cgi-bin/de.pl | 3 - langs/en/cgi-bin/en.pl | 3 - langs/es/cgi-bin/es.pl | 3 - langs/fr/cgi-bin/fr.pl | 3 - langs/it/cgi-bin/it.pl | 3 - langs/nl/cgi-bin/nl.pl | 3 - langs/pl/cgi-bin/pl.pl | 3 - langs/ru/cgi-bin/ru.pl | 3 - langs/tr/cgi-bin/tr.pl | 3 - lfs/squid-graph | 112 ++++++++++ make.sh | 1 + src/paks/squid-graph/install.sh | 31 +++ src/paks/squid-graph/uninstall.sh | 28 +++ src/paks/squid-graph/update.sh | 26 +++ .../squid-graph/squid-graph-for-ipfire.patch | 238 +++++++++++++++++++= ++ src/squid-graph/EX-squid-graph.menu | 6 + src/squid-graph/logo.png | Bin 0 -> 3933 bytes src/squid-graph/sgraph.cgi | 72 +++++++ src/squid-graph/squid-graph.de.pl | 49 +++++ src/squid-graph/squid-graph.en.pl | 49 +++++ src/squid-graph/squid-graph.es.pl | 10 + src/squid-graph/squid-graph.fr.pl | 9 + src/squid-graph/squid-graph.it.pl | 9 + src/squid-graph/squid-graph.nl.pl | 9 + src/squid-graph/squid-graph.pl.pl | 9 + src/squid-graph/squid-graph.ru.pl | 9 + src/squid-graph/squid-graph.tr.pl | 9 + src/squid-graph/update-squid-graph.sh | 8 + 30 files changed, 702 insertions(+), 28 deletions(-) create mode 100644 config/rootfiles/packages/squid-graph create mode 100644 lfs/squid-graph create mode 100644 src/paks/squid-graph/install.sh create mode 100644 src/paks/squid-graph/uninstall.sh create mode 100644 src/paks/squid-graph/update.sh create mode 100644 src/patches/squid-graph/squid-graph-for-ipfire.patch create mode 100644 src/squid-graph/EX-squid-graph.menu create mode 100644 src/squid-graph/logo.png create mode 100644 src/squid-graph/sgraph.cgi create mode 100644 src/squid-graph/squid-graph.de.pl create mode 100644 src/squid-graph/squid-graph.en.pl create mode 100644 src/squid-graph/squid-graph.es.pl create mode 100644 src/squid-graph/squid-graph.fr.pl create mode 100644 src/squid-graph/squid-graph.it.pl create mode 100644 src/squid-graph/squid-graph.nl.pl create mode 100644 src/squid-graph/squid-graph.pl.pl create mode 100644 src/squid-graph/squid-graph.ru.pl create mode 100644 src/squid-graph/squid-graph.tr.pl create mode 100644 src/squid-graph/update-squid-graph.sh diff --git a/config/menu/20-status.menu b/config/menu/20-status.menu index 2bcf0d5e8..2e7c579e3 100644 --- a/config/menu/20-status.menu +++ b/config/menu/20-status.menu @@ -58,7 +58,7 @@ 'title' =3D> "$Lang::tr{'hardware graphs'}", 'enabled' =3D> 1, }; - $substatus->{'61.entropy'} =3D { + $substatus->{'62.entropy'} =3D { 'caption' =3D> "$Lang::tr{'entropy'}", 'uri' =3D> '/cgi-bin/entropy.cgi', 'title' =3D> "$Lang::tr{'entropy graphs'}", diff --git a/config/rootfiles/packages/squid-graph b/config/rootfiles/package= s/squid-graph new file mode 100644 index 000000000..2319c4f34 --- /dev/null +++ b/config/rootfiles/packages/squid-graph @@ -0,0 +1,17 @@ +etc/fcron.cyclic/update-squid-graph +srv/web/ipfire/cgi-bin/sgraph.cgi +srv/web/ipfire/html/sgraph +srv/web/ipfire/html/sgraph/logo.png +usr/bin/squid-graph +usr/local/bin/update-squid-graph.sh +var/ipfire/addon-lang/squid-graph.de.pl +var/ipfire/addon-lang/squid-graph.en.pl +var/ipfire/addon-lang/squid-graph.es.pl +var/ipfire/addon-lang/squid-graph.fr.pl +var/ipfire/addon-lang/squid-graph.it.pl +var/ipfire/addon-lang/squid-graph.nl.pl +var/ipfire/addon-lang/squid-graph.pl.pl +var/ipfire/addon-lang/squid-graph.ru.pl +var/ipfire/addon-lang/squid-graph.tr.pl +var/ipfire/menu.d/20-status.menu +var/ipfire/menu.d/EX-squid-graph.menu diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 6dff5d781..12da3e2ab 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1692,7 +1692,6 @@ 'no filter pass' =3D> 'Legen Sie hier die Standardklassen fest durch die nic= ht-gefilterte Pakete gehen.', 'no fritzdsl driver' =3D> 'Kein Fritz!DSL-Treiber vorhanden. Bitte hochladen= .', 'no hardware random number generator' =3D> 'Dieses System hat keine Entropie= quelle.', -'no information available' =3D> 'Keine Informationen verf=C3=BCgbar.', 'no log selected' =3D> 'kein Protokoll ausgew=C3=A4hlt', 'no modem selected' =3D> 'Kein Modem ausgew=C3=A4hlt', 'no set selected' =3D> 'Es wurde kein Satz ausgew=C3=A4hlt', @@ -1934,7 +1933,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protokoll:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Diagramme zur Proxyauslastung', 'proxy admin password' =3D> 'Cache Administrator Passwort', 'proxy cachemgr' =3D> 'Cachemanager aktivieren', 'proxy errmsg filedescriptors' =3D> 'Ung=C3=BCltiger Anzahl Filedescriptoren= ', @@ -2157,7 +2155,6 @@ 'ssnetwork status' =3D> 'Netzwerk-Status', 'sspasswords' =3D> 'Passw=C3=B6rter', 'ssport forwarding' =3D> 'Port-Weiterleitung', -'ssproxy graphs' =3D> 'Proxy-Diagramme', 'sssystem status' =3D> 'System-Status', 'sstraffic' =3D> 'Net-Traffic', 'sstraffic graphs' =3D> 'Netzwerk-Diagramme', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 4efff6e65..98694a7ab 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1724,7 +1724,6 @@ 'no filter pass' =3D> 'Enter the standard class for non-filtered packets.', 'no fritzdsl driver' =3D> 'No Fritz!DSL driver. Please upload.', 'no hardware random number generator' =3D> 'This system has no source for en= tropy.', -'no information available' =3D> 'No information available.', 'no log selected' =3D> 'No log selected', 'no modem selected' =3D> 'No modem selected', 'no set selected' =3D> 'No set was selected', @@ -1970,7 +1969,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protocol:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Proxy access graphs', 'proxy admin password' =3D> 'Cache administrator password', 'proxy cachemgr' =3D> 'Activate cachemanager', 'proxy errmsg filedescriptors' =3D> 'Wrong amount of filedescriptors', @@ -2199,7 +2197,6 @@ 'ssnetwork status' =3D> 'Network Status', 'sspasswords' =3D> 'Passwords', 'ssport forwarding' =3D> 'Port Forwarding', -'ssproxy graphs' =3D> 'Proxy Graphs', 'sssystem status' =3D> 'System Status', 'sstraffic' =3D> 'Net-Traffic', 'sstraffic graphs' =3D> 'Traffic Graphs', diff --git a/langs/es/cgi-bin/es.pl b/langs/es/cgi-bin/es.pl index ede7b661d..b1fb65e9c 100644 --- a/langs/es/cgi-bin/es.pl +++ b/langs/es/cgi-bin/es.pl @@ -1256,7 +1256,6 @@ 'no eciadsl synch.bin file' =3D> 'No existe archi ECI ADSL synch.bin. Favor = de cargarlo', 'no filter pass' =3D> 'Introduzca la clase est=C3=A1ndar para paquetes no fi= ltrados.', 'no fritzdsl driver' =3D> 'No hay drivers Fritz!DSL. Favor de cargarlos', -'no information available' =3D> 'No hay informaci=C3=B3n disponible', 'no log selected' =3D> 'No ha seleccionado registro log', 'no modem selected' =3D> 'No ha seleccionado m=C3=B3dem', 'no set selected' =3D> 'Ning=C3=BAn conjunto se ha seleccionado', @@ -1437,7 +1436,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protocolo:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Gr=C3=A1ficas de acceso al proxy', 'proxy admin password' =3D> 'Password Administrador de Cach=C3=A9', 'proxy cachemgr' =3D> 'Activar Cachemanager', 'proxy errmsg filedescriptors' =3D> 'Cantidad incorrecta de descriptores de = archivos', @@ -1647,7 +1645,6 @@ 'ssnetwork status' =3D> 'Estado de la red', 'sspasswords' =3D> 'Contrase=C3=B1as', 'ssport forwarding' =3D> 'Reenv=C3=ADo de puertos', -'ssproxy graphs' =3D> 'Gr=C3=A1ficas de proxy', 'sssystem status' =3D> 'Status del sistema', 'sstraffic' =3D> 'Net-traffic', 'sstraffic graphs' =3D> 'Gr=C3=A1ficas de tr=C3=A1fico', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index e896c9b2a..8041db982 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -1247,7 +1247,6 @@ 'no eciadsl synch.bin file' =3D> 'aucunfichier ECI ADSL synch.bin. Veuillez = le charger.', 'no filter pass' =3D> 'Entrez la classe standard pour les paquets non filtr= =C3=A9s.', 'no fritzdsl driver' =3D> 'Aucun pilote Fritz!DSL. Veuillez le charger.', -'no information available' =3D> 'Aucune information disponible.', 'no log selected' =3D> 'Aucun rapport s=C3=A9lectionn=C3=A9', 'no modem selected' =3D> 'Aucun modem s=C3=A9lectionn=C3=A9', 'no set selected' =3D> 'Aucun jeu s=C3=A9lectionn=C3=A9', @@ -1443,7 +1442,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protocole', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Graphiques des acc=C3=A8s proxy', 'proxy admin password' =3D> 'Mot de passe admnistrateur du Cache', 'proxy cachemgr' =3D> 'Activer le gestionnaire de cache', 'proxy errmsg filedescriptors' =3D> 'Mauvais montant de fichier descripteurs= ', @@ -1652,7 +1650,6 @@ 'ssnetwork status' =3D> 'Statut r=C3=A9seau', 'sspasswords' =3D> 'Mots de passe', 'ssport forwarding' =3D> 'Transfert de port', -'ssproxy graphs' =3D> 'Graphiques du proxy', 'sssystem status' =3D> 'Statut syst=C3=A8me', 'sstraffic' =3D> 'Trafic r=C3=A9seau', 'sstraffic graphs' =3D> 'Graphiques du trafic', diff --git a/langs/it/cgi-bin/it.pl b/langs/it/cgi-bin/it.pl index 02e047bb3..fc80a526d 100644 --- a/langs/it/cgi-bin/it.pl +++ b/langs/it/cgi-bin/it.pl @@ -1592,7 +1592,6 @@ 'no filter pass' =3D> 'Enter the standard class for non-filtered packets.', 'no fritzdsl driver' =3D> 'No Fritz!DSL driver. Please upload.', 'no hardware random number generator' =3D> 'This system has no source for en= tropy.', -'no information available' =3D> 'No information available.', 'no log selected' =3D> 'No log selected', 'no modem selected' =3D> 'No modem selected', 'no set selected' =3D> 'No set was selected', @@ -1827,7 +1826,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protocolo', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Proxy access graphs', 'proxy admin password' =3D> 'Cache administrator password', 'proxy cachemgr' =3D> 'Attiva cachemanager', 'proxy errmsg filedescriptors' =3D> 'Wrong amount of filedescriptors', @@ -2052,7 +2050,6 @@ 'ssnetwork status' =3D> 'Network Status', 'sspasswords' =3D> 'Passwords', 'ssport forwarding' =3D> 'Port Forwarding', -'ssproxy graphs' =3D> 'Proxy Graphs', 'sssystem status' =3D> 'Stato del sistema', 'sstraffic' =3D> 'Traffico di rete', 'sstraffic graphs' =3D> 'Traffic Graphs', diff --git a/langs/nl/cgi-bin/nl.pl b/langs/nl/cgi-bin/nl.pl index 49c0cced6..97553962c 100644 --- a/langs/nl/cgi-bin/nl.pl +++ b/langs/nl/cgi-bin/nl.pl @@ -1555,7 +1555,6 @@ 'no filter pass' =3D> 'Geef de standaard-klasse voor niet-gefilterde pakkett= en.', 'no fritzdsl driver' =3D> 'Geen Fritz!DSL driver. Bestand uploaden a.u.b.', 'no hardware random number generator' =3D> 'Dit systeem heeft geen mogelijkh= eden voor entropie.', -'no information available' =3D> 'Geen informatie beschikbaar.', 'no log selected' =3D> 'Geen log geselecteerd', 'no modem selected' =3D> 'Geen modem geselecteerd', 'no set selected' =3D> 'Geen set geselecteerd', @@ -1780,7 +1779,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protocol:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Proxy toegangsgrafieken', 'proxy admin password' =3D> 'Cache beheerder wachtwoord', 'proxy cachemgr' =3D> 'Activeer cachebeheer', 'proxy errmsg filedescriptors' =3D> 'Verkeerd aantal bestandsindicators', @@ -2000,7 +1998,6 @@ 'ssnetwork status' =3D> 'Netwerkstatus', 'sspasswords' =3D> 'Wachtwoorden', 'ssport forwarding' =3D> 'Poort doorsturen', -'ssproxy graphs' =3D> 'Proxy grafieken', 'sssystem status' =3D> 'Systeemstatus', 'sstraffic' =3D> 'Netwerkgebruik', 'sstraffic graphs' =3D> 'Verkeersgrafieken', diff --git a/langs/pl/cgi-bin/pl.pl b/langs/pl/cgi-bin/pl.pl index e2f9da5c0..4788a8599 100644 --- a/langs/pl/cgi-bin/pl.pl +++ b/langs/pl/cgi-bin/pl.pl @@ -1255,7 +1255,6 @@ 'no eciadsl synch.bin file' =3D> 'Brak pliku ECI ADSL synch.bin. Prosz=C4=99= o jego wgranie.', 'no filter pass' =3D> 'Prosz=C4=99 wprowadzi=C4=87 standardow=C4=85 klas=C4= =99 dla pakiet=C3=B3w niefiltrowanych.', 'no fritzdsl driver' =3D> 'Brak sterownika Fritz!DSL. Prosz=C4=99 o jego wg= ranie.', -'no information available' =3D> 'Brak dost=C4=99pnych informacji.', 'no log selected' =3D> 'Nie wybrano logu', 'no modem selected' =3D> 'Nie wybrano modemu', 'no set selected' =3D> 'Nie wybrano ustawienia', @@ -1449,7 +1448,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> 'Protok=C3=B3=C5=82:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Wykresy dost=C4=99pu do Proxy', 'proxy admin password' =3D> 'Has=C5=82o administratora Cache', 'proxy cachemgr' =3D> 'Aktywuj cachemanager', 'proxy errmsg filedescriptors' =3D> 'Niepoprawna warto=C5=9B=C4=87 w polu fi= ledescriptors', @@ -1659,7 +1657,6 @@ 'ssnetwork status' =3D> 'Stan sieci', 'sspasswords' =3D> 'Has=C5=82a', 'ssport forwarding' =3D> 'Przekierowanie port=C3=B3w', -'ssproxy graphs' =3D> 'Wykresy Proxy', 'sssystem status' =3D> 'Stan systemu', 'sstraffic' =3D> 'Net-Traffic', 'sstraffic graphs' =3D> 'Wykresy ruchu', diff --git a/langs/ru/cgi-bin/ru.pl b/langs/ru/cgi-bin/ru.pl index 4b0edb582..eefa3bc49 100644 --- a/langs/ru/cgi-bin/ru.pl +++ b/langs/ru/cgi-bin/ru.pl @@ -1247,7 +1247,6 @@ 'no eciadsl synch.bin file' =3D> 'No ECI ADSL synch.bin file. Please upload.= ', 'no filter pass' =3D> '=D0=97=D0=B0=D0=B4=D0=B0=D0=B9=D1=82=D0=B5 =D1=81=D1= =82=D0=B0=D0=BD=D0=B4=D0=B0=D1=80=D1=82=D0=BD=D1=8B=D0=B9 =D0=BA=D0=BB=D0=B0= =D1=81=D1=81 =D0=B4=D0=BB=D1=8F =D0=BD=D0=B5=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1= =80=D1=83=D0=B5=D0=BC=D1=8B=D1=85 =D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=BE=D0=B2.= ', 'no fritzdsl driver' =3D> 'No Fritz!DSL driver. Please upload.', -'no information available' =3D> 'No information available.', 'no log selected' =3D> 'No log selected', 'no modem selected' =3D> 'No modem selected', 'no set selected' =3D> 'No set was selected', @@ -1444,7 +1443,6 @@ 'proto' =3D> 'Proto', 'protocol' =3D> '=D0=9F=D1=80=D0=BE=D1=82=D0=BE=D0=BA=D0=BE=D0=BB:', 'proxy' =3D> 'Proxy', -'proxy access graphs' =3D> 'Proxy access graphs', 'proxy admin password' =3D> 'Cache administrator password', 'proxy cachemgr' =3D> '=D0=92=D0=BA=D0=BB=D1=8E=D1=87=D0=B8=D1=82=D1=8C =D0= =BC=D0=B5=D0=BD=D0=B5=D0=B4=D0=B6=D0=B5=D1=80 =D0=BA=D1=8D=D1=88=D0=B0', 'proxy errmsg filedescriptors' =3D> 'Wrong amount of filedescriptors', @@ -1654,7 +1652,6 @@ 'ssnetwork status' =3D> '=D0=A1=D1=82=D0=B0=D1=82=D1=83=D1=81 =D1=81=D0=B5= =D1=82=D0=B8', 'sspasswords' =3D> '=D0=9F=D0=B0=D1=80=D0=BE=D0=BB=D0=B8', 'ssport forwarding' =3D> '=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B0=D0=BF=D1=80= =D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5 =D0=BF=D0=BE=D1=80=D1=82=D0=BE=D0= =B2', -'ssproxy graphs' =3D> 'Proxy Graphs', 'sssystem status' =3D> '=D0=A1=D1=82=D0=B0=D1=82=D1=83=D1=81 =D1=81=D0=B8=D1= =81=D1=82=D0=B5=D0=BC=D1=8B', 'sstraffic' =3D> '=D0=A1=D0=B5=D1=82=D0=B5=D0=B2=D0=BE=D0=B9 =D1=82=D1=80=D0= =B0=D1=84=D0=B8=D0=BA', 'sstraffic graphs' =3D> 'Traffic Graphs', diff --git a/langs/tr/cgi-bin/tr.pl b/langs/tr/cgi-bin/tr.pl index 9eb300006..42e615799 100644 --- a/langs/tr/cgi-bin/tr.pl +++ b/langs/tr/cgi-bin/tr.pl @@ -1660,7 +1660,6 @@ 'no filter pass' =3D> 'Olmayan filtre paketleri i=C3=A7in standart s=C4=B1n= =C4=B1f=C4=B1 girin.', 'no fritzdsl driver' =3D> 'Fritz!DSL s=C3=BCr=C3=BCc=C3=BCs=C3=BC yok. L=C3= =BCtfen y=C3=BCkleyin.', 'no hardware random number generator' =3D> 'Bu sistemin entropi i=C3=A7in ka= yna=C4=9F=C4=B1 yok.', -'no information available' =3D> 'Herhangi bir bilgi bulunmamaktad=C4=B1r.', 'no log selected' =3D> 'G=C3=BCnl=C3=BCk se=C3=A7ilmedi', 'no modem selected' =3D> 'Modem se=C3=A7ilmedi', 'no set selected' =3D> 'Hi=C3=A7bir ayar se=C3=A7ilmedi', @@ -1902,7 +1901,6 @@ 'proto' =3D> 'Kural', 'protocol' =3D> 'Kural ', 'proxy' =3D> 'Vekil sunucu', -'proxy access graphs' =3D> 'Vekil sunucu eri=C5=9Fim grafi=C4=9Fi', 'proxy admin password' =3D> '=C3=96nbellek y=C3=B6netici parolas=C4=B1', 'proxy cachemgr' =3D> '=C3=96nbellek y=C3=B6neticisini aktifle=C5=9Ftir', 'proxy errmsg filedescriptors' =3D> 'Dosya tanimlay=C4=B1c=C4=B1 say=C4=B1s= =C4=B1 yanl=C4=B1=C5=9F miktarda', @@ -2131,7 +2129,6 @@ 'ssnetwork status' =3D> 'A=C4=9F Durumu', 'sspasswords' =3D> 'Parola', 'ssport forwarding' =3D> 'Ba=C4=9Flant=C4=B1 Noktas=C4=B1 Y=C3=B6nlendirme', -'ssproxy graphs' =3D> 'Vekil Sunucu Grafikleri', 'sssystem status' =3D> 'Sistem Durumu', 'sstraffic' =3D> 'A=C4=9F-Trafi=C4=9Fi', 'sstraffic graphs' =3D> 'Trafik Grafi=C4=9Fi', diff --git a/lfs/squid-graph b/lfs/squid-graph new file mode 100644 index 000000000..c93eae608 --- /dev/null +++ b/lfs/squid-graph @@ -0,0 +1,112 @@ +############################################################################= ### +# = # +# IPFire.org - A linux based firewall = # +# Copyright (C) 2007-2017 IPFire Team = # +# = # +# This program is free software: you can redistribute it and/or modify = # +# it under the terms of the GNU General Public License as published by = # +# the Free Software Foundation, either version 3 of the License, or = # +# (at your option) any later version. = # +# = # +# This program is distributed in the hope that it will be useful, = # +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the = # +# GNU General Public License for more details. = # +# = # +# You should have received a copy of the GNU General Public License = # +# along with this program. If not, see . = # +# = # +############################################################################= ### + +############################################################################= ### +# Definitions +############################################################################= ### + +include Config + +VER =3D 3.2 + +THISAPP =3D squid-graph-$(VER) +DL_FILE =3D $(THISAPP).tar.gz +DL_FROM =3D $(URL_IPFIRE) +DIR_APP =3D $(DIR_SRC)/squid-graph +TARGET =3D $(DIR_INFO)/$(THISAPP) +PROG =3D squid-graph +PAK_VER =3D 1 + +DEPS =3D "" + +############################################################################= ### +# Top-level Rules +############################################################################= ### + +objects =3D $(DL_FILE) + +$(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 =3D 7ed7d187f87bde1ec9dabe05f07053b5 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + $(PAK) + +############################################################################= ### +# Downloading, checking, md5sum +############################################################################= ### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################= ### +# Installation Details +############################################################################= ### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squid-graph/squid-gra= ph-for-ipfire.patch + +# Install GUI + install -v -m 755 ../src/squid-graph/sgraph.cgi \ + /srv/web/ipfire/cgi-bin/sgraph.cgi + +# Create sgraph dir, install logo.png + -mkdir -p /srv/web/ipfire/html/sgraph + install -v -m 644 ../src/squid-graph/logo.png \ + /srv/web/ipfire/html/sgraph/logo.png + +# Install main program + install -v -m 755 $(DIR_APP)/squid-graph \ + /usr/bin/squid-graph + +# Install update script + install -v -m 755 ../src/squid-graph/update-squid-graph.sh \ + /usr/local/bin/update-squid-graph.sh + +# Create symlink for five-minute-update-interval + ln -sf /usr/local/bin/update-squid-graph.sh /etc/fcron.cyclic/update-squid-= graph + +# Install language files + install -v -m 004 ../src/squid-graph/squid-graph.*.pl \ + /var/ipfire/addon-lang/ + +# Install menu entry + install -v -m 644 ../src/squid-graph/EX-squid-graph.menu \ + /var/ipfire/menu.d/EX-squid-graph.menu + + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index f8a2e5b34..efcee24b3 100755 --- a/make.sh +++ b/make.sh @@ -877,6 +877,7 @@ buildipfire() { lfsmake2 perl-Net-IP lfsmake2 wio lfsmake2 iftop + lfsmake2 squid-graph } =20 buildinstaller() { diff --git a/src/paks/squid-graph/install.sh b/src/paks/squid-graph/install.sh new file mode 100644 index 000000000..1e3b60c6e --- /dev/null +++ b/src/paks/squid-graph/install.sh @@ -0,0 +1,31 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . = # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +extract_files + +# Update language-cache +/usr/local/bin/update-lang-cache + +chown nobody.nobody /var/ipfire/menu.d/EX-squid-graph.menu diff --git a/src/paks/squid-graph/uninstall.sh b/src/paks/squid-graph/uninsta= ll.sh new file mode 100644 index 000000000..dac570c05 --- /dev/null +++ b/src/paks/squid-graph/uninstall.sh @@ -0,0 +1,28 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . = # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +remove_files + +/usr/local/bin/update-lang-cache diff --git a/src/paks/squid-graph/update.sh b/src/paks/squid-graph/update.sh new file mode 100644 index 000000000..89c40d0d7 --- /dev/null +++ b/src/paks/squid-graph/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . = # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh diff --git a/src/patches/squid-graph/squid-graph-for-ipfire.patch b/src/patch= es/squid-graph/squid-graph-for-ipfire.patch new file mode 100644 index 000000000..a583b3dc7 --- /dev/null +++ b/src/patches/squid-graph/squid-graph-for-ipfire.patch @@ -0,0 +1,238 @@ +--- a/squid-graph Mon Oct 02 20:46:43 2006 ++++ b/squid-graph Tue Nov 14 12:53:03 2017 +@@ -13,11 +13,14 @@ + use strict; + use GD; +=20 ++require '/var/ipfire/general-functions.pl'; ++require "${General::swroot}/lang.pl"; ++ + # Program version (DO NOT TOUCH THIS) + my $VER =3D "3.2 release"; +=20 + # Enable console logging? (1 =3D on, 0 =3D off) +-my $CONSOLELOG =3D 1; ++my $CONSOLELOG =3D 0; +=20 + # "Global" variables (DO NOT TOUCH THESE) + my %config; # configuration details here +@@ -26,10 +29,10 @@ + # Define graph colours [RRR,GGG,BBB] + $color{'bg'} =3D ['F5','F5','F5']; # graph background color + $color{'fg'} =3D ['00','00','00']; # graph foreground color +-$color{'gr'} =3D ['00','00','FF']; # graph total line color +-$color{'hit'} =3D ['FF','00','00']; # graph hit line color +-$color{'miss'} =3D ['00','FF','00']; # graph miss line color +-$color{'ims'} =3D ['FF','00','FF']; # graph ims hit line color ++$color{'gr'} =3D ['33','33','99']; # graph total line color ++$color{'hit'} =3D ['99','33','33']; # graph hit line color ++$color{'miss'} =3D ['33','99','33']; # graph miss line color ++$color{'ims'} =3D ['99','33','99']; # graph ims hit line color + $color{'hbg'} =3D ['FF','FF','FF']; # html report background color +=20 + ############ DO NOT EDIT ANYTHING BELOW THIS LINE ############## +@@ -319,7 +322,7 @@ + $progSpeed =3D dec_truncate($lineCounter/$duration,2); +=20 + # Do some console logging +- console_log("Done reading $lineCounter lines from logfile on STDIN. ($erro= rLines errors)"); ++ console_log("Done reading $lineCounter lines from logfile on STDIN. ($erro= rLines $Lang::tr{'errors'})"); + console_log("Analysis duration is $duration seconds, $progSpeed lines/sec.= "); +=20 + # Create image objects +@@ -612,13 +615,13 @@ + print IDX "
\n"; +=20 + print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; +- print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; ++ print IDX "\n"; + print IDX "
Generated:$progStartTime
Lines Analyzed:$lineCounter lines ($err= orLines errors)
Analysis Duration:$duration seconds
Analysis Speed:$progSpeed lines/sec
Graph Start:$logStartTime
Graph End:$logEndTime
Graph Domain:24 hours (86400 seconds)
$Lang::tr{'generated'}:$progStartTime
$Lang::tr{'lines analyzed'}:$lineCounter $Lang::tr{'lines'} ($errorLines $Lang::tr{'errors'= })
$Lang::tr{'analysis duration'}:$duration $Lang::tr{'seconds'}
$Lang::tr{'analysis speed'}:$progSpeed $Lang::tr{'lines sec'}
$Lang::tr{'graph start'}:$logStartTime
$Lang::tr{'graph end'}:$logEndTime
$Lang::tr{'graph domain'}:24 $Lang::tr{'hours'} ($Lang::tr{'24hseconds'})
\n"; +=20 + sub generate_html_row($$$) { +@@ -629,7 +632,7 @@ +=20 + $ret =3D ""; + $ret .=3D "$key:= "; +- $ret .=3D "$value"; ++ $ret .=3D "$val= ue"; + $ret .=3D "\n"; +=20 + undef $color; +@@ -641,58 +644,58 @@ +=20 + if ($have_tcp) { + print IDX "


\n"; +- print IDX "

Graph of TCP Accesses (5 minute total)

\n" if (!$have_= cumulative); +- print IDX "

Cumulative graph of TCP Accesses

\n" if ($have_cumulat= ive); ++ print IDX "

$Lang::tr{'graph of tcp accesses'}

\n" if (!$have_cumu= lative); ++ print IDX "

$Lang::tr{'cumulative graph of tcp accesses'}

\n" if (= $have_cumulative); + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "
\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Total Accesses",$tcpAccessTotals); +- print IDX generate_html_row($grcolor,"Average Accesses","$tcpAccessAverag= e per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$tcpAccessHitTot= als); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$tcpAccessHit= Average per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$tcpAccessHitPercen= tage %"); +- print IDX generate_html_row($imscolor,"Total Cache IMS Hits",$tcpAccessIM= STotals); +- print IDX generate_html_row($imscolor,"Average Cache IMS Hits","$tcpAcces= sIMSAverage per hour"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$tcpAccessMis= sTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$tcpAccess= MissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$tcpAccessMissPe= rcentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total accesses'}",$tcpAc= cessTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average accesses'}","$tc= pAccessAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$tc= pAccessHitTotals); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'average cache hits'}","= $tcpAccessHitAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'percent cache hits'}","= $tcpAccessHitPercentage %"); ++ print IDX generate_html_row($imscolor,"$Lang::tr{'total cache ims hits'}"= ,$tcpAccessIMSTotals); ++ print IDX generate_html_row($imscolor,"$Lang::tr{'average cache ims hits'= }","$tcpAccessIMSAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'total cache misses'}",= $tcpAccessMissTotals); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'average cache misses'}= ","$tcpAccessMissAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'percent cache misses'}= ","$tcpAccessMissPercentage %"); + print IDX "
\n"; + print IDX "
\n"; +- print IDX "

Graph of TCP Transfers (5 minute total)

\n" if (!$have= _cumulative); +- print IDX "

Cumulative graph of TCP Transfers

\n" if ($have_cumula= tive); ++ print IDX "

$Lang::tr{'graph of tcp transfers'}

\n" if (!$have_cum= ulative); ++ print IDX "

$Lang::tr{'cumulative graph of tcp transfers'}

\n" if = ($have_cumulative); + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "
\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Total Transfers",$tcpTransferTotals= ); +- print IDX generate_html_row($grcolor,"Average Transfers","$tcpTransferAve= rage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$tcpTransferHitT= otals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$tcpTransferH= itAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$tcpTransferHitPerc= entage %"); +- print IDX generate_html_row($imscolor,"Total Cache IMS Hits",$tcpTransfer= IMSTotals); +- print IDX generate_html_row($imscolor,"Average Cache IMS Hits","$tcpTrans= ferIMSAverage per hour"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$tcpTransferM= issTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$tcpTransf= erMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$tcpTransferMiss= Percentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total transfers'}",$tcpT= ransferTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average transfers'}","$t= cpTransferAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$tc= pTransferHitTotals); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'average cache hits'}","= $tcpTransferHitAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'percent cache hits'}","= $tcpTransferHitPercentage %"); ++ print IDX generate_html_row($imscolor,"$Lang::tr{'total cache ims hits'}"= ,$tcpTransferIMSTotals); ++ print IDX generate_html_row($imscolor,"$Lang::tr{'average cache ims hits'= }","$tcpTransferIMSAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'total cache misses'}",= $tcpTransferMissTotals); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'average cache misses'}= ","$tcpTransferMissAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'percent cache misses'}= ","$tcpTransferMissPercentage %"); + print IDX "
\n"; + print IDX "
\n"; + if ($have_transfer) { +- print IDX "

Graph of Average TCP Transfer Duration

\n"; ++ print IDX "

$Lang::tr{'graph of average tcp transfer duration'}

\= n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; +@@ -702,54 +705,54 @@ +=20 + if ($have_udp) { + print IDX "


\n"; +- print IDX "

Graph of UDP Accesses (5 minute total)

\n" if (!$have_= cumulative); +- print IDX "

Cumulative graph of UDP Accesses

\n" if ($have_cumulat= ive); ++ print IDX "

$Lang::tr{'graph of udp accesses'}

\n" if (!$have_cumu= lative); ++ print IDX "

$Lang::tr{'cumulative graph of udp accesses'}

\n" if (= $have_cumulative); + print IDX "
\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Avg. Transfer Duration","$tcpTimeA= verage seconds"); +- print IDX generate_html_row($hitcolor,"Avg. Cache Hit Duration","$tcpTim= eHitAverage seconds"); +- print IDX generate_html_row($misscolor,"Avg. Cache Miss Duration","$tcpT= imeMissAverage seconds"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'avg transfer duration'}= ","$tcpTimeAverage $Lang::tr{'seconds'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'avg cache hit duration= '}","$tcpTimeHitAverage $Lang::tr{'seconds'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'avg cache miss durati= on'}","$tcpTimeMissAverage $Lang::tr{'seconds'}"); + print IDX "
\n"; + print IDX "
\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "
\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Total Accesses",$udpAccessTotals); +- print IDX generate_html_row($grcolor,"Average Accesses","$udpAccessAverag= e per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$udpAccessHitTot= als); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$udpAccessHit= Average per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$udpAccessHitPercen= tage %"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$udpAccessMis= sTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$udpAccess= MissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$udpAccessMissPe= rcentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total accesses'}",$udpAc= cessTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average accesses'}","$ud= pAccessAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$ud= pAccessHitTotals); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'average cache hits'}","= $udpAccessHitAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'percent cache hits'}","= $udpAccessHitPercentage %"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'total cache misses'}",= $udpAccessMissTotals); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'average cache misses'}= ","$udpAccessMissAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'percent cache misses'}= ","$udpAccessMissPercentage %"); + print IDX "
\n"; + print IDX "
\n"; +- print IDX "

Graph of UDP Transfers (5 minute total)

\n" if (!$have= _cumulative); +- print IDX "

Cumulative graph of UDP Transfers

\n" if ($have_cumula= tive); ++ print IDX "

$Lang::tr{'graph of udp transfers'}

\n" if (!$have_cum= ulative); ++ print IDX "

$Lang::tr{'cumulative graph of udp transfers'}

\n" if = ($have_cumulative); + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "
\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Total Transfers",$udpTransferTotals= ); +- print IDX generate_html_row($grcolor,"Average Transfers","$udpTransferAve= rage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$udpTransferHitT= otals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$udpTransferH= itAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$udpTransferHitPerc= entage %"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$udpTransferM= issTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$udpTransf= erMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$udpTransferMiss= Percentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total transfers'}",$udpT= ransferTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average transfers'}","$u= dpTransferAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$ud= pTransferHitTotals); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'average cache hits'}","= $udpTransferHitAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'percent cache hits'}","= $udpTransferHitPercentage %"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'total cache misses'}",= $udpTransferMissTotals); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'average cache misses'}= ","$udpTransferMissAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'percent cache misses'}= ","$udpTransferMissPercentage %"); + print IDX "
\n"; + print IDX "
\n"; + if ($have_transfer) { +- print IDX "

Graph of Average UDP Transfer Duration

\n"; ++ print IDX "

$Lang::tr{'graph of average udp transfer duration'}

\= n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; + print IDX "\n"; diff --git a/src/squid-graph/EX-squid-graph.menu b/src/squid-graph/EX-squid-g= raph.menu new file mode 100644 index 000000000..a46bf6a79 --- /dev/null +++ b/src/squid-graph/EX-squid-graph.menu @@ -0,0 +1,6 @@ + $substatus->{'61.squid-graph'} =3D { + 'caption' =3D> "$Lang::tr{'ssproxy graphs'}", + 'uri' =3D> '/cgi-bin/sgraph.cgi', + 'title' =3D> "$Lang::tr{'ssproxy graphs'}", + 'enabled' =3D> 1, + }; diff --git a/src/squid-graph/logo.png b/src/squid-graph/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e2fe57b703e2662ec3fd9b70b6cfb= 6de4425aadf GIT binary patch literal 3933 zcmW+(c|6qX_y5dh7&G>4S;mqpiNRzd%V!Xiec!$VVgG+B~j zgl5W~BE>~Yii^@>_nZ6s=3DXsv<$9cWZ>pADVmkdXHD-22&1pol%6v(a)IF03e#Yw>m$R zclK{OQg|0UkZ4B)fF>>hk@=3DMu%S4~_jCKhRh`#J|$sZv4h5PzrPhIp0^mq36(a)r#dq z>2Cx8LaV1Nh^}$(eaX^@O0oo69pJ}WVzvH|WiU6Ka40(a)_^vVWI1RPoRSTHFOw(3(a)A z5EkEWB1urV$XF1V4b>ntdLE|+;pJ{10SMk3k_!!i+K)NAzXj7wXZAb0)_3E^y0jgv ze06%2dY3xB?ax$H5a76-Z97L}5Xc!%t)v)IG91bYamcLf=3D^_lIVq$Y=3DJ0e~Cn{;)I zxXQs9k{~LKBhaO|ytBW3q~nUZ&Nm432Eu`UNqT{KcpEAMuIyJRCYc)i++JCzn2?-z z8rC?^(X35BXWZegS?WH}6lxP8(|3?1PD(sGFEj_md}6KcZEwA9OS#8YV|?BE^Hs(a)l zu&JYzivHLmxJYI=3Dfdvf0L+{KB#~cM6Pq-r(G^gK)SBaByX`Fug>~NuZQn?(TVaD=3DE zr7+n=3DU^cdRYkoO(wYoz|8GMn~A7yYf6j9I!>r1**@ne7ZPd*Jc`No_Y{I!3`FF*;S zkk(a)Y7q^uV70VSJX(a)l$anWs zZZdIteAd4Mq(CW1DaB2DM23BJBgR9caffnWnr=3DKBFFZL3es>6+!j_9qS0RJ=3DD$mg_#b9(a)3wGN2CR&_C$;cjuy3>1|9l4sn_BkEl+k#2u z6|aK5I292x?+kb2V(a)7e|LJ=3D8}ldVZ-=3DOGua?_G=3D9oS7(M8*MHvgzP*4p!_y!@P$L9 zTljQN+_Seur(a)Eo^HmGM2kewXr%4z-*I_A^;8CIr0%+JyynA2> z;muL56|Q;aRT!2?ug;yZWRz01kP9*lLcSi~NGTWy!*qYUfVcVkdId`xhlI)lc=3D1Q5 zX)V4mTbu_!asFWx96uU7)=3D5J zW)#5pxiPyEo0-Ymqt?Y{L~mx z8r(3CbNPTmAE*sp!a5pzHv%YVUD%CB)Q}qwWgkcvoS7T+zL^czhtuCu)y}(7X8gzv zLNzu>ui{};{Y>1`qHEKoFbjBT2|HwN{mMDA5M0f=3Db1j8Ebz;^8xGgv}bMV|ul!eO3tL z3VCrP1dW6(j}59Qx}?wZ(a)c8Q!SnCcz-SC-ly+gLz)a-Y#)+| z?3ZdS;)Kr4Tqc-kjUXhIyA&1S?hCeZW>=3Dl8im&5e3X0n=3DEi`q!)_ET~C}+93(a)r#Eg z;^P_!XAg2t99axG9xifh_IH8e<1rT8;oDBkW$`NilNBJ}d;Z||IhN?6Hkk&|dl5cm ze1svvj3m8Y<72L(G^!I5!MaPtL9vM6DSm$`hfWX$DW8qc_5RHR1xRRX(#+X>A1E_$ z!-u+3!9m9N{Dy89X3LpHFEJxaJWy3rK4aNiiLBjuWfjNOuM>X-u{PJ`=3D?A+MLqB5P z4>XqA+MEB3COlQjJiUU8%zE_d{rsq)2&n0qb(X9EyYITUSUCIrg|)=3D`8J$6q>B?MG{~6E`-J|b&r-j zWYenG0d&=3DN(a)4xzmUZmZ1S>a|K>4NUA8B?vHjreOa>A(a)M`^UsP!U-phq!-j?5taey? zMJ@(1x$pO%K3N+>oiKX&YoZL3R4zXsTOoMC99nlwxeT7+-(a)I~A4oJw5Q#-_dC0P_p z0iK%}qL$}?gh;TGIBnp$K+T(0NjuB7YwAk95633n|6i0un99(a)nOs81xTu8WhuD#3& zd%*#@MI>6C%)Dw(a)My0s6vv*)^ON8U%tl&P8LIEWM%T{G+m{9; z_AIYjg;3v$etzaYa=3DiVD^ho#2Z>gR5#7tN5&We(a)2-A`EFG-_V%R1AONf(H)XWwa3E zUPY5zl34O|Co1HIn*x^N$sgN(a)-NYENXOYDd3$dk$ua3kmQ(C7;Csg3Hiqo~sWJXTh z4#GWUi_<1Wjhzm{CwUgRx`5%gUoPk8(a)2PmWr)XX*&;nJfh*8&vQ zejcvMp-fp`zlrcnH>a{@-r0;obB6j)^Ix`#DQvGV?S%XQ7i0U+ z{90XiA-ng!P3>83Vuf-bDO;-?B>VQ4rX1><5L^-uGiB^{6It>{c`y!{faE`o-I(a)d@Cyx zE#0k{&|~53E9CQe8CJ6A&g9^y|HPZmerZv-*%qKP4O{*JF;C$H8u%X86hG3oJr$mQ zB%}U9(%Ev3#>Jes+5n_CH75Ed$k)TTNMn-W^LVO$qKy^8V`?b*0~ zec58jgDnf_4nqb8)}BEB`Ih2}pvME9tqX*emNOe2^PnD83x4z#pEka`OrRQ=3D2BLAy zr=3D0qAYS(a)C{bevy(sH4BBrKCN15pv|VcBy%nVngLe(a)KA9> zw&_e4Z^@XT6n7!-#Bi`TDq6|+iNjHes3&=3D8voqn081`>fCiGKtn6KN8SF9qJc{XTnuEVL)oO zW;AO}7VVr5wNvSQhWdGo(4)!a$2e+NS@#}`gr8+IW&UYVP&J@=3DkqSA1UwIVCW6(;g z5;c<}$x_Mt$ESOE3QQ`JmTz-sHd^swLPLN3q$|t>B6#?90=3D=3DtI8>Y=3D@u#iOZW0zri zGY-vr(a)t5d5cV(Lwq-)NgY|pZHGA1XW?$PX8fOSL0q>0})1ndLFTpvFf^v!>GeIgx< z!n)+sibFqHE9#Cr_&rO%a|&y&7N`F|pM}&sn?b6)$H)SfTuyCKRWf&E7a(+9tgjA> zn27EppVkXUeN<>@hd80V{0OrGWj&86J&)HubY88!{NRDRFf~vYJi|)rLdJSX;I#9f z$$#QZCU!nJ&z3#VPKWVh7l{sWLv$*km~zb^`6a?L0UWQ~+1`Yd!<8CLPCv?uSl<`( zjyLa#|M#si2m4SvkCgb=3DZ4mr&jXc+yF5C6i0#~^Z=3Dl3BXa=3D>&X` z<$spRGyaxO-vJ6BdoedR*$Kx6uoO$ZIdy3S49!#032HlvOlTp-4-{cZl<=3D1*1vz`> z^xYHl5-Fs*VH7yCf1vJGzW%dqP#09)l^re40c#6GzyT{>Q$V)OFH^OIxbq5rhYXM=3D zSO7hu_R3l3-O`R71A9j$$hDkWvAmZ-LhMgs(PBg^vF3czFV8_vZ4v3i_d3;o43iZ& z6##8rTB}P$v8s|+m*<*=3D{LXF(9zEvXPpzf1{ z(a)MS4?kHg1HBAN}X#duCr(s`buab50`k&`pgC!}}A%+iM7+3;djA=3D&< = # +# = # +# This program is free software: you can redistribute it and/or modify = # +# it under the terms of the GNU General Public License as published by = # +# the Free Software Foundation, either version 3 of the License, or = # +# (at your option) any later version. = # +# = # +# This program is distributed in the hope that it will be useful, = # +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the = # +# GNU General Public License for more details. = # +# = # +# You should have received a copy of the GNU General Public License = # +# along with this program. If not, see . = # +# = # +############################################################################= ### + +use strict; + +# enable only the following on debugging purpose +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; + +require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/lang.pl"; +require "${General::swroot}/header.pl"; + +my @graphs =3D (); + +&Header::showhttpheaders(); + +my $dir =3D "/srv/web/ipfire/html/sgraph"; +my $sgraphdir =3D "/srv/web/ipfire/html/sgraph"; + +&Header::openpage($Lang::tr{'ssproxy graphs'}, 1, ''); + +&Header::openbigbox('100%', 'left'); + +&Header::openbox('100%', 'left', $Lang::tr{'proxy access graphs'} . ":" ); + +if (open(IPACHTML, "$sgraphdir/index.html")) +{ + my $skip =3D 1; + while () + { + $skip =3D 1 if /^
$/; + if ($skip) + { + $skip =3D 0 if /

/; + next; + } + s/]+)>/3D'Graph'/; + s/
/
/g; + s/
/
/g; + s/<([^>]*)>/\L<$1>\E/g; + s/(size|align|border|color)=3D([^'"> ]+)/$1=3D'$2'/g; + print; + } + close(IPACHTML); +} +else { + print $Lang::tr{'no information available'}; } + +&Header::closebox(); + +&Header::closebigbox(); + +&Header::closepage(); diff --git a/src/squid-graph/squid-graph.de.pl b/src/squid-graph/squid-graph.= de.pl new file mode 100644 index 000000000..54d1d414d --- /dev/null +++ b/src/squid-graph/squid-graph.de.pl @@ -0,0 +1,49 @@ +%tr =3D ( +%tr, + +'24hseconds' =3D> '86400 Sekunden', +'analysis duration' =3D> 'Analyse - Dauer', +'analysis speed' =3D> 'Analyse - Geschwindigkeit', +'average accesses' =3D> 'Zugriffe - Durchschnitt', +'average cache hits' =3D> 'Cache-Treffer - Durchschnitt', +'average cache ims hits' =3D> 'Cache-IMS-Treffer - Durchschnitt', +'average cache misses' =3D> 'Cache verfehlt - Durchschnitt', +'average transfers' =3D> 'Transfers - Durchschnitt', +'avg cache hit duration' =3D> 'Cache-Dauer (Treffer)', +'avg cache miss duration' =3D> 'Cache-Dauer (verfehlt)', +'avg transfer duration' =3D> 'Transfer-Dauer', +'cumulative graph of tcp accesses' =3D> 'TCP-Zugriffe (Zusammenfassung)', +'cumulative graph of tcp transfers' =3D> 'TCP-Transfers (Zusammenfassung)', +'cumulative graph of udp accesses' =3D> 'UDP-Zugriffe (Zusammenfassung)', +'cumulative graph of udp transfers' =3D> 'UDP-Transfers (Zusammenfassung)', +'errors' =3D> 'Fehler', +'generated' =3D> 'Erstellt', +'graph domain' =3D> 'Diagramm - Zeitraum', +'graph end' =3D> 'Diagramm - Ende', +'graph of average tcp transfer duration' =3D> 'TCP-Transfer-Dauer (Durchschn= itt)', +'graph of average udp transfer duration' =3D> 'UDP-Transfer-Dauer (Durchschn= itt)', +'graph of tcp accesses' =3D> 'TCP-Zugriffe (alle 5 Minuten)', +'graph of tcp transfers' =3D> 'TCP-Transfers (alle 5 Minuten)', +'graph of udp accesses' =3D> 'UDP-Zugriffe (alle 5 Minuten)', +'graph of udp transfers' =3D> 'UDP-Transfers (alle 5 Minuten)', +'graph start' =3D> 'Diagramm - Start', +'hours' =3D> 'Stunden', +'lines analyzed' =3D> 'Analysierte Zeilen
(access.log)', +'lines sec' =3D> 'Zeilen/Sekunde', +'lines' =3D> 'Zeilen', +'no information available' =3D> 'Keine Informationen verf=C3=BCgbar.', +'percent cache hits' =3D> 'Cache-Treffer - Prozent', +'percent cache misses' =3D> 'Cache verfehlt - Prozent', +'per hour' =3D> 'pro Stunde', +'proxy access graphs' =3D> 'Diagramme zur Proxyauslastung', +'seconds' =3D> 'Sekunde(n)', +'ssproxy graphs' =3D> 'Proxy-Diagramme', +'total accesses' =3D> 'Zugriffe - gesamt', +'total cache hits' =3D> 'Cache-Treffer - gesamt', +'total cache ims hits' =3D> 'Cache-IMS-Treffer - gesamt', +'total cache misses' =3D> 'Cache verfehlt - gesamt', +'total transfers' =3D> 'Transfers - gesamt', + +); + +#EOF diff --git a/src/squid-graph/squid-graph.en.pl b/src/squid-graph/squid-graph.= en.pl new file mode 100644 index 000000000..385729352 --- /dev/null +++ b/src/squid-graph/squid-graph.en.pl @@ -0,0 +1,49 @@ +%tr =3D ( +%tr, + +'24hseconds' =3D> '86400 seconds', +'analysis duration' =3D> 'Analysis Duration', +'analysis speed' =3D> 'Analysis Speed', +'average accesses' =3D> 'Average Accesses', +'average cache hits' =3D> 'Average Cache Hits', +'average cache ims hits' =3D> 'Average Cache IMS Hits', +'average cache misses' =3D> 'Average Cache Misses', +'average transfers' =3D> 'Average Transfers', +'avg cache hit duration' =3D> 'Avg. Cache Hit Duration', +'avg cache miss duration' =3D> 'Avg. Cache Miss Duration', +'avg transfer duration' =3D> 'Avg. Transfer Duration', +'cumulative graph of tcp accesses' =3D> 'TCP Accesses - cumulative', +'cumulative graph of tcp transfers' =3D> 'TCP Transfers - cumulative', +'cumulative graph of udp accesses' =3D> 'UDP Accesses - cumulative', +'cumulative graph of udp transfers' =3D> 'UDP Transfers - cumulative', +'errors' =3D> 'error(s)', +'generated' =3D> 'Generated', +'graph domain' =3D> 'Graph Domain', +'graph end' =3D> 'Graph End', +'graph of average tcp transfer duration' =3D> 'Average TCP Transfer Duration= ', +'graph of average udp transfer duration' =3D> 'Average UDP Transfer Duration= ', +'graph of tcp accesses' =3D> 'TCP Accesses (5 minute total)', +'graph of tcp transfers' =3D> 'TCP Transfers (5 minute total)', +'graph of udp accesses' =3D> 'UDP Accesses (5 minute total)', +'graph of udp transfers' =3D> 'UDP Transfers (5 minute total)', +'graph start' =3D> 'Graph Start', +'hours' =3D> 'hours', +'lines analyzed' =3D> 'Lines analyzed
(access.log)', +'lines sec' =3D> 'lines/sec', +'lines' =3D> 'lines', +'no information available' =3D> 'No information available.', +'percent cache hits' =3D> '% Cache Hits', +'percent cache misses' =3D> '% Cache Misses', +'per hour' =3D> 'per hour', +'proxy access graphs' =3D> 'Proxy access graphs', +'seconds' =3D> 'second(s)', +'ssproxy graphs' =3D> 'Proxy Graphs', +'total accesses' =3D> 'Total Accesses', +'total cache hits' =3D> 'Total Cache Hits', +'total cache ims hits' =3D> 'Total Cache IMS Hits', +'total cache misses' =3D> 'Total Cache Misses', +'total transfers' =3D> 'Total Transfers', + +); + +#EOF diff --git a/src/squid-graph/squid-graph.es.pl b/src/squid-graph/squid-graph.= es.pl new file mode 100644 index 000000000..a113e1203 --- /dev/null +++ b/src/squid-graph/squid-graph.es.pl @@ -0,0 +1,10 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'No hay informaci=C3=B3n disponible', +'proxy access graphs' =3D> 'Gr=C3=A1ficas de acceso al proxy', +'ssproxy graphs' =3D> 'Gr=C3=A1ficas de proxy', + +); + +#EOF diff --git a/src/squid-graph/squid-graph.fr.pl b/src/squid-graph/squid-graph.= fr.pl new file mode 100644 index 000000000..a2c59f50d --- /dev/null +++ b/src/squid-graph/squid-graph.fr.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'Aucune information disponible.', +'proxy access graphs' =3D> 'Graphiques des acc=C3=A8s proxy', +'ssproxy graphs' =3D> 'Graphiques du proxy', +); + +#EOF diff --git a/src/squid-graph/squid-graph.it.pl b/src/squid-graph/squid-graph.= it.pl new file mode 100644 index 000000000..6d2a3a5a9 --- /dev/null +++ b/src/squid-graph/squid-graph.it.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'No information available.', +'proxy access graphs' =3D> 'Proxy access graphs', +'ssproxy graphs' =3D> 'Proxy Graphs', +); + +#EOF diff --git a/src/squid-graph/squid-graph.nl.pl b/src/squid-graph/squid-graph.= nl.pl new file mode 100644 index 000000000..b3a2105e0 --- /dev/null +++ b/src/squid-graph/squid-graph.nl.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'Geen informatie beschikbaar.', +'proxy access graphs' =3D> 'Proxy toegangsgrafieken', +'ssproxy graphs' =3D> 'Proxy grafieken', +); + +#EOF diff --git a/src/squid-graph/squid-graph.pl.pl b/src/squid-graph/squid-graph.= pl.pl new file mode 100644 index 000000000..254286f1a --- /dev/null +++ b/src/squid-graph/squid-graph.pl.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'Brak dost=C4=99pnych informacji.', +'proxy access graphs' =3D> 'Wykresy dost=C4=99pu do Proxy', +'ssproxy graphs' =3D> 'Wykresy Proxy', +); + +#EOF diff --git a/src/squid-graph/squid-graph.ru.pl b/src/squid-graph/squid-graph.= ru.pl new file mode 100644 index 000000000..6d2a3a5a9 --- /dev/null +++ b/src/squid-graph/squid-graph.ru.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'No information available.', +'proxy access graphs' =3D> 'Proxy access graphs', +'ssproxy graphs' =3D> 'Proxy Graphs', +); + +#EOF diff --git a/src/squid-graph/squid-graph.tr.pl b/src/squid-graph/squid-graph.= tr.pl new file mode 100644 index 000000000..139fa2aa1 --- /dev/null +++ b/src/squid-graph/squid-graph.tr.pl @@ -0,0 +1,9 @@ +%tr =3D (=20 +%tr, + +'no information available' =3D> 'Herhangi bir bilgi bulunmamaktad=C4=B1r.', +'proxy access graphs' =3D> 'Vekil sunucu eri=C5=9Fim grafi=C4=9Fi', +'ssproxy graphs' =3D> 'Vekil Sunucu Grafikleri', +); + +#EOF diff --git a/src/squid-graph/update-squid-graph.sh b/src/squid-graph/update-s= quid-graph.sh new file mode 100644 index 000000000..4251607f7 --- /dev/null +++ b/src/squid-graph/update-squid-graph.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +### +### Squid-Graphs +### +if [ -e "/var/log/squid/access.log" ]; then + /usr/bin/squid-graph --no-console-log --tcp-only --output-dir=3D/srv/web/ip= fire/html/sgraph < /var/log/squid/access.log >/dev/null 2>&1; +fi --=20 2.15.1 --===============6629482998627757270==--

\n"; + print IDX "\n"; +- print IDX generate_html_row($grcolor,"Avg. Transfer Duration","$udpTimeA= verage seconds"); +- print IDX generate_html_row($hitcolor,"Avg. Cache Hit Duration","$udpTim= eHitAverage seconds"); +- print IDX generate_html_row($misscolor,"Avg. Cache Miss Duration","$udpT= imeMissAverage seconds"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'avg transfer duration'}= ","$udpTimeAverage $Lang::tr{'seconds'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'avg cache hit duration= '}","$udpTimeHitAverage $Lang::tr{'seconds'}"); ++ print IDX generate_html_row($misscolor,"$Lang::tr{'avg cache miss durati= on'}","$udpTimeMissAverage $Lang::tr{'seconds'}"); + print IDX "
\n"; + print IDX "