1571 views

Can flex connector delete a file instead of add .processed at the end of file name.

Jump to solution

Hello expert, Please I have a json flex connector and i would like to know if there is parameter i can modify to all the flex connector to delete the file processed instead of add .processed at the end of the file name

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

In your agent.properties file make this change and it should do the trick:

agents[0].mode=DeleteFile

instead of what is probably in there now:

agents[0].mode=RenameFileInTheSameDirectory

agents[0].modeoptions=processed

View solution in original post

0 Likes
3 Replies
Fleet Admiral
Fleet Admiral

There is a generic setting that should work. It works for file based FlexConnectors, but not sure about the REST one. However you should find it on page 127/128 of the FlexConnector guide - ArcSight REST FlexConnector Developer’s Guide

Two settings - onrotation and onrotationoptions cover the things you can do - its in the agent.properties for the connector so should work - not tied to a particular FlexConnector.

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

In your agent.properties file make this change and it should do the trick:

agents[0].mode=DeleteFile

instead of what is probably in there now:

agents[0].mode=RenameFileInTheSameDirectory

agents[0].modeoptions=processed

View solution in original post

0 Likes
Captain
Captain

Hi All..is this possible, neither renaming nor deletion is done to the file.

I mean, the connector just reads the file newly added to the folder and doesn't act anything (such as renaming or deleting the processed file) after processing that.Again when a new file is added to the folder this is repeated.

Since the files within the folder are used by other applications (here in my organization) I'd need to workout this.

Also there are multiple files written to this folder and my connector needs to read one among those and ignore the others. How do I achieve this? by utilizing the 'extract field name' in agent properties file? but the filename formats are similar

Ex: xxxx16112016.log and yyyy16112016.log where I need to read xxxx.16112016.log

Would appreciate your help on this.

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.