Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Commander
Commander
1520 views

How do you create a flex connector that reads multiple files in the same directory?

I noticed that the siteminder connector reads multiple files in the same folder. I am trying to create a flex for a platform that uses multiple files in the same folder. I noticed this in the siteminder agent.properties file:

agents[0].smaccess=
agents[0].smaccess_Acct=
agents[0].smaccess_Adm=
agents[0].smaccess_Auth=
agents[0].smaccess_Az=
agents[0].smps=

I took out the file locations but each of those has the exact same path. Each has a different file name, of course. What is .smaccess triggering? Do I need a special script for the flex connector I want to create?

Labels (2)
0 Likes
13 Replies
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

You probably can't just replicate that mechanism from the siteminder connector.

I would asume that a real-time folder reader is the way to go.

Do all the files have the same format? Can you cover then with a single parser?

0 Likes
Commander
Commander

They are all.log files. I can tell the file reader agent.properties file to look at all .log files right? (i.e *.log?)

0 Likes
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

sure. But do they all have the same format?

0 Likes
Commander
Commander

yes they do because they were using a folder reader flex. I just tried the /*.log and it can't read it. it's literally looking for *.log. Did I do something wrong?

0 Likes
Absent Member.
Absent Member.

Did you ever get your answer? I am having the same issue?

0 Likes
Admiral
Admiral

Are you guys using multi folder follower connectors?  If so you can just set the folder path, and for each entry in the list of folders, specify the appropriate wildcard in agent.properties to read the file that you are interested in.  You can configure each folder/file to be handled by the same flex parser.

HTH,

Ian,

0 Likes
Commander
Commander

I will give it a try.

Thanks,

Brett Pladna

0 Likes
Absent Member.
Absent Member.

Ian

What does the entry look like inside the properties file to tell which parser to use. I have it where it is able to read all files with .txt and rename it to .processed when it is done. The issue is that it is not using my custom parser since all the information is being dumped into the message field.

Any ideas?

v/r

Randy

0 Likes
Commander
Commander

We got this to work. Thanks for all the help.

Thanks,

Brett Pladna

0 Likes
Admiral
Admiral

Randy:

For a general syslog style file, you could use something like this (for some reason the file has double /'s) which will use the system subagent for syslog events:

agents[0].foldertable[0].configfile=syslog/syslog.subagent

agents[0].foldertable[0].configfolder=/full/path/to/current/user/agent//flexagent/

agents[0].foldertable[0].configtype=sdkrfilereader

...

agents[0].foldertable[0].folder=/var/log

...

agents[0].foldertable[0].mode=PersistFile

...

agents[0].foldertable[0].processingmode=realtime

...

agents[0].foldertable[0].wildcard=messages

...

Regards,

Ian.

0 Likes
Absent Member.
Absent Member.

Thank you

I will try this and hope to get it working.

Thanks again

Randy

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.