X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Flogs.cgi%2Flog.dat;h=5734fed18e7ee87c39c24c98b9679bcd238f8159;hb=dec5269370dfc4a2fe10100f1fa1f1830c2b4cb5;hp=1813862fe0eeacc15266f95feb0c0b4ff469f2b5;hpb=5ffd14f1407ca9be93a2edd65d7151567927fbb4;p=ipfire-2.x.git diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 1813862fe0..5734fed18e 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -49,41 +49,53 @@ $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\[.*\])', - 'ddns' => '(ddns\[\d+\]:)', - 'dns' => '(dnsmasq\[.*\]: )', - 'dhcp' => '(dhcpd: )', + 'auth' => '(\w+\(pam_unix\)\[.*\]: )', + 'wio' => '(wio|wio\[.*\])', 'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )', 'collectd' => '(collectd\[.*\]: )', 'cron' => '(fcron\[.*\]: )', - 'ntp' => '(ntpd(?:ate)?\[.*\]: )', - 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', - 'auth' => '(\w+\(pam_unix\)\[.*\]: )', - 'kernel' => '(kernel: (?!DROP_))', + 'ddns' => '(ddns\[\d+\]:)', + 'dhcp' => '(dhcpd: )', + 'dma' => '(dma\[.*\]: )', + 'guardian' => '(guardian\[.*\]: )', + 'ipfire' => '(ipfire: )', 'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )', + 'kernel' => '(kernel: (?!DROP_))', + 'ntp' => '(ntpd(?:ate)?\[.*\]: )', 'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )', - 'pakfire' => '(pakfire:) ', - 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:) ' + 'pakfire' => '(pakfire:)', + 'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])', + 'snort' => '(snort\[.*\]: )', + 'squid' => '(squid\[.*\]: |squid: )', + 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', + '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', - 'ddns' => $Lang::tr{'dynamic dns'}, - '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?', + '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'}", + 'ntp' => 'NTP', 'openvpn' => 'OpenVPN', 'pakfire' => 'Pakfire', + 'red' => 'RED', + 'snort' => "$Lang::tr{'intrusion detection'}", + 'squid' => "$Lang::tr{'web proxy'}", + 'ssh' => 'SSH', + 'unbound' => 'DNS: Unbound', + 'urlfilter bl' => 'URLFilter Blacklist', 'wireless' => 'Wireless' ); @@ -192,8 +204,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 @@ -202,7 +216,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'}){ @@ -213,7 +227,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 } @@ -278,7 +292,7 @@ print < END ; -foreach $section (keys %sections) { +foreach $section (sort {$trsections{$a} cmp $trsections{$b}} keys %sections) { print "\t