This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
обработка_лог_файлов_сервера_squid [2017/05/05 06:49] val [Ubuntu] |
обработка_лог_файлов_сервера_squid [2020/09/02 08:28] (current) val |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Использование пакета SARG ===== | ===== Использование пакета SARG ===== | ||
+ | |||
+ | ==== Ubuntu ==== | ||
+ | |||
+ | === Установка, настройка === | ||
+ | <code> | ||
+ | root@gate:~# apt install sarg | ||
+ | |||
+ | root@gate:~# cat /etc/sarg/sarg.conf | ||
+ | </code><code> | ||
+ | ... | ||
+ | access_log /var/log/squid/access.log | ||
+ | ... | ||
+ | </code><code> | ||
+ | root@gate:~# cat /etc/sarg/sarg-reports.conf | ||
+ | </code><code> | ||
+ | ... | ||
+ | HTMLOUT=/var/www/html/sarg | ||
+ | ... | ||
+ | </code> | ||
+ | |||
+ | === Автоматизация процесса построения отчета === | ||
+ | <code> | ||
+ | root@gate:~# less /etc/cron.daily/sarg | ||
+ | |||
+ | root@gate:~# less /etc/logrotate.d/squid | ||
+ | </code> | ||
+ | |||
+ | === Построения отчета в ручном режиме === | ||
+ | <code> | ||
+ | root@gate:~# /usr/sbin/sarg-reports manual 07/02/2014 | ||
+ | |||
+ | root@gate:~# /usr/sbin/sarg-reports today | ||
+ | </code> | ||
==== FreeBSD ==== | ==== FreeBSD ==== | ||
Line 59: | Line 92: | ||
[gate:~] # chmod +x /usr/local/etc/rc.d/sarg.sh | [gate:~] # chmod +x /usr/local/etc/rc.d/sarg.sh | ||
</code> | </code> | ||
- | ==== Ubuntu ==== | ||
- | === Установка, настройка === | ||
- | <code> | ||
- | root@gate:~# apt install sarg | ||
- | |||
- | root@gate:~# cat /etc/sarg/sarg.conf | ||
- | </code><code> | ||
- | ... | ||
- | access_log /var/log/squid/access.log | ||
- | ... | ||
- | </code><code> | ||
- | root@gate:~# cat /etc/sarg/sarg-reports.conf | ||
- | </code><code> | ||
- | ... | ||
- | HTMLOUT=/var/www/html/sarg | ||
- | ... | ||
- | </code> | ||
- | |||
- | === Автоматизация процесса построения отчета === | ||
- | <code> | ||
- | root@gate:~# less /etc/cron.daily/sarg | ||
- | |||
- | root@gate:~# less /etc/logrotate.d/squid | ||
- | </code> | ||
- | |||
- | === Построения отчета в ручном режиме === | ||
- | <code> | ||
- | root@gate:~# /usr/sbin/sarg-reports manual 07/02/2014 | ||
- | |||
- | root@gate:~# /usr/sbin/sarg-reports today | ||
- | </code> | ||