This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/perl
use strict;
use mysql;
use CGI qw(:standard);
my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1});
print header();
print "<html>\n";
print "<head>\n";
print "<meta http-equiv='refresh' content='10; alerts_log.pl'>\n";
print "</head>\n";
print "<body>\n";
my $sth = $dbh->prepare("select date,time,msg,host_hostname,service_result from alerts_log order by date desc, time desc");
$sth->execute;
print "<table border='1'>\n";
print "<tr><td>Datum</td><td>Zeit</td><td>Nachricht</td><td>Hostname</td><td>Dienstergebnis</td></tr>\n";
while (my $ref = $sth->fetchrow_arrayref()) {
print "<tr><td>$ref->[0]</td><td>$ref->[1]</td><td>$ref->[2]</td><td>$ref->[3]</td><td>$ref->[4]</td></tr>\n";
}
print "</table>\n";
print "</body>\n";
print "</html>\n";