Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
JSolman Frequent Contributor.
Frequent Contributor.
120 views

FlexConnector for Logs which have the start on the same line as the previous log?

Hi all, is it possible to have a flexconnector read logs from a line and not just a new line? 

 

For example when i write the messages to a logfile using rsyslog, they dont have a new line character in them (source device issues which i can't fix) 

Therefore my file looks like this 

<109> 1 Date Hostname Msg<109>1Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109>1Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109>1Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg<109>1Date Hostname Msg<109> 1 Date Hostname Msg<109> 1 Date Hostname Msg

Any help appreciated!

0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: FlexConnector for Logs which have the start on the same line as the previous log?

If the log files are rotated on a regular basis, I can suggest the following:

1. create a script which takes the rotated file and converts it into a multiline log file. 
2. configure the rotation of the log files so that you can make the reading logs near time. (for example, set rotation for 1 minute)
3. schedule the script (or make it real-time by including a folder monitoring mechanism).
4. create a flex connector for the converted log files.

------------------------------------
Please use the Like button below, if you find this post useful or mark it as an accepted solution if it resolves your issue.
0 Likes
JSolman Frequent Contributor.
Frequent Contributor.

Re: FlexConnector for Logs which have the start on the same line as the previous log?

Unfortunately, i have no idea where to start with writing that script. I have already created the flex connector for the output file. Should i use perl? bash? shell? what kind of script would be best?
0 Likes
Knowledge Partner
Knowledge Partner

Re: FlexConnector for Logs which have the start on the same line as the previous log?

It seems there are many ways to do it. I've found this one: https://stackoverflow.com/questions/26324613/unix-script-for-converting-single-line-delimited-to-multiline-file

 

------------------------------------
Please use the Like button below, if you find this post useful or mark it as an accepted solution if it resolves your issue.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.