Local sysloging 50$ ?



  • I want to store logs by the syslog on the local hdd on pfsense box.
    Remote sysloging is usefull with embedded pfsense only.
    I prefer a option in /System Logs/menu to log locally witout limited.
    Option to archive logs (cut and zip) on the specified time (0:00 every day) and store in directory.

    This is my script from FreeBSD 4.10 and ipf.
    "#!/bin/sh
    Y=date +%y
    M=date +%m
    D=date +%d
    #G=date +%H
    #/bin/cp /var/log/ipf.log /var/log/ipf_20"$Y""$M""$D"_g."$G".log
    /bin/cp /var/log/ipf.log /var/log/ipf_20"$Y""$M""$D".log
    /bin/echo > /var/log/ipf.log
    /usr/bin/gzip  /var/log/ipf_20"$Y""$M""$D".log
    "

    Martin



  • Option to archive logs (cut and zip) on the specified time (0:00 every day) and store in directory.

    With logrotate(d) I guess?  :)



  • Yes of course :)

    I think about something like that.

    destination pf-d_kern { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/kernel"); };
    destination pf-d_mesg { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/messages"); };
    destination pf-d_auth { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/secure"); };
    destination pf-d_mail { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/maillog"); };
    destination pf-d_uucp { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/spooler"); };
    destination pf-d_boot { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/boot.log"); };
    destination pf-d_emerg { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/emerg.log"); };
    destination pf-d_sshd { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/sshd.log"); };
    destination pf-d_pptpd { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/pptpd.log"); };
    destination pf-d_daemon { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/daemon.log"); };
    destination pf-d_firewall { file("/var/log/pfsense/$YEAR-$MONTH-$DAY/firewall.log"); };

    filter pf-f_kern { facility(kern); };
    filter pf-f_mesg { level(info) and not facility(mail,authpriv,kern,local7); };
    filter pf-f_auth { facility(authpriv); };
    filter pf-f_mail { facility(mail); };
    filter pf-f_uucp { facility(uucp); };
    filter pf-f_boot        { facility(local7); };
    filter pf-f_emerg    { level(emerg); };
    filter pf-f_sshd { program("sshd"); };
    filter pf-f_pptpd      { match("pptpd"); };
    filter pf-f_daemon { facility(daemon); };
    filter pf-f_firewall { level(debug); };


Log in to reply