Refresh, resart bes agent

Hi,

Is there a way to refresh and restart the bes client agent using REST API?

I looked through the inspectors but only came across query besclient.

Thanks

This is possible, yes, but what is the use case for doing so?

You would have to send an Action to the client, but if you need to refresh and restart the client my guess is it isn’t taking Actions.

Some of us have implemented things in the Task Scheduler or cron to health-check the clie t but I don’t think there is anything official.

1 Like

Hi Aram,

The case is for doing a refresh from the command line like you would by right clicking the computer in the console and selecting refresh. Regarding restarting the agent some times the agent is greyed out in the console and is not responding so a restart of the agent fixes that sometimes otherwise a reinstall of the agent is necessary.

Thanks

Hi Jason,

We used to mange the bes agent from the command line using Tivoli but we no longer have access to that environment and we don’t have local admin privs to the OS on the targets so that is why I was wondering if this could be accomplished from the command line using the REST API

Thanks,

I’m afraid the REST API would not likely help in that case. REST queries/postings go to the BES Root Server, and would still need a path to get from there to the client. If the client were responding, you could use REST to post an Action to the client to get the behavior of a right-click “Force Refresh”, but that still depends on Actions making it down to the client.

Using the newer “locked files” family of Inspectors, it is possible to have the Task Scheduler (Windows) or cron (UNIX/Linux) read the contents of the current client log file. I’ve seen postings in this forum leveraging that to check on the client’s health periodically (for example on an hourly basis). You would need to decide what constitutes a “Healthy” client, hopefully there is some indicator you could search for in the client log, but you can use the command-line executables “qna.exe” or “/opt/BESClient/bin/qna” to execute a Relevance query, and then your Scheduled Task / cron job could perform a remediation such as restarting the client based on those results.

I don’t have anything ready to post here, but I think if you search for client healthchecks in the forum or at https://bigfix.me then you might find something you can use.

Thanks Jason,

Do you have an example handy regarding this?

you could use REST to post an Action to the client to get the behavior of a right-click “Force Refresh”, but that still depends on Actions making it down to the client.

Being able to “force refresh” would be a good place to start.

While this is possible, I would recommend highly against automating refreshes for this purpose. If you are encountering issues with Clients, it’s advisable to troubleshoot and address the root cause rather than attempting to workaround it with refreshes (which would introduce quite a lot of overhead on both the Client and the BigFix infrastructure as well).

If you can provide a bit more details on the reasons behind this request, we may be able to suggest some troubleshooting steps.

This thread is probably a good place to start