I am using command polling to manage my internet clients
command polling is set to run in every 30 minutes for now but I want to add an action in offering list;
so users can trigger command polling manually when they need.
Is there any action script command or client api command to apply this?
When I create a task or any other content on console, it is annoying to wait 30 minutes to see the results.
I dont want to use “notify client forcerefresh” because it is too heavy.
I want the besclient to get only new contents from server or relay.
This is not equivalent to command polling. I’m not even sure that issuing it to a client would actually cause it to poll for commands. It tells the client to send a full report with all property and applicability results.
You can address this by opening up UDP on port 52311 on all of you clients and firewalls to your relays. It won’t solve all cases, but it will help with many of them. In some cases you might want to put some relays behind WAN connections to help with both bandwidth but also with UDP notifications. You mention this happens with your clients connected over the internet, and in most cases there isn’t much you can do about that.
As far as I know there isn’t an API that can be easily triggered to tell the client that it should do command polling right now. There also isn’t an actionscript command. I have been asking for both of these things for various reasons for a long time now. CC:@AlanM
One option that I have been thinking about is to have an offer that would set the command polling interval to 10 minutes, then have a policy action automatically set it back to a less aggressive value after the next successful poll for commands. I would generally recommend something in the once every 3 hour range for all clients and once an hour for those that commonly communicate over the internet. (generally WiFi devices)
This is the best option I can think of as a way to trigger command polling.
all clients are mobile in this environment (it is a SaaS model of bigfix). so I can’t use udp ping because all clients are in internet.
the option “changing polling period” seems OK.
but there is a question here.
Does besclient require a restart to apply new polling value ?
if not, firstly, I will try to update polling setting with old value. I hope this update resets its timer and I dont need a policy action to set it to default : setting "_BESClient_Comm_CommandPollIntervalSeconds"="1800" on "{now}" for client
secondly I am trying to set a different value. setting "_BESClient_Comm_CommandPollIntervalSeconds"="600" on "{now}" for client
I am not certain, but I don’t think so as long as the new setting is set through the actionscript settings commands. (policy or offer)
If you edit the registry directly, even in actionscript, then the client should not see the new settings until it is restarted. I would avoid restarting the client just for command polling if possible. Not an ideal way to do it, though it would work to trigger a command poll.
That is an interesting thought. I don’t think it would work this way, but who knows, it might. Can’t be certain without trying it.
The option that I’m fairly certain would work is setting it to once every 10 minutes, then flipping it back to the default with a policy action, but another thing to try would be to set it to 1 minute in the action script, then immediately set it back to the default of 30min or whatever.
If there are many clients in the same location / office, then it may make sense to designate a relay there.
It doesn’t seem like simply changing the command polling interval value has an effect. The client should be comparing the command polling value to an internal timer or a value that represents the last time it polled for commands, so it makes sense that setting the interval wouldn’t have an effect.
I do wonder what would happen if you disable then immediately reenable command polling in the actionscript. That might work.
setting "_BESClient_Comm_CommandPollEnable"="0" on "{now}" for client
parameter "start" = "{now}"
pause while{ now - (it as time) of (parameter "start") < 2 * second }
setting "_BESClient_Comm_CommandPollEnable"="1" on "{now}" for client
It seems like it should.
It could be that the action needs to end for the setting change to really take effect.
That doesn’t seem to work either. I set the command polling interval to once every 12 hours on my test machine. I created a policy action to enable command polling on all of my systems, which already had it enabled. I then created an offer to disable command polling. I triggered the offer which disabled command polling, then after a delay the policy action to enable command polling triggered automatically, reenabling it. This did not seem to trigger a command polling event in the log.
It is hard to tell if that worked, or if it would have happened anyway at that time. I’ll have to do some more testing, but it doesn’t seem like it worked for me.
Setting the polling interval to 12 hours multiple times didn’t seem to trigger command polling.
Setting it to a slightly lower value also didn’t trigger command polling.
Disabling and reenabling command polling didn’t seem to trigger command polling.
I can’t seem to get anything to work. I’m testing on client v9.5.0.311
A solution I thought of is that you can set command polling to something like 5 or 10 minutes, then set it back to default after 5 or 10 minutes goes by. You can tell when the setting was changed using the relevance for effective date
it sounds like this command forces a gather which would be more aggressive than command polling. Command polling is effectively checking to see if a gather is needed, while this sounds like it forces a gather check across all sites.