r11548: adding simple script to tail syslog and write to eventlog tdb
authorGerald Carter <jerry@samba.org>
Mon, 7 Nov 2005 13:43:06 +0000 (13:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:19 +0000 (11:05 -0500)
(This used to be commit 9337a286c9169e1e0247b5923942eeeb4467d95a)

examples/scripts/eventlog/parselog.pl [new file with mode: 0644]

diff --git a/examples/scripts/eventlog/parselog.pl b/examples/scripts/eventlog/parselog.pl
new file mode 100644 (file)
index 0000000..0a2b5b9
--- /dev/null
@@ -0,0 +1,8 @@
+while(<>) {
+    chomp();
+    @le = split '\s+',$_,5;
+    $ln = $le[4];
+    $cname = $le[3]; 
+    $outstr = sprintf "TMG: %d\nTMW: %d\nEID: 1000\nETP: INFO\nECT: 0\nRS2: 0\nCRN: 0\nUSL: 0\nSRC: Syslog\nSRN: $cname\nSTR: $ln\nDAT:\n\n",time(),time();
+    print $outstr;
+}