Skip to content
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

A nice potential example: A GeoLocation report of passed/blocked traffic #22

Open
acaird opened this issue Feb 5, 2020 · 0 comments
Open

Comments

@acaird
Copy link

acaird commented Feb 5, 2020

On Wed, 17 Oct 2018, Paulo wrote:

Hello team, We have a customer that would like to generate reports monthly where they get information aggregated by countries: passed/blocked traffic. The best alternative here seems to be using API, right? Is there anyone that have came across a similar need? Regards – Paulo

On Wed, 17 Oct 2018 Andrew wrote:

Hi Paulo,

I haven't looked to see if SP already has such a report, it seems to me like this would be something we would have.

However, this is possible using version 5 of the API that is in Sightline 9.0 (which was just released yesterday) and later.

The general workflow would be:

  1. query the API for all of the mitigations that were active last month
  2. Get the `statistics_by_country' sub-endpoint for each mitigation
  3. do something to exclude traffic from the month prior to last month and the traffic that is in the current month for mitigations that are not completely contained within the month boundaries (this isn't that hard, but it is an extra step)
  4. For each country listed in each mitigation, sum the "drop" and "allow" traffic into a country bin
  5. Report each country bin.

If I get time I'll write an example Python program that will do a version of this, but if someone gets to it sooner than I do, I'd love to see it.

Good luck! –andy

On Wed, 17 Oct 2018 Paulo wrote:

Oh God, I just realized that I forgot to mention this request is related to APS… Sorry about that! Regards – Paulo

Even so, this would be a nice example of the SP REST API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant