metalog: add rc.d script and config file.
--HG-- extra : convert_revision : b861369fc6e0c839f160fd74b2ef1dd8c2f1eb35
This commit is contained in:
parent
8bb1601e88
commit
ff7a7a9c33
3 changed files with 93 additions and 0 deletions
17
templates/metalog/files/metalog
Normal file
17
templates/metalog/files/metalog
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: metalog
|
||||
# REQUIRE: SERVERS
|
||||
# BEFORE: random_seed
|
||||
|
||||
$_rc_subr_loaded . /etc/rc.subr
|
||||
|
||||
name="metalog"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/$name"
|
||||
command_args="--daemonize"
|
||||
required_files="/etc/metalog.conf"
|
||||
pidfile="/var/run/$name.pid"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
68
templates/metalog/files/metalog.conf
Normal file
68
templates/metalog/files/metalog.conf
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Sample Metalog configuration file
|
||||
|
||||
maxsize = 1048576 # size in bytes (1048576 = 1 megabyte)
|
||||
maxtime = 86400 # time in seconds (86400 = 1 day)
|
||||
maxfiles = 10 # num files per directory
|
||||
|
||||
# This will capture all of the internal log messages that metalog itself
|
||||
# generates. If you use any "command" options below, you will want this
|
||||
# as metalog generates a lot of status messages whenever it executes a
|
||||
# command and children processes exit.
|
||||
|
||||
Metalog :
|
||||
|
||||
program = "metalog"
|
||||
logdir = "/var/log/metalog"
|
||||
break = 1
|
||||
|
||||
Authentication :
|
||||
|
||||
facility = "auth"
|
||||
facility = "authpriv"
|
||||
logdir = "/var/log/auth"
|
||||
break = 1
|
||||
|
||||
Critical :
|
||||
|
||||
facility = "*"
|
||||
minimum = 1
|
||||
logdir = "/var/log/critical"
|
||||
break = 1
|
||||
|
||||
Password failures :
|
||||
|
||||
regex = "(password|login|authentication)\s+(fail|invalid)"
|
||||
regex = "(failed|invalid)\s+(password|login|authentication|user)"
|
||||
regex = "ILLEGAL ROOT LOGIN"
|
||||
logdir = "/var/log/pwdfail"
|
||||
break = 1
|
||||
|
||||
Kernel messages :
|
||||
|
||||
facility = "kern"
|
||||
logdir = "/var/log/kernel"
|
||||
break = 1
|
||||
|
||||
Daemons :
|
||||
facility = "daemon"
|
||||
logdir = "/var/log/daemon"
|
||||
break = 1
|
||||
|
||||
crond :
|
||||
|
||||
facility = "cron"
|
||||
logdir = "/var/log/cron"
|
||||
break = 1
|
||||
|
||||
SSH Server :
|
||||
|
||||
program = "sshd"
|
||||
logdir = "/var/log/sshd"
|
||||
break = 1
|
||||
|
||||
Mail :
|
||||
|
||||
facility = "mail"
|
||||
neg_regex= "starting daemon"
|
||||
logdir = "/var/log/mail"
|
||||
break = 1
|
|
@ -16,4 +16,12 @@ conf_files="/etc/metalog.conf"
|
|||
|
||||
Add_dependency full glibc
|
||||
Add_dependency full pcre
|
||||
Add_dependency full bzip2
|
||||
Add_dependency build lzma-utils
|
||||
|
||||
post_install()
|
||||
{
|
||||
install -d ${DESTDIR}/etc/rc.d
|
||||
install -m755 ${FILESDIR}/metalog ${DESTDIR}/etc/rc.d
|
||||
install -m644 ${FILESDIR}/metalog.conf ${DESTDIR}/etc
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue