Check files from linux to windows

I generated the following relevance, but it only works for windows computers, how could I do the same for linux computers? the shared could be in linux or windows depending on which is more convenient!

if exist (files whose (name of it starts with “5.8_ORACLE_” and name of it contains(computer name)) of folder \SERVER\extractor) then ( line 1 of it & " - " & tuple string item 3 of concatenation ", " of substrings separated by “" of name of it) of files whose (name of it starts with "5.8_ORACLE” and name of it contains(computer name)) of folder \SERVER\extractor\ else “does not exist”

Regards

What folder would be used for Linux?

Jason, what is the OBJETIVE?
Our database admin team, have a script where the results of a series of analyzes are saved in a folder.
From bigfix we must have the content of these files to determine Compliance.
These files must be consumed by bigfix agents that are installed on Linux, so in relevance I can’t use “\server\folder” for example.
If the recommendation is to use a bigfix repository so that the agents can read it regardless of the OS, I can request the change from the DBAs.

So when your DBA team generates these files, where are they putting the files on the Linux machines?

“\SERVER\extractor” is not a valid pathname on Linux

I would leave it on a remote Windows or Linux server. What would be the best option to be able to read these files remotely, being their origin a Linux server?

There’s not really a good option for reading files from a remote server.

You could possibly host them on a web server and use ‘curl’ or download commands to download files to the client in an action.

1 Like

Jason, so if I had the files on a linux server it is not possible to read them remotely as if we do it on windows??

It’s entirely possible, but well outside the scope of BigFix to do file sharing. You might do some research on Samba, Apache, WebDAV, or other file sharing protocols.

But also consider the inherent risks… either unauthenticated access to a network data store, or embedding/storing/protecting those access credentials somewhere, as well as the performance hits to your network and the file server of having many clients accessing the share; and how you would want to handle error conditions if the server goes down, or if the client is off-networks.

I just can’t envision a use-case where networked files are a good solution for determining client compliance.

Maybe I didn’t finish explaining myself well and I apologize for it since my English is thanks to google!

I go with a concrete example and the steps to explain it.

  1. The DBA has a script that it runs and outputs a series of text files that contain only “TRUE or FALSE”. The name of the file, for example "5.8_ORACLE_SERVERORACLE1_ASDF_202206160413.txt"
    5.8 = Controller ID
    ORACLE = database type
    SERVERORACLE = hostname of the analyzed server
    ASDF = database instance
    202206160413 = parsed date/time

We will have a similar file for N servers and N instances.
“5.8_ORACLE_SERVERORACLE1_ASDF_202206160413.txt”
“5.8_ORACLE_SERVERORACLE1_MNBV_202206160413.txt”
“5.8_ORACLE_SERVERORACLE2_HFSS_202206160413.txt”
“5.8_ORACLE_SERVERORACLE3_YREW_202206160413.txt”

  1. From BigFix an analysis was generated that works very well for clients that are on WINDOWS.

But for clients on LINUX this fails and it’s because it can’t read a windows share.

So, the files mentioned above, if they were saved in a linux, is there a way to consult them through a bigfix relevance?

Yes. By the way, your English is very good but I may still not understand the question fully. Which of these cases do you have?

  • There is one directory on one server. The directory contains the multiple script output files; one output file for each client. The client needs to connect to this server directory, find the output file meant for this client, and parse it.

Or…

  • Each client has a local directory. This directory contains one file with the script output that this client needs to parse.

Excellent!!! this is the case:
There is one directory on one server. The directory contains the multiple script output files; one output file for each client. The client needs to connect to this server directory, find the output file meant for this client, and parse it.