Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert syslog file to csv or access database for import to crystal 1

Status
Not open for further replies.

rleyba828

Technical User
Sep 29, 2004
53
US
Hi Team,

digressing from my earlier post --> ( How to Separate raw text file (syslog) separated by spaces into fields), it seemed that when I did this, I could not link another database into the formula fields...it seems that Crystal wants a "real" (as opposed to derived) database field in order to link files.

I would therefore need a way to convert my syslog file into CSV format or access database file that I can import into Crystal Reports.

As you know, the Syslog records are variable length and based from two entries like this:

May 19 04:05:13 10.9.26.233 local/AC2-ADC info logger: [ssl_acc] 10.5.235.12 - admin [19/May/2010:04:05:13 +1000] "POST /iControl/iControlPortal.cgi HTTP/1.1" 200 437

May 19 04:05:15 10.1.27.1 534391: May 19 04:05:14.995 AEST: %SNASW-3-SM_LOG_12: PROBLEM - 882131 - LU-mode session limit exceeded

I can't used fixed column lengths or space delimited (there are spaces everywhere on the line) to segregate them into fields.

I just need a file with the fields MONTH, DAY, TIME, HOSTNAME, MESSAGE.

Does anyone show me an elegant way, e.g.MS-access query or small PERL snippet or something that can achieve my goal above?

Thanks and regards.
 
Another option would be to use your formulas as the linking fields to subreports that reference the other tables--which you CAN do.

-LB
 
thanks LB.

I just tried this now and the subreport shows up as a complete "line" in the detail field and I could not select the individual fields in that line so I can perform grouping.

Ex. XLS file contains a "real" fieldname called "hostname" and the syslog text file contains the "formula" field "hostname".

However, I need to relate the "IP address" field in the XLS file to the syslog.hostname. something like this XLSFILE.hostname <==>syslog.ip-address.....where the link is via the common key "hostname"

I can't seem to do this if I use subreports.

Thanks LB
 
You can only group on fields in the container report--but you could use the xls file as your container and then add the syslog file as your subreport. Again, you would link the hostname field to the formula, and then place the subreport in the hostname group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top