dansguardian 2.10.1.1

Aplikasi-aplikasi diubuntu: • Aplikasi Grafis •
Aplikasi Internet •
Aplikasi Office •
Aplikasi Sound & Video •
Aplikasi Programming
User avatar
gundul1
Posts: 3
Joined: 22 Jun 2013, 07:41
Location: indonesia

dansguardian 2.10.1.1

Postby gundul1 » 22 Jun 2013, 07:44

mau tanya,..
isi script logrotation untuk dansguardian 2.10.1.1 itu gmn y?
sy mau merotate files log dansguardian di crontab.
sy cari di /etc/dansguardian/ gag ada yang namanya file logrotation. mhon bantuannya suhu2!!!!!!!
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: dansguardian 2.10.1.1

Postby q_p » 22 Jun 2013, 08:16

Pengaturan log ada di danguardian.conf =

Code: Select all

...
loglevel = 0
logexceptionhits = 0
logfileformat = 1
#loglocation = '/var/log/dansguardian/access.log'
#statlocation = '/var/log/dansguardian/stats'
...

Sedangkan logrotation-nya ada pada file /etc/logrotate.d/dansguardian. Default-nya =

Code: Select all

/var/log/dansguardian/access.log {
        rotate 5
        daily
        prerotate
                /etc/init.d/dansguardian stop > /dev/null 2>&1 || true
        endscript
        postrotate
                /etc/init.d/dansguardian start > /dev/null 2>&1
        endscript
}

Mungkin saja anda perlu menyesuaikan option loglevel di dansguardian.conf dengan option rotate pada /etc/logrotate.d/danguardian, sebelum memasukkannya ke crontab =

Code: Select all

* * * * * /usr/sbin/logrotate -vf /etc/logrotate.d/dansguardian >> /dev/null 2>&1
cmiiw
User avatar
gundul1
Posts: 3
Joined: 22 Jun 2013, 07:41
Location: indonesia

Re: dansguardian 2.10.1.1

Postby gundul1 » 24 Jun 2013, 22:13

---------isi dansguardian.conf-----------

Code: Select all

# Logging Settings
#
# 0 = none  1 = just denied  2 = all text based  3 = all requests

loglevel = 2

# Log Exception Hits
# Log if an exception (user, ip, URL, phrase) is matched and so
# the page gets let through.  Can be useful for diagnosing
# why a site gets through the filter.
# 0 = never log exceptions
# 1 = log exceptions, but do not explicitly mark them as such
# 2 = always log & mark exceptions (default)
logexceptionhits = 2

# Log File Format
# 1 = DansGuardian format (space delimited)
# 2 = CSV-style format
# 3 = Squid Log File Format
# 4 = Tab delimited
logfileformat = 3

-------isi etc/logrotate.d/dansguardian----------------

Code: Select all

/var/log/dansguardian/access.log {
  rotate 4
  weekly
  sharedscripts
  postrotate
    /bin/kill -HUP `cat /var/run/dansguardian.pid 2>/dev/null` 2> /dev/null || true
  endscript
}

-----------------------------------------------------------
itu script ane diatas gan,..
gimana setting crontab nya?
mohon bantuannya.
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: dansguardian 2.10.1.1

Postby q_p » 24 Jun 2013, 23:49

Ada baiknya di test dulu =

Code: Select all

/usr/sbin/logrotate -vf /etc/logrotate.d/dansguardian
Kalau output-nya sesuai yang anda harapkan, lanjutkan dengan memasukkannya ke crontab

Code: Select all

# m h  dom mon dow   command
#minute (0-59)
#|   hour (0-23)
#|   |    day of the month (1-31)
#|   |    |   month of the year (1-12 or Jan-Dec)
#|   |    |   |   day of the week (0-6 with 0=Sun or Sun-Sat)
#|   |    |   |   |   commands
#|   |    |   |   |   |
#

#mingguan
@weekly    /usr/sbin/logrotate -vf /etc/logrotate.d/dansguardian >> /dev/null 2>&1

Return to “Aplikasi Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests