-
Notifications
You must be signed in to change notification settings - Fork 30
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
Get quota used of analyzer rates #12
Comments
Hello, I guess the analyzer used quota means the number of jobs of that analyzer, during a given period? |
I think, I probably used the wrong terms! was referring to the rate and rateUnit associated with each analyzer. Each time a submission is sent to the analyzer I presume there is an internal counter which is decremented in order to track the number of submissions? E.g. I set my VT analyzer to rate of 100 and a rateUnit of 1 day. This means I can use the VT analyzer 100 times that day. Throughout the day I want to see how many submissions I have left before I reach my limit (in this case, 100). |
That's what I understood, it's 100 - countAnalyzerCallsOfThatDay |
Yes 😁 |
I don't remember if you still need something for this question or if it has been answered :) |
Hey, yes, I needed to know if getting the remaining quota for an analyzer was possible via the API? It seems like there is no use for the "rate" variable per analyzer if there isn't?! 🙄 |
There is not API that returns the remaining rate but as I said, you can compute it by counting the already executed analysis, during the month, and subtract that count the |
Thanks - I get how to calculate it, however, when Cortex is being used by many clients this would mean that each client would have to implement its own logic to track the analyzers usage. This seems a bit flawed when there is a field to input the rate for a given analyzer/API? My suggestion is to track the used rate/quota and expose it via the API - this would allow clients to check if there are any API calls left for that particular service before issuing them and potentially be blacklisted from the service? |
Well, once again, this is tricky because 1 analyzer might use several external server calls: Imagine VT scan analyzer polling for analysis status from VT. What we can try to add is a header that contains the remaining possible analyzer calls. |
Yea, this is potentially an issue... This may be something to work into the cortexutils lib (when in an analyzer that makes a call to another service, it calls an endpoint in cortexutils which decreases the amount of quota available to that API). This would require a reworking of the current Analyzers though. It'd be good to have something which gives an idea of the amount available though. |
Hi, any way to get the used quota of an analyzer?
Thanks
The text was updated successfully, but these errors were encountered: