Check a client is online on Bigfix console

Hi

I have a requirement to check whether a bigfix client computer is online/reporting on BigFix console from the client “Linux” system. Currently I have a shell script looking at the log file /var/opt/BESClient/__BESData/__Global/Logs/ and look for “Report posted successfully”. It is not working as expected sometimes.

Are there any Linux client side bigfix commands that I can run to figure this out?

If not, which API call from the client tells that the computer is successfully reporting on the console?

Will this be the right one? https://<bigfix_server>:52311/api/computers
and look for LastReportTime

Appreciate your help in advance.

Regards
Arun

Checking the logs would probably be the only option on client unless anybody has any other ideas?

With the RestAPI you would definitely be able to do it. https://<bigfix_server>:52311/api/computers will give you last report time but it will essentially give you all computers (depending on the size of the environment it may be a big parsing from there on). My suggestion would be to either change to query resource [https://<bigfix_server>:52311/api/query?relevance=last report times of bes computers whose (id of it = integer)] or instead continue to trill down to the actual computer resource with the computer ID:
https://<bigfix_server>:52311/api/computer/?fields=Property<Name=Last%20Report%20Time>.

You can get the ComputerID from the client config file (/var/opt/BESClient/besclient.config) - you should see in it something along those lines:

[Software\BigFix\EnterpriseClient]
EnterpriseClientFolder = /opt/BESClient

[Software\BigFix\EnterpriseClient\GlobalOptions]

ComputerId = integer

I would be cautious having the client send REST API queries for status regularly. There are comications with getting credentials to the client, and scaling issues if you want all of your clients doing this on some regular basis. I’ve seen deployments overwhelm their Web Reports server sending frequent API requests from every computer in the deployment.

For your use-case, I’d recommend using the Client Compliance API instead. Have a check at
https://developer.bigfix.com/other/cc-api/ to get started.

1 Like