]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/log.dat
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / log.dat
index 136fed77c0850fa7481fd5a82e65bc427fc8f4d9..01c382a0dfbe8bee524b1ffa009a58b7c7ff2af9 100644 (file)
@@ -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,36 +49,44 @@ $cgiparams{'ACTION'} = '';
 $cgiparams{'SECTION'} = 'ipfire';
 
 my %sections = (
+        'apcupsd' => '(apcupsd\[.*?\]: )',
         'auth' => '(\w+\(pam_unix\)\[.*\]: )',
-               'wio' => '(wio|wio\[.*\])',
+        'wio' => '(wio:|wio\[.*\])',
         'captive' => '(Captive:)',
         'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
         'collectd' => '(collectd\[.*\]: )',
         'cron' => '(fcron\[.*\]: )',
         'ddns' => '(ddns\[\d+\]:)',
         'dhcp' => '(dhcpd: )',
-        'dma' => '(dma\[.*\]: )',
+        'dma' => '(dma: |dma\[.*\]: |postfix/\w*\[\d*\]: )',
         'guardian' => '(guardian\[.*\]: )',
+        'haproxy' => '(haproxy\[.*?\]: )',
+        'ipblocklist' => '(ipblocklist: )',
         'ipfire' => '(ipfire: )',
         'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )',
         'kernel' => '(kernel: (?!DROP_))',
+        'monit' => '(monit\[.*?\]: )',
         'ntp' => '(ntpd(?:ate)?\[.*\]: )',
-       'oinkmaster' => '(oinkmaster\[.*\]: )',
+        'nut' => '(upsmon\[.*?\]: )',
+        '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\[.*\])',
-        'suricata' => '(suricata\[.*\]: )',
+        'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
+        'suricata' => '(suricata: )',
         'squid' => '(squid\[.*\]: |squid: )',
         'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
-        'unbound' => '(unbound: \[.*:.*\])(.*:.*$)',
+        'unbound' => '(unbound: \[.*?\])(.*:.*$)',
         'urlfilter bl' => '(installpackage\[urlfilter\]: )',
-        'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)'
+        'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)',
+               'zabbix_agentd' => '(zabbix_agentd\[.*?\]: )'
         );
 
 # Translations for the %sections array.
 my %trsections = (
+        'apcupsd' => 'APCUPS',
         'auth' => "$Lang::tr{'loginlogout'}",
-               'wio' => 'Who Is Online?',
+        'wio' => 'Who Is Online?',
         'captive' => $Lang::tr{'Captive'},
         'clamav' => 'ClamAV',
         'collectd' => 'Collectd',
@@ -87,20 +95,26 @@ my %trsections = (
         'dhcp' => "$Lang::tr{'dhcp server'}",
         'dma' => 'Mail',
         'guardian' => "$Lang::tr{'guardian'}",
+        'haproxy' => 'HAProxy',
+        'ipblocklist' => "$Lang::tr{'ipblocklist'}",
         'ipfire' => 'IPFire',
         'ipsec' => 'IPSec',
         'kernel' => "$Lang::tr{'kernel'}",
+        'monit' => 'Monit',
         'ntp' => 'NTP',
-       'oinkmaster' => 'Oinkmaster',
+        'nut' => 'NUT',
+        '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'
+        'wireless' => 'Wireless',
+               'zabbix_agentd' => 'Zabbix Agent'
        );
 
 
@@ -219,7 +233,7 @@ while ($gzindex >=0 && $loop) {
            #&General::log("reading $filestr");
            READ:while (<FILE>) {
                my $line = $_;
-               if ($line =~ /^${monthstr} ${daystr} ..:..:.. [\w\-]+ ${section}(.*)/) {
+               if ($line =~ /^${monthstr} ${daystr} ..:..:.. [\w\-\.]+ ${section}(.*)/) {
                    # when standard viewing, just keep in memory the correct slice
                    # it starts a '$start' and size is $viewport
                    # If export, then keep all lines...
@@ -264,7 +278,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'export'})
 
        foreach $_ (@log)
        {
-               /^... (..) (..:..:..) [\w\-]+ ${section}(.*)$/;
+               /^... (..) (..:..:..) [\w\-\.]+ ${section}(.*)$/;
                my $day =  $1;
                $day =~ tr / /0/;
                my $time = $cgiparams{'DAY'} ? "$2" : "$day/$2" ;
@@ -387,7 +401,7 @@ $lines = 0;
 #print '<tt>';
 foreach $_ (@log)
 {
-       /^... (..) (..:..:..) [\w\-]+ ${section}(.*)$/;
+       /^... (..) (..:..:..) [\w\-\.]+ ${section}(.*)$/;
        my $day =  $1;
        $day =~ tr / /0/;
        my $time = $cgiparams{'DAY'} ? "$2" : "$day/$2" ;