Team,
I am using readcsvlog plugin to read login audit.csv and then writing to database.
PROD we have two application severs and sometime it is reading from a file which have less logins . I want it to read it from both application sever .
Below is the code. In CSV path i want to pass location of application sever instead of checking at /logs. Any idea?
readcsvlog( csvPath: "login-audit.csv."& text(today()-ri!number,"yyyy-mm-dd"), startIndex: 1, batchSize: - 1 ),
Discussion posts and replies are publicly visible
Hi,as a best practice I would avoid having server specific code in an application. If you are on premise you can solve this at server level. Implementing a cron job which copies and combines the content of both files into one with specific name once per day. With the readcsvlog plugin you can read this fileand fetch the content. As the documentation of the plugin states - you have to make sure the file you are going to read resides in the log\ directory.
Thank you , got it. But on which app server to store it , both ?
Only one of the app servers. Which app server you choose is up to you. Important is to define a symbolic link that you can read from "/opt/appian/shared-logs/login-audit.csv" and the code is free from server references.Symlinks in Unix: www.freecodecamp.org/.../