Hello again i am trying to get system info using t...
# fleet
g
Hello again i am trying to get system info using the api endpoint GET /api/v1/fleet/hosts- (https://fleetdm.com/docs/rest-api/rest-api#hosts) and i am trying to include additional parameters as the API results are missing some key info (i am particularly after the CPU manufacturer which is in cpu_info table) additional_info_filters - stringquery - A comma-delimited list of fields to include in each host's additional information object. See Fleet Configuration Options for an example configuration with hosts' additional information. Use
*
to get all stored fields. i tried various combinations but was unable to get the response by adding additional_info_filters to the API. can someone please guide some info on what i tried: api/v1/fleet/host_additional?additional_info_filters=cpu_info.manufacturer api/v1/fleet/host_additional?additional_info_filters=*cpu_info.manufacturer api/v1/fleet/hosts?additional_info_filters=system_info,os_info,cpu_info Thank you
k
Hi @girish! Did you add the additional query to your configuration?
g
@Kathy Satterlee - Thank you for reverting. please pardon my ignorance. are you suggesting we make the changes in the flag file which we download from fleet ui? We added the flagfile to the all the agents when we did the deployment. So would it mean we will have to modify the updated file on all the agents? looking forward to your response
k
You need to add the additional query to your Fleet server configuration (or your agent options in the Fleet UI) as shown in the linked docs.
g
Hi Kathy I copied the instruction (in Fleet UI > settings > agent options) just to see if it works but got the below errors: Could not update settings. unsupported key provided: "features" _Could not update settings. unsupported key provided: "host_settings"_ If you’re not using the latest osquery, use the fleetctl apply --force command to override validation. I have attached a screenshot for reference:
k
Apologies, I conflated features and commandline flags. So sorry about that! You'll want to apply it on the server side. If you don't currently use a
yaml
file to configure fleet, the simplest approach is to pull the current config with
fleetctl
, make the changes you want, then apply the file.
Commands incoming
If you haven't already, install fleetctl and log in to your server. Retrieve current config and save to file:
Copy code
fleetctl get config --yaml > fleet-config.yml
Then edit the file to include the feature and apply the edited config:
Copy code
fleetctl apply -f fleet-config.yml