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 traffic, somewhat like the popular MRTG tool."
I found by chance that the corresponding translation strings were still present, but not used, so I thought "Why not?".
After some tests I decided to revive this tool - here it is as an IPFire addon, based on the original sources.
About four weeks ago, I sent an email to the original developer via Sourceforge, 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 localisations 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 matthias.fischer@ipfire.org --- 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' => "$Lang::tr{'hardware graphs'}", 'enabled' => 1, }; - $substatus->{'61.entropy'} = { + $substatus->{'62.entropy'} = { 'caption' => "$Lang::tr{'entropy'}", 'uri' => '/cgi-bin/entropy.cgi', 'title' => "$Lang::tr{'entropy graphs'}", diff --git a/config/rootfiles/packages/squid-graph b/config/rootfiles/packages/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' => 'Legen Sie hier die Standardklassen fest durch die nicht-gefilterte Pakete gehen.', 'no fritzdsl driver' => 'Kein Fritz!DSL-Treiber vorhanden. Bitte hochladen.', 'no hardware random number generator' => 'Dieses System hat keine Entropiequelle.', -'no information available' => 'Keine Informationen verfügbar.', 'no log selected' => 'kein Protokoll ausgewählt', 'no modem selected' => 'Kein Modem ausgewählt', 'no set selected' => 'Es wurde kein Satz ausgewählt', @@ -1934,7 +1933,6 @@ 'proto' => 'Proto', 'protocol' => 'Protokoll:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Diagramme zur Proxyauslastung', 'proxy admin password' => 'Cache Administrator Passwort', 'proxy cachemgr' => 'Cachemanager aktivieren', 'proxy errmsg filedescriptors' => 'Ungültiger Anzahl Filedescriptoren', @@ -2157,7 +2155,6 @@ 'ssnetwork status' => 'Netzwerk-Status', 'sspasswords' => 'Passwörter', 'ssport forwarding' => 'Port-Weiterleitung', -'ssproxy graphs' => 'Proxy-Diagramme', 'sssystem status' => 'System-Status', 'sstraffic' => 'Net-Traffic', 'sstraffic graphs' => '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' => 'Enter the standard class for non-filtered packets.', 'no fritzdsl driver' => 'No Fritz!DSL driver. Please upload.', 'no hardware random number generator' => 'This system has no source for entropy.', -'no information available' => 'No information available.', 'no log selected' => 'No log selected', 'no modem selected' => 'No modem selected', 'no set selected' => 'No set was selected', @@ -1970,7 +1969,6 @@ 'proto' => 'Proto', 'protocol' => 'Protocol:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Proxy access graphs', 'proxy admin password' => 'Cache administrator password', 'proxy cachemgr' => 'Activate cachemanager', 'proxy errmsg filedescriptors' => 'Wrong amount of filedescriptors', @@ -2199,7 +2197,6 @@ 'ssnetwork status' => 'Network Status', 'sspasswords' => 'Passwords', 'ssport forwarding' => 'Port Forwarding', -'ssproxy graphs' => 'Proxy Graphs', 'sssystem status' => 'System Status', 'sstraffic' => 'Net-Traffic', 'sstraffic graphs' => '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' => 'No existe archi ECI ADSL synch.bin. Favor de cargarlo', 'no filter pass' => 'Introduzca la clase estándar para paquetes no filtrados.', 'no fritzdsl driver' => 'No hay drivers Fritz!DSL. Favor de cargarlos', -'no information available' => 'No hay información disponible', 'no log selected' => 'No ha seleccionado registro log', 'no modem selected' => 'No ha seleccionado módem', 'no set selected' => 'Ningún conjunto se ha seleccionado', @@ -1437,7 +1436,6 @@ 'proto' => 'Proto', 'protocol' => 'Protocolo:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Gráficas de acceso al proxy', 'proxy admin password' => 'Password Administrador de Caché', 'proxy cachemgr' => 'Activar Cachemanager', 'proxy errmsg filedescriptors' => 'Cantidad incorrecta de descriptores de archivos', @@ -1647,7 +1645,6 @@ 'ssnetwork status' => 'Estado de la red', 'sspasswords' => 'Contraseñas', 'ssport forwarding' => 'Reenvío de puertos', -'ssproxy graphs' => 'Gráficas de proxy', 'sssystem status' => 'Status del sistema', 'sstraffic' => 'Net-traffic', 'sstraffic graphs' => 'Gráficas de tráfico', 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' => 'aucunfichier ECI ADSL synch.bin. Veuillez le charger.', 'no filter pass' => 'Entrez la classe standard pour les paquets non filtrés.', 'no fritzdsl driver' => 'Aucun pilote Fritz!DSL. Veuillez le charger.', -'no information available' => 'Aucune information disponible.', 'no log selected' => 'Aucun rapport sélectionné', 'no modem selected' => 'Aucun modem sélectionné', 'no set selected' => 'Aucun jeu sélectionné', @@ -1443,7 +1442,6 @@ 'proto' => 'Proto', 'protocol' => 'Protocole', 'proxy' => 'Proxy', -'proxy access graphs' => 'Graphiques des accès proxy', 'proxy admin password' => 'Mot de passe admnistrateur du Cache', 'proxy cachemgr' => 'Activer le gestionnaire de cache', 'proxy errmsg filedescriptors' => 'Mauvais montant de fichier descripteurs', @@ -1652,7 +1650,6 @@ 'ssnetwork status' => 'Statut réseau', 'sspasswords' => 'Mots de passe', 'ssport forwarding' => 'Transfert de port', -'ssproxy graphs' => 'Graphiques du proxy', 'sssystem status' => 'Statut système', 'sstraffic' => 'Trafic réseau', 'sstraffic graphs' => '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' => 'Enter the standard class for non-filtered packets.', 'no fritzdsl driver' => 'No Fritz!DSL driver. Please upload.', 'no hardware random number generator' => 'This system has no source for entropy.', -'no information available' => 'No information available.', 'no log selected' => 'No log selected', 'no modem selected' => 'No modem selected', 'no set selected' => 'No set was selected', @@ -1827,7 +1826,6 @@ 'proto' => 'Proto', 'protocol' => 'Protocolo', 'proxy' => 'Proxy', -'proxy access graphs' => 'Proxy access graphs', 'proxy admin password' => 'Cache administrator password', 'proxy cachemgr' => 'Attiva cachemanager', 'proxy errmsg filedescriptors' => 'Wrong amount of filedescriptors', @@ -2052,7 +2050,6 @@ 'ssnetwork status' => 'Network Status', 'sspasswords' => 'Passwords', 'ssport forwarding' => 'Port Forwarding', -'ssproxy graphs' => 'Proxy Graphs', 'sssystem status' => 'Stato del sistema', 'sstraffic' => 'Traffico di rete', 'sstraffic graphs' => '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' => 'Geef de standaard-klasse voor niet-gefilterde pakketten.', 'no fritzdsl driver' => 'Geen Fritz!DSL driver. Bestand uploaden a.u.b.', 'no hardware random number generator' => 'Dit systeem heeft geen mogelijkheden voor entropie.', -'no information available' => 'Geen informatie beschikbaar.', 'no log selected' => 'Geen log geselecteerd', 'no modem selected' => 'Geen modem geselecteerd', 'no set selected' => 'Geen set geselecteerd', @@ -1780,7 +1779,6 @@ 'proto' => 'Proto', 'protocol' => 'Protocol:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Proxy toegangsgrafieken', 'proxy admin password' => 'Cache beheerder wachtwoord', 'proxy cachemgr' => 'Activeer cachebeheer', 'proxy errmsg filedescriptors' => 'Verkeerd aantal bestandsindicators', @@ -2000,7 +1998,6 @@ 'ssnetwork status' => 'Netwerkstatus', 'sspasswords' => 'Wachtwoorden', 'ssport forwarding' => 'Poort doorsturen', -'ssproxy graphs' => 'Proxy grafieken', 'sssystem status' => 'Systeemstatus', 'sstraffic' => 'Netwerkgebruik', 'sstraffic graphs' => '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' => 'Brak pliku ECI ADSL synch.bin. Proszę o jego wgranie.', 'no filter pass' => 'Proszę wprowadzić standardową klasę dla pakietów niefiltrowanych.', 'no fritzdsl driver' => 'Brak sterownika Fritz!DSL. Proszę o jego wgranie.', -'no information available' => 'Brak dostępnych informacji.', 'no log selected' => 'Nie wybrano logu', 'no modem selected' => 'Nie wybrano modemu', 'no set selected' => 'Nie wybrano ustawienia', @@ -1449,7 +1448,6 @@ 'proto' => 'Proto', 'protocol' => 'Protokół:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Wykresy dostępu do Proxy', 'proxy admin password' => 'Hasło administratora Cache', 'proxy cachemgr' => 'Aktywuj cachemanager', 'proxy errmsg filedescriptors' => 'Niepoprawna wartość w polu filedescriptors', @@ -1659,7 +1657,6 @@ 'ssnetwork status' => 'Stan sieci', 'sspasswords' => 'Hasła', 'ssport forwarding' => 'Przekierowanie portów', -'ssproxy graphs' => 'Wykresy Proxy', 'sssystem status' => 'Stan systemu', 'sstraffic' => 'Net-Traffic', 'sstraffic graphs' => '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' => 'No ECI ADSL synch.bin file. Please upload.', 'no filter pass' => 'Задайте стандартный класс для нефильтруемых пакетов.', 'no fritzdsl driver' => 'No Fritz!DSL driver. Please upload.', -'no information available' => 'No information available.', 'no log selected' => 'No log selected', 'no modem selected' => 'No modem selected', 'no set selected' => 'No set was selected', @@ -1444,7 +1443,6 @@ 'proto' => 'Proto', 'protocol' => 'Протокол:', 'proxy' => 'Proxy', -'proxy access graphs' => 'Proxy access graphs', 'proxy admin password' => 'Cache administrator password', 'proxy cachemgr' => 'Включить менеджер кэша', 'proxy errmsg filedescriptors' => 'Wrong amount of filedescriptors', @@ -1654,7 +1652,6 @@ 'ssnetwork status' => 'Статус сети', 'sspasswords' => 'Пароли', 'ssport forwarding' => 'Перенаправление портов', -'ssproxy graphs' => 'Proxy Graphs', 'sssystem status' => 'Статус системы', 'sstraffic' => 'Сетевой трафик', 'sstraffic graphs' => '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' => 'Olmayan filtre paketleri için standart sınıfı girin.', 'no fritzdsl driver' => 'Fritz!DSL sürücüsü yok. Lütfen yükleyin.', 'no hardware random number generator' => 'Bu sistemin entropi için kaynağı yok.', -'no information available' => 'Herhangi bir bilgi bulunmamaktadır.', 'no log selected' => 'Günlük seçilmedi', 'no modem selected' => 'Modem seçilmedi', 'no set selected' => 'Hiçbir ayar seçilmedi', @@ -1902,7 +1901,6 @@ 'proto' => 'Kural', 'protocol' => 'Kural ', 'proxy' => 'Vekil sunucu', -'proxy access graphs' => 'Vekil sunucu erişim grafiği', 'proxy admin password' => 'Önbellek yönetici parolası', 'proxy cachemgr' => 'Önbellek yöneticisini aktifleştir', 'proxy errmsg filedescriptors' => 'Dosya tanimlayıcı sayısı yanlış miktarda', @@ -2131,7 +2129,6 @@ 'ssnetwork status' => 'Ağ Durumu', 'sspasswords' => 'Parola', 'ssport forwarding' => 'Bağlantı Noktası Yönlendirme', -'ssproxy graphs' => 'Vekil Sunucu Grafikleri', 'sssystem status' => 'Sistem Durumu', 'sstraffic' => 'Ağ-Trafiği', 'sstraffic graphs' => 'Trafik Grafiği', 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 info@ipfire.org # +# # +# 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 http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 3.2 + +THISAPP = squid-graph-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/squid-graph +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = squid-graph +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 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-graph-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 }
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 info@ipfire.org. # +# # +############################################################################ +# +. /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/uninstall.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 info@ipfire.org. # +# # +############################################################################ +# +. /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 info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh diff --git a/src/patches/squid-graph/squid-graph-for-ipfire.patch b/src/patches/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; + ++require '/var/ipfire/general-functions.pl'; ++require "${General::swroot}/lang.pl"; ++ + # Program version (DO NOT TOUCH THIS) + my $VER = "3.2 release"; + + # Enable console logging? (1 = on, 0 = off) +-my $CONSOLELOG = 1; ++my $CONSOLELOG = 0; + + # "Global" variables (DO NOT TOUCH THESE) + my %config; # configuration details here +@@ -26,10 +29,10 @@ + # Define graph colours [RRR,GGG,BBB] + $color{'bg'} = ['F5','F5','F5']; # graph background color + $color{'fg'} = ['00','00','00']; # graph foreground color +-$color{'gr'} = ['00','00','FF']; # graph total line color +-$color{'hit'} = ['FF','00','00']; # graph hit line color +-$color{'miss'} = ['00','FF','00']; # graph miss line color +-$color{'ims'} = ['FF','00','FF']; # graph ims hit line color ++$color{'gr'} = ['33','33','99']; # graph total line color ++$color{'hit'} = ['99','33','33']; # graph hit line color ++$color{'miss'} = ['33','99','33']; # graph miss line color ++$color{'ims'} = ['99','33','99']; # graph ims hit line color + $color{'hbg'} = ['FF','FF','FF']; # html report background color + + ############ DO NOT EDIT ANYTHING BELOW THIS LINE ############## +@@ -319,7 +322,7 @@ + $progSpeed = dec_truncate($lineCounter/$duration,2); + + # Do some console logging +- console_log("Done reading $lineCounter lines from logfile on STDIN. ($errorLines errors)"); ++ console_log("Done reading $lineCounter lines from logfile on STDIN. ($errorLines $Lang::tr{'errors'})"); + console_log("Analysis duration is $duration seconds, $progSpeed lines/sec."); + + # Create image objects +@@ -612,13 +615,13 @@ + print IDX "<BR>\n"; + + print IDX "<TABLE BORDER=0>\n"; +- print IDX "<TR><TD><B>Generated:</B></TD><TD>$progStartTime</TD></TR>\n"; +- print IDX "<TR><TD><B>Lines Analyzed:</B></TD><TD>$lineCounter lines ($errorLines errors)</TD></TR>\n"; +- print IDX "<TR><TD><B>Analysis Duration:</B></TD><TD>$duration seconds</TD></TR>\n"; +- print IDX "<TR><TD><B>Analysis Speed:</B></TD><TD>$progSpeed lines/sec</TD></TR>\n"; +- print IDX "<TR><TD><B>Graph Start:</B></TD><TD>$logStartTime</TD></TR>\n"; +- print IDX "<TR><TD><B>Graph End:</B></TD><TD>$logEndTime</TD></TR>\n"; +- print IDX "<TR><TD><B>Graph Domain:</B></TD><TD>24 hours (86400 seconds)</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'generated'}:</B></TD><TD style=padding-left:5px>$progStartTime</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'lines analyzed'}:</B></TD><TD style=padding-left:5px>$lineCounter $Lang::tr{'lines'} ($errorLines $Lang::tr{'errors'})</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'analysis duration'}:</B></TD><TD style=padding-left:5px>$duration $Lang::tr{'seconds'}</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'analysis speed'}:</B></TD><TD style=padding-left:5px>$progSpeed $Lang::tr{'lines sec'}</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'graph start'}:</B></TD><TD style=padding-left:5px>$logStartTime</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'graph end'}:</B></TD><TD style=padding-left:5px>$logEndTime</TD></TR>\n"; ++ print IDX "<TR><TD><B>$Lang::tr{'graph domain'}:</B></TD><TD style=padding-left:5px>24 $Lang::tr{'hours'} ($Lang::tr{'24hseconds'})</TD></TR>\n"; + print IDX "</TABLE>\n"; + + sub generate_html_row($$$) { +@@ -629,7 +632,7 @@ + + $ret = "<TR>"; + $ret .= "<TD ALIGN=RIGHT><FONT SIZE=-1 COLOR=#$color><B>$key:</B></FONT></TD>"; +- $ret .= "<TD ALIGN=LEFT><FONT SIZE=-1>$value</FONT></TD>"; ++ $ret .= "<TD style=padding-left:5px ALIGN=LEFT><FONT SIZE=-1>$value</FONT></TD>"; + $ret .= "</TR>\n"; + + undef $color; +@@ -641,58 +644,58 @@ + + if ($have_tcp) { + print IDX "<BR><HR><BR>\n"; +- print IDX "<H3>Graph of TCP Accesses (5 minute total)</H3>\n" if (!$have_cumulative); +- print IDX "<H3>Cumulative graph of TCP Accesses</H3>\n" if ($have_cumulative); ++ print IDX "<H3>$Lang::tr{'graph of tcp accesses'}</H3>\n" if (!$have_cumulative); ++ print IDX "<H3>$Lang::tr{'cumulative graph of tcp accesses'}</H3>\n" if ($have_cumulative); + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=tcp-access.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Total Accesses",$tcpAccessTotals); +- print IDX generate_html_row($grcolor,"Average Accesses","$tcpAccessAverage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$tcpAccessHitTotals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$tcpAccessHitAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$tcpAccessHitPercentage %"); +- print IDX generate_html_row($imscolor,"Total Cache IMS Hits",$tcpAccessIMSTotals); +- print IDX generate_html_row($imscolor,"Average Cache IMS Hits","$tcpAccessIMSAverage per hour"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$tcpAccessMissTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$tcpAccessMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$tcpAccessMissPercentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total accesses'}",$tcpAccessTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average accesses'}","$tcpAccessAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$tcpAccessHitTotals); ++ 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 "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; + print IDX "</TABLE>\n"; +- print IDX "<H3>Graph of TCP Transfers (5 minute total)</H3>\n" if (!$have_cumulative); +- print IDX "<H3>Cumulative graph of TCP Transfers</H3>\n" if ($have_cumulative); ++ print IDX "<H3>$Lang::tr{'graph of tcp transfers'}</H3>\n" if (!$have_cumulative); ++ print IDX "<H3>$Lang::tr{'cumulative graph of tcp transfers'}</H3>\n" if ($have_cumulative); + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=tcp-transfer.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Total Transfers",$tcpTransferTotals); +- print IDX generate_html_row($grcolor,"Average Transfers","$tcpTransferAverage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$tcpTransferHitTotals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$tcpTransferHitAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$tcpTransferHitPercentage %"); +- print IDX generate_html_row($imscolor,"Total Cache IMS Hits",$tcpTransferIMSTotals); +- print IDX generate_html_row($imscolor,"Average Cache IMS Hits","$tcpTransferIMSAverage per hour"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$tcpTransferMissTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$tcpTransferMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$tcpTransferMissPercentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total transfers'}",$tcpTransferTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average transfers'}","$tcpTransferAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$tcpTransferHitTotals); ++ 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 "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; + print IDX "</TABLE>\n"; + if ($have_transfer) { +- print IDX "<H3>Graph of Average TCP Transfer Duration</H3>\n"; ++ print IDX "<H3>$Lang::tr{'graph of average tcp transfer duration'}</H3>\n"; + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=tcp-duration.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Avg. Transfer Duration","$tcpTimeAverage seconds"); +- print IDX generate_html_row($hitcolor,"Avg. Cache Hit Duration","$tcpTimeHitAverage seconds"); +- print IDX generate_html_row($misscolor,"Avg. Cache Miss Duration","$tcpTimeMissAverage 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 duration'}","$tcpTimeMissAverage $Lang::tr{'seconds'}"); + print IDX "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; +@@ -702,54 +705,54 @@ + + if ($have_udp) { + print IDX "<BR><HR><BR>\n"; +- print IDX "<H3>Graph of UDP Accesses (5 minute total)</H3>\n" if (!$have_cumulative); +- print IDX "<H3>Cumulative graph of UDP Accesses</H3>\n" if ($have_cumulative); ++ print IDX "<H3>$Lang::tr{'graph of udp accesses'}</H3>\n" if (!$have_cumulative); ++ print IDX "<H3>$Lang::tr{'cumulative graph of udp accesses'}</H3>\n" if ($have_cumulative); + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=udp-access.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Total Accesses",$udpAccessTotals); +- print IDX generate_html_row($grcolor,"Average Accesses","$udpAccessAverage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$udpAccessHitTotals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$udpAccessHitAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$udpAccessHitPercentage %"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$udpAccessMissTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$udpAccessMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$udpAccessMissPercentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total accesses'}",$udpAccessTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average accesses'}","$udpAccessAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$udpAccessHitTotals); ++ 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 "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; + print IDX "</TABLE>\n"; +- print IDX "<H3>Graph of UDP Transfers (5 minute total)</H3>\n" if (!$have_cumulative); +- print IDX "<H3>Cumulative graph of UDP Transfers</H3>\n" if ($have_cumulative); ++ print IDX "<H3>$Lang::tr{'graph of udp transfers'}</H3>\n" if (!$have_cumulative); ++ print IDX "<H3>$Lang::tr{'cumulative graph of udp transfers'}</H3>\n" if ($have_cumulative); + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=udp-transfer.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Total Transfers",$udpTransferTotals); +- print IDX generate_html_row($grcolor,"Average Transfers","$udpTransferAverage per hour"); +- print IDX generate_html_row($hitcolor,"Total Cache Hits",$udpTransferHitTotals); +- print IDX generate_html_row($hitcolor,"Average Cache Hits","$udpTransferHitAverage per hour"); +- print IDX generate_html_row($hitcolor,"% Cache Hits","$udpTransferHitPercentage %"); +- print IDX generate_html_row($misscolor,"Total Cache Misses",$udpTransferMissTotals); +- print IDX generate_html_row($misscolor,"Average Cache Misses","$udpTransferMissAverage per hour"); +- print IDX generate_html_row($misscolor,"% Cache Misses","$udpTransferMissPercentage %"); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'total transfers'}",$udpTransferTotals); ++ print IDX generate_html_row($grcolor,"$Lang::tr{'average transfers'}","$udpTransferAverage $Lang::tr{'per hour'}"); ++ print IDX generate_html_row($hitcolor,"$Lang::tr{'total cache hits'}",$udpTransferHitTotals); ++ 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 "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; + print IDX "</TABLE>\n"; + if ($have_transfer) { +- print IDX "<H3>Graph of Average UDP Transfer Duration</H3>\n"; ++ print IDX "<H3>$Lang::tr{'graph of average udp transfer duration'}</H3>\n"; + print IDX "<TABLE BORDER=0>\n"; + print IDX "<TR>\n"; + print IDX "<TD><IMG SRC=udp-duration.png></TD>\n"; + print IDX "<TD>\n"; + print IDX "<TABLE BORDER=0>\n"; +- print IDX generate_html_row($grcolor,"Avg. Transfer Duration","$udpTimeAverage seconds"); +- print IDX generate_html_row($hitcolor,"Avg. Cache Hit Duration","$udpTimeHitAverage seconds"); +- print IDX generate_html_row($misscolor,"Avg. Cache Miss Duration","$udpTimeMissAverage 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 duration'}","$udpTimeMissAverage $Lang::tr{'seconds'}"); + print IDX "</TABLE>\n"; + print IDX "</TD>\n"; + print IDX "</TR>\n"; diff --git a/src/squid-graph/EX-squid-graph.menu b/src/squid-graph/EX-squid-graph.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'} = { + 'caption' => "$Lang::tr{'ssproxy graphs'}", + 'uri' => '/cgi-bin/sgraph.cgi', + 'title' => "$Lang::tr{'ssproxy graphs'}", + 'enabled' => 1, + }; diff --git a/src/squid-graph/logo.png b/src/squid-graph/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e2fe57b703e2662ec3fd9b70b6cfb6de4425aadf GIT binary patch literal 3933 zcmW+(c|6qX_y5dh7&G>4S;mqpiNRzd%V!Xiec!$<Lw04!5-Da7*$0(Dm>VVgG+B~j zgl5W~BE>~Yii^@>_nZ6s=Xsv<$9cWZ>pADVmkdXHD-22&1pol%6v@IF03e#Yw>m$R zclK{OQg|0UkZ4B)fF>>hk@=Mu%S4~_jCKhRh`#J|$sZv4h5PzrPhIp0^mq36@r#dq z>2Cx8LaV1Nh^}$(eaX^@O0oo69pJ}WVzvH|WiU6Ka40@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FN{oAgURq}*gvTGU$h=7%W1KAdA&Aa_lF%sO3$J_`! zQV8^qW0jekrcg5uJV)>|M#si2m4SvkCgb=Z4mr&jXc+yF5C6i0#~^Z=l3BXa=>&X` z<$spRGyaxO-vJ6BdoedR*$Kx6uoO$ZIdy3S49!#032HlvOlTp-4-{cZl<=1*1vz`> z^xYHl5-Fs*VH7yCf1vJGzW%dqP#09)l^re40c#6GzyT{>Q$V)OFH^OIxbq5rhYXM= zSO7hu_R3l3-O`R71A9j$$hDkWvAmZ-LhMgs(PBg^vF3czFV8_vZ4v3i_d3;o43iZ& z6##8rTB}P$v8s|+m*<*={<y2n)y!^hIkDo78+gp1@kSZ)VM&#Q!wImUKO+x1;Q0K& zEd0n3BiT`FH~b%TIjEq)%OsWF#UA$4v9W6&0Mp(E$vzw(cvH&>LXF(9zEvXPpzf1{ z@MS4?kHg1HBAN}X#duCr(s`buab50`k&`pgC!}}A%+iM7+3;djA=&<<JD9fVTCaC% zP}-uzHameEwwi7GUtiW!(Um+Z#gPFc2Yz1cBB4rn^q(=+0(dR4J&v;M24Fl1Pjt=V p8QSb*D$gq8GkI;0CIcd5;BV1iMZbf;|7WCuQzz{$8qLVb{|7ra_8|ZO
literal 0 HcmV?d00001
diff --git a/src/squid-graph/sgraph.cgi b/src/squid-graph/sgraph.cgi new file mode 100644 index 000000000..ed25cd118 --- /dev/null +++ b/src/squid-graph/sgraph.cgi @@ -0,0 +1,72 @@ +#!/usr/bin/perl +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2017 IPFire Team info@ipfire.org # +# # +# 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 http://www.gnu.org/licenses/. # +# # +############################################################################### + +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 = (); + +&Header::showhttpheaders(); + +my $dir = "/srv/web/ipfire/html/sgraph"; +my $sgraphdir = "/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 = 1; + while (<IPACHTML>) + { + $skip = 1 if /^<HR>$/; + if ($skip) + { + $skip = 0 if /<H1>/; + next; + } + s/<IMG SRC=([^"'>]+)>/<img src='/sgraph/$1' alt='Graph' />/; + s/<HR>/<hr />/g; + s/<BR>/<br />/g; + s/<([^>]*)>/\L<$1>\E/g; + s/(size|align|border|color)=([^'"> ]+)/$1='$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 = ( +%tr, + +'24hseconds' => '86400 Sekunden', +'analysis duration' => 'Analyse - Dauer', +'analysis speed' => 'Analyse - Geschwindigkeit', +'average accesses' => 'Zugriffe - Durchschnitt', +'average cache hits' => 'Cache-Treffer - Durchschnitt', +'average cache ims hits' => 'Cache-IMS-Treffer - Durchschnitt', +'average cache misses' => 'Cache verfehlt - Durchschnitt', +'average transfers' => 'Transfers - Durchschnitt', +'avg cache hit duration' => 'Cache-Dauer (Treffer)', +'avg cache miss duration' => 'Cache-Dauer (verfehlt)', +'avg transfer duration' => 'Transfer-Dauer', +'cumulative graph of tcp accesses' => 'TCP-Zugriffe (Zusammenfassung)', +'cumulative graph of tcp transfers' => 'TCP-Transfers (Zusammenfassung)', +'cumulative graph of udp accesses' => 'UDP-Zugriffe (Zusammenfassung)', +'cumulative graph of udp transfers' => 'UDP-Transfers (Zusammenfassung)', +'errors' => 'Fehler', +'generated' => 'Erstellt', +'graph domain' => 'Diagramm - Zeitraum', +'graph end' => 'Diagramm - Ende', +'graph of average tcp transfer duration' => 'TCP-Transfer-Dauer (Durchschnitt)', +'graph of average udp transfer duration' => 'UDP-Transfer-Dauer (Durchschnitt)', +'graph of tcp accesses' => 'TCP-Zugriffe (alle 5 Minuten)', +'graph of tcp transfers' => 'TCP-Transfers (alle 5 Minuten)', +'graph of udp accesses' => 'UDP-Zugriffe (alle 5 Minuten)', +'graph of udp transfers' => 'UDP-Transfers (alle 5 Minuten)', +'graph start' => 'Diagramm - Start', +'hours' => 'Stunden', +'lines analyzed' => 'Analysierte Zeilen<br />(access.log)', +'lines sec' => 'Zeilen/Sekunde', +'lines' => 'Zeilen', +'no information available' => 'Keine Informationen verfügbar.', +'percent cache hits' => 'Cache-Treffer - Prozent', +'percent cache misses' => 'Cache verfehlt - Prozent', +'per hour' => 'pro Stunde', +'proxy access graphs' => 'Diagramme zur Proxyauslastung', +'seconds' => 'Sekunde(n)', +'ssproxy graphs' => 'Proxy-Diagramme', +'total accesses' => 'Zugriffe - gesamt', +'total cache hits' => 'Cache-Treffer - gesamt', +'total cache ims hits' => 'Cache-IMS-Treffer - gesamt', +'total cache misses' => 'Cache verfehlt - gesamt', +'total transfers' => '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 = ( +%tr, + +'24hseconds' => '86400 seconds', +'analysis duration' => 'Analysis Duration', +'analysis speed' => 'Analysis Speed', +'average accesses' => 'Average Accesses', +'average cache hits' => 'Average Cache Hits', +'average cache ims hits' => 'Average Cache IMS Hits', +'average cache misses' => 'Average Cache Misses', +'average transfers' => 'Average Transfers', +'avg cache hit duration' => 'Avg. Cache Hit Duration', +'avg cache miss duration' => 'Avg. Cache Miss Duration', +'avg transfer duration' => 'Avg. Transfer Duration', +'cumulative graph of tcp accesses' => 'TCP Accesses - cumulative', +'cumulative graph of tcp transfers' => 'TCP Transfers - cumulative', +'cumulative graph of udp accesses' => 'UDP Accesses - cumulative', +'cumulative graph of udp transfers' => 'UDP Transfers - cumulative', +'errors' => 'error(s)', +'generated' => 'Generated', +'graph domain' => 'Graph Domain', +'graph end' => 'Graph End', +'graph of average tcp transfer duration' => 'Average TCP Transfer Duration', +'graph of average udp transfer duration' => 'Average UDP Transfer Duration', +'graph of tcp accesses' => 'TCP Accesses (5 minute total)', +'graph of tcp transfers' => 'TCP Transfers (5 minute total)', +'graph of udp accesses' => 'UDP Accesses (5 minute total)', +'graph of udp transfers' => 'UDP Transfers (5 minute total)', +'graph start' => 'Graph Start', +'hours' => 'hours', +'lines analyzed' => 'Lines analyzed<br />(access.log)', +'lines sec' => 'lines/sec', +'lines' => 'lines', +'no information available' => 'No information available.', +'percent cache hits' => '% Cache Hits', +'percent cache misses' => '% Cache Misses', +'per hour' => 'per hour', +'proxy access graphs' => 'Proxy access graphs', +'seconds' => 'second(s)', +'ssproxy graphs' => 'Proxy Graphs', +'total accesses' => 'Total Accesses', +'total cache hits' => 'Total Cache Hits', +'total cache ims hits' => 'Total Cache IMS Hits', +'total cache misses' => 'Total Cache Misses', +'total transfers' => '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 = ( +%tr, + +'no information available' => 'No hay información disponible', +'proxy access graphs' => 'Gráficas de acceso al proxy', +'ssproxy graphs' => 'Gráficas 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 = ( +%tr, + +'no information available' => 'Aucune information disponible.', +'proxy access graphs' => 'Graphiques des accès proxy', +'ssproxy graphs' => '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 = ( +%tr, + +'no information available' => 'No information available.', +'proxy access graphs' => 'Proxy access graphs', +'ssproxy graphs' => '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 = ( +%tr, + +'no information available' => 'Geen informatie beschikbaar.', +'proxy access graphs' => 'Proxy toegangsgrafieken', +'ssproxy graphs' => '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 = ( +%tr, + +'no information available' => 'Brak dostępnych informacji.', +'proxy access graphs' => 'Wykresy dostępu do Proxy', +'ssproxy graphs' => '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 = ( +%tr, + +'no information available' => 'No information available.', +'proxy access graphs' => 'Proxy access graphs', +'ssproxy graphs' => '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 = ( +%tr, + +'no information available' => 'Herhangi bir bilgi bulunmamaktadır.', +'proxy access graphs' => 'Vekil sunucu erişim grafiği', +'ssproxy graphs' => 'Vekil Sunucu Grafikleri', +); + +#EOF diff --git a/src/squid-graph/update-squid-graph.sh b/src/squid-graph/update-squid-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=/srv/web/ipfire/html/sgraph < /var/log/squid/access.log >/dev/null 2>&1; +fi