-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveAlertQuery("Shared Domain").fetch_as_element() never stops #4
Comments
Ok, |
Another addition.. when I give the query enough time. I see this:
especially the part with "Query returned 0 records" is interesting. Did the generator get invoked again? My code looks like this: active_alerts = alerts.ActiveAlertQuery(config['smc']['domain']).fetch_as_element()
for alert in active_alerts:
if alert.source == None:
continue
.... do more... with |
Small addition. Same happens when I use API version 6.6 and 6.7. The only difference is that the connection is more stable and instead of a timeout I just see: "Query returned 0 records" over and over again.. |
ping @gabstopper :) |
Interesting observation:
ping @lmartinson |
I have the same behaviour with VPNSA when I have 0 results. A ticket is open on Forcepoint support portal |
Hello, I have solved this issue with the parameter "max_recv=1".
Does it work for you? |
@EtienneMILON I need to try this out, thanks a lot! |
it's working but only return one element |
When you say one element it is one SA? |
hello, see : #12 :) |
Hello, @ad1rie1 you should not wait for 1. BR, |
if set max_recv is the number max of SA (or log entry) returned. i dont remember if you set max_recv = 7 with 6 SA block or nor sorry If you remplace you wsocket.py by the MR one, you have just to do : after 10 sec of work it stop and return the result |
I did try it with max_recv=10 with 6 VPN SAs. Yes, what you propose is an enhancement to the current method that could be done. |
Hello, I don't agree with your explanation of "max_recv".
I don't get only 1 SA but all the SA corresponding to "firewall_name". However, the timeout is a good improvement! Etienne |
Yes sorry From SMCSocketProtocol
It is not number but iteration. |
Its strange your doc is different from fetchraw one ... test and see :) |
I precise, i do not have the same behaviour on 6.5 that return all , and 6.8 that not return all ;) |
Hi,
I have encountered the following issue with:
When calling
smc_monitoring.monitors.alerts.ActiveAlertQuery("Shared Domain").fetch_as_element()
I will get a generatorover the current active alerts as expected, but the generator will never stop.
Corresponding debug output looks like this:
Note the last line that says:"Query returned 31 records" this is equal to the number of alerts I retrieve, but the generator will stuck in an endless loop after running over all alerts. I tried to debug this, but the debugger refuses to jump into the corresponding thread.
Is this an issue with python 3.8.3? I saw, that you only support 3.6..
The text was updated successfully, but these errors were encountered: