]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/log.dat
Add Zabbix Agent to logviewer
[ipfire-2.x.git] / html / cgi-bin / logs.cgi / log.dat
index fbc83f48dd0fdba038c997a3c13d14ba367ce77a..01c382a0dfbe8bee524b1ffa009a58b7c7ff2af9 100644 (file)
@@ -60,6 +60,7 @@ my %sections = (
         'dhcp' => '(dhcpd: )',
         'dma' => '(dma: |dma\[.*\]: |postfix/\w*\[\d*\]: )',
         'guardian' => '(guardian\[.*\]: )',
+        'haproxy' => '(haproxy\[.*?\]: )',
         'ipblocklist' => '(ipblocklist: )',
         'ipfire' => '(ipfire: )',
         'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )',
@@ -77,7 +78,8 @@ my %sections = (
         'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
         '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.
@@ -93,6 +95,7 @@ my %trsections = (
         'dhcp' => "$Lang::tr{'dhcp server'}",
         'dma' => 'Mail',
         'guardian' => "$Lang::tr{'guardian'}",
+        'haproxy' => 'HAProxy',
         'ipblocklist' => "$Lang::tr{'ipblocklist'}",
         'ipfire' => 'IPFire',
         'ipsec' => 'IPSec',
@@ -110,7 +113,8 @@ my %trsections = (
         'ssh' => 'SSH',
         'unbound' => 'DNS: Unbound',
         'urlfilter bl' => 'URLFilter Blacklist',
-        'wireless' => 'Wireless'
+        'wireless' => 'Wireless',
+               'zabbix_agentd' => 'Zabbix Agent'
        );
 
 
@@ -229,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...
@@ -274,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" ;
@@ -397,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" ;