Import Dynamically list of computers to a group in bigfix

Hello,

I have list of computers, that changes every day, and I want to import this list to a group in bigfix.
the group will update automatically according to the file.

is it possible?

Thanks,
Ortal

What is the criteria for the list? Are you saying that computers are in the group for a day then drop out of it the next day?

1 Like

This is possible, yes, but requires a little bit of integration/customization. Depending on the size of the group you might take different approaches (or variations of the same approach), but here’s an overview of one method:

  • propagate the file containing the list of computers to be added to a group within a custom site (that is subscribed by all the possible machines that would ever be in the group)
  • create an automatic group with relevance that inspects the file (which is now on the endpoints since it was propagated to a custom site) to determine whether or not the given endpoint is listed within the file
  • programmatically update the file in the custom site using the REST API on the desired interval

In this way, the endpoints themselves determine whether or not they are meant to be in the group.

Another approach you might consider (again, depending on exactly what you are trying to achieve, the scale, and network environment) is to create a web service that when queried by an endpoint returns some external data from a database that the Client would then have available for various purposes (grouping, targeting actions, returning as property, etc…).

1 Like

What is the reason for the membership of the list? Is it something that could be determined by examining the computers themselves? If so you should be able to do it in relevance automatically.

Is it completely random? that might be possible with relevance directly as well.

Could it be based upon AD group membership or some similar AD item? that can be done through relevance.

If it is really necessary because the data is completely external and can’t be determined from the machine itself easily, then go with what @Aram recommends.

hi,
thank you for your answer.

I have some questions :

  • how exactly we can propagate the file within a custom site?
    -how I use the REST API for this?

thanks,
Ortal

Please see the following reference for REST API:

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/RESTAPI%20Site

It suggests the following:

site/{site type}/{site name}/files

Adds files to a site.To post to ‘files’ instead of ‘file’ you need to supply the files in a MIME document.

The simplest example of this would be the curl command:

curl -k -u mo -X POST -F “file=@/temp/file.xml” “https://spiffy:52311/api/site/custom/TestSite/files”

To send the file to clients, set the “IsClientFile” header to 1.

The simplest example of this would be the curl command:

curl -k -u master -H “ISClientFile: 1” -X POST -F “file=@/home/test/file.txt” “https://localhost:52311/api/site/custom/master/files”

More than one file can be included in this manner in a single post.

Response: BESAPI showing the ID of the created file.Post File Example:Content-Length: 1136
Content-Type: multipart/form-data; boundary=----------------------------27beaea68af8------------------------------27beaea68af8
Content-Disposition: form-data; name=“file”; filename=“file.data”
Content-Type: application/octet-streamfile data goes here
------------------------------27beaea68af8–

Other general REST API examples are available here: GitHub - bigfix/restapi-examples: A collection of examples to demonstrate the usage of the HCL BigFix RESTAPI

You can even use the IEM CLI to achieve this (it is essentially a utility built to leverage the REST API and provide a simple command line interface to it):

http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Config/c_iem_cli_overview.html?lang=en

Adding files to sites is a bad idea unless the file is very small.

See these related posts:

so what else can I do?

How big is the file when compressed? And how many endpoints (roughly) are in scope for this grouping effort? There are a number of approaches you can leverage to achieve the desired effect.

1 Like

There are many options as @Aram suggests, and adding the file to sites might work depending on the situation, but as @Aram states, it would be helpful to know the size of the file, size of the file compressed, and how many endpoints would be effected.