X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Flogs.cgi%2Flog.dat;h=3364b7bea5bb4eac1c6df9204edd4d45dc824055;hb=1fd351d407daffe30059fd69441249141a9a5186;hp=57570802367498c27357a24c76bd26bad843b0eb;hpb=65f0333066db08ccaf9d0cf647f23ec5279e8ebe;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 5757080236..3364b7bea5 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -22,7 +22,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", \%mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color); use POSIX(); @@ -49,39 +49,61 @@ $cgiparams{'ACTION'} = ''; $cgiparams{'SECTION'} = 'ipfire'; my %sections = ( - 'ipfire' => '(ipfire: )', - 'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])', - 'dns' => '(dnsmasq\[.*\]: )', - 'dhcp' => '(dhcpd: )', + 'auth' => '(\w+\(pam_unix\)\[.*\]: )', + 'wio' => '(wio:|wio\[.*\])', + 'captive' => '(Captive:)', 'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )', 'collectd' => '(collectd\[.*\]: )', 'cron' => '(fcron\[.*\]: )', + 'ddns' => '(ddns\[\d+\]:)', + 'dhcp' => '(dhcpd: )', + 'dma' => '(dma: |dma\[.*\]: |postfix/\w*\[\d*\]: )', + 'guardian' => '(guardian\[.*\]: )', + 'ipfire' => '(ipfire: )', + 'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )', + 'kernel' => '(kernel: (?!DROP_))', + 'monit' => '(monit\[.*?\]: )', 'ntp' => '(ntpd(?:ate)?\[.*\]: )', + 'oinkmaster' => '(oinkmaster\[.*\]: )', + 'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )', + 'pakfire' => '(pakfire:)', + 'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])', + 'samba' => '(nmbd|smbd|winbind)\[\d+\]:', + 'suricata' => '(suricata: )', + 'squid' => '(squid\[.*\]: |squid: )', 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', - 'auth' => '(\w+\(pam_unix\)\[.*\]: )', - 'kernel' => '(kernel: (?!DROP_))', - 'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon\[.*\]: |vpnwatch: )', - 'openvpn' => '(openvpnserver)\[.*\]: ', - 'pakfire' => '(pakfire:) ', - 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:) ' + 'unbound' => '(unbound: \[.*:.*\])(.*:.*$)', + 'urlfilter bl' => '(installpackage\[urlfilter\]: )', + 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)' ); # Translations for the %sections array. my %trsections = ( - 'ipfire' => 'IPFire', - 'red' => 'RED', - 'dns' => 'DNS', - 'dhcp' => "$Lang::tr{'dhcp server'}", - 'cron' => 'Cron', - 'collectd' => 'Collectd', - 'clamav' => 'ClamAV', - 'ntp' => 'NTP', - 'ssh' => 'SSH', 'auth' => "$Lang::tr{'loginlogout'}", - 'kernel' => "$Lang::tr{'kernel'}", + 'wio' => 'Who Is Online?', + 'captive' => $Lang::tr{'Captive'}, + 'clamav' => 'ClamAV', + 'collectd' => 'Collectd', + 'cron' => 'Cron', + 'ddns' => "$Lang::tr{'dynamic dns'}", + 'dhcp' => "$Lang::tr{'dhcp server'}", + 'dma' => 'Mail', + 'guardian' => "$Lang::tr{'guardian'}", + 'ipfire' => 'IPFire', 'ipsec' => 'IPSec', + 'kernel' => "$Lang::tr{'kernel'}", + 'monit' => 'Monit', + 'ntp' => 'NTP', + 'oinkmaster' => 'Oinkmaster', 'openvpn' => 'OpenVPN', 'pakfire' => 'Pakfire', + 'red' => 'RED', + 'samba' => $Lang::tr{'samba'}, + 'suricata' => "$Lang::tr{'intrusion detection'}", + 'squid' => "$Lang::tr{'web proxy'}", + 'ssh' => 'SSH', + 'unbound' => 'DNS: Unbound', + 'urlfilter bl' => 'URLFilter Blacklist', 'wireless' => 'Wireless' ); @@ -190,8 +212,10 @@ while ($gzindex >=0 && $loop) { # calculate file name if ($gzindex == 0) { $filestr = "/var/log/messages"; + $filestr = "/var/log/mail" if (${section} =~ 'dma'); } else { $filestr = "/var/log/messages.$gzindex"; + $filestr = "/var/log/mail.$gzindex" if (${section} =~ 'dma'); $filestr = "$filestr.gz" if -f "$filestr.gz"; } # now read file if existing @@ -200,7 +224,7 @@ while ($gzindex >=0 && $loop) { READ:while () { my $line = $_; if ($line =~ /^${monthstr} ${daystr} ..:..:.. [\w\-]+ ${section}(.*)/) { - # when standart viewing, just keep in memory the correct slice + # when standard viewing, just keep in memory the correct slice # it starts a '$start' and size is $viewport # If export, then keep all lines... if ($cgiparams{'ACTION'} eq $Lang::tr{'export'}){ @@ -211,7 +235,7 @@ while ($gzindex >=0 && $loop) { if (@log > $Header::viewsize) { shift (@log); } - #} else { dont do this optimisation, need to count lines ! + #} else { don't do this optimisation, need to count lines ! # $datetime = $maxtime; # we have read viewsize lines, stop main loop # last READ; # exit read file } @@ -276,7 +300,7 @@ print < END ; -foreach $section (keys %sections) { +foreach $section (sort {$trsections{$a} cmp $trsections{$b}} keys %sections) { print "\t