Read from txt file

hey guys,
i have a txt file with servers name inside.
its possible to base a relevance query on this machines?

something like " if this machine is in the txt file be relevant" ?

This depends on few things like:
The content of the file, does it match with the full computer name or dns name?
Is it case sensitive?
Where the file will be located etc to handle the cases.

Here is a simple example:
exists lines whose (it contains computer name as lowercase) of file “c:\file_with_computer_names.txt”

1 Like

yeah the content is the full computer name,
but how i can say in the relevnace query that only the computer into the file will be relevante?

What is the use case to check the computer name existence in the file? How will the relevance be used? Is it Windows or both Windows and non-Windows?

The “computer name” is a BigFix client property and when the example relevance is evaluated on the client side, it will return true or false based on if the file contains the computer name.

If the relevance is in a custom task or analysis and it returns true, then the task/analysis will be applicable to that computer.

exists lines whose (it contains computer name as lowercase) of file “c:\file_with_computer_names.txt”

Ok, So With your relevance its want to find the computer name it self in the file, but in the TXT file there is like 20 machines, so its not possible to check one file on one machine specific machine that contains all the machines name and to make all those to relevnate to this task?

Each client evaluates its own status - you cannot have any client evaluate the conditions for another client

Please describe your use case: Where this file will be? How the relevance will be used?

ok so from the begining,
we have a linux machines, and linux machines cannot get any active directory query.
so we thinking about how to get group of linux machines to be unique how we can deploy something on them but not on all of the linuxs only on few.

so we try export to txt file all the machines that we want them to be relevant to this task, but we not success

ok so from the begining,
we have a linux machines, and linux machines cannot get any active directory query.
so we thinking about how to get group of linux machines to be unique how we can deploy something on them but not on all of the linuxs only on few.
so we try export to txt file all the machines that we want them to be relevant to this task, but we not success

Hi,
There are few posts with different ideas on this topic.

Some things to consider:

  1. How big the text/csv file will be and how to get it to each computer
  2. How often the file will be updated and propagate the change to the end points

Steps to consider:

  1. Figure out a way to get the text file with the list of computers to the end points. 1) One way to is to add the file to a custom site and have the clients down load it. 2) Or create a custom task to download the file
  2. Once the file is on the end point, an analysis can read the file and create a custom setting if the computer name is in the file.
  3. If more than one computer group is needed, then the custom setting should reflect that
  4. Create an automatic computer group using relevance option and the client setting